Skip to content

Make the codebase poi-free (poi* → structure*)#288

Merged
rulkens merged 27 commits into
mainfrom
worktree-make-codebase-poi-free
Jun 8, 2026
Merged

Make the codebase poi-free (poi* → structure*)#288
rulkens merged 27 commits into
mainfrom
worktree-make-codebase-poi-free

Conversation

@rulkens
Copy link
Copy Markdown
Owner

@rulkens rulkens commented Jun 8, 2026

Eliminates the legacy poi ("point of interest") vocabulary, which an entanglement-radar pass found was one name hiding two different concepts. A blind poi → structure rename would have merged them, so this splits into three phases.

Design + plan: docs/superpowers/specs/2026-06-08-poi-free-codebase-design.md, docs/superpowers/plans/2026-06-08-poi-free-codebase.md.

Phase A — dissolve PoiCategory

PoiCategory was StructureCategory | 'famousGalaxy' (the label/marker visibility superset), not a synonym for structure.

  • Added bearsLabel / bearsMarker / labelLayer capability flags + per-category display copy (detailLabel/shortLabel/plural) to SOURCE_REGISTRY rows.
  • LabelCategory (registry-derived) replaces PoiCategory; the marker axis narrows to StructureCategory, dropping the phantom famousGalaxy key.
  • The POI_CATEGORY_INFO table folds into the registry (CATEGORY_DISPLAY_INFO).
  • The if (category === 'famousGalaxy') setter branches dissolve into the data-driven labelLayer routing — no special-case control flow remains (verified).

Phase B — fold #poi= into #focus=

  • FocusTarget gains a structure variant; parseFocusHash routes category-prefixed ids (cluster-… etc., derived from STRUCTURE_CATEGORIES).
  • useUrlSync routes structures through the single #focus= codec (both pending slots/drains kept — async catalog vs sync structure table).
  • #poi= dropped entirely (no back-compat, by design); the poiUrl codec deleted.

Phase C — mechanical renames

isPoiisStructure, resolvePoiFromPickresolveStructureFromPick, structurePoiStylesstructureMarkerStyles, poiIndexstructureIndex (incl. the structureMarker WESL varying), FocusState.poiIdstructureId (+ category widened to include group), selectedPoiselectedStructure, the 'poi' label-layer key → 'structure', plus a full comment/local-var sweep.

The only intentional #poi= reference left is the hasDeepLink test asserting the dropped param is no longer a deep link.

Verification

npm run typecheck, npm run build (WESL compiles), and the full npm test suite (2456 tests) all pass at every commit.

🤖 Generated with Claude Code

rulkens and others added 23 commits June 8, 2026 01:06
Dissolve PoiCategory into registry-derived label/marker axes, fold #poi=
into #focus=, and rename the Concept-A poi holdouts to structure. Captures
the 2026-06-08 entanglement-radar findings + brainstorm decisions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase A (dissolve PoiCategory → registry-derived label/marker axes),
Phase B (#poi= → #focus= fold), Phase C (mechanical poi→structure renames).
20 TDD tasks; rides the same PR as the implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…laxies"

Decouple category display copy from the source label so famousGalaxy source
stays 'Famous' while the category reads 'Famous Galaxies'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o registry

Capability flags (bearsLabel/bearsMarker/labelLayer) and per-category display
copy (detailLabel/shortLabel/plural) on SOURCE_REGISTRY rows, so the label and
marker category axes can derive from the registry instead of a PoiCategory
union + a separate POI_CATEGORY_INFO table. famousGalaxy: label-only; structures:
label + marker. Task A1 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The label-visibility axis (famousGalaxy + the four structure categories),
mirroring structureCategories.ts. Honest registry-derived replacement for the
hand-written PoiCategory union. Task A2 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…_DISPLAY_INFO

Replace the standalone POI_CATEGORY_INFO table with CATEGORY_DISPLAY_INFO derived
from the label-bearing registry rows; repoint InfoCard + SettingsPanel consumers;
delete poiCategoryInfo.ts. Task A3 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…to StructureCategory

Retire the PoiCategory union. Label visibility keys on LabelCategory (famousGalaxy
+ structures); marker visibility narrows to StructureCategory, dropping the dead
famousGalaxy key + its no-op setter guard. Default-visibility records now derive
from the category sets. Task A4 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mousGalaxy branch

setCategoryLabelVisible now dispatches on the registry-derived LABEL_LAYER_BY_CATEGORY
('galaxyNames' vs 'structure') instead of `if (category === 'famousGalaxy')`. Add
isStructureCategory guard for the structure-branch narrowing. LabelEffectsSection's
dropdown derives from ['youAreHere', ...LABEL_CATEGORIES] rather than a hardcoded
list. Task A5 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FocusTarget gains a 'structure' variant; parseFocusHash routes category-prefixed
ids (cluster-/supercluster-/void-/group-, derived from STRUCTURE_CATEGORIES) to it,
before the famous-id fallback. The galaxy resolver gets a defensive structure case.
First half of folding #poi= into #focus=. Task B1 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Structures now ride #focus=, so #poi= is no longer a deep-link shape. Task B2 of
the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lSync

initialPendingFromHash parses one #focus= hash and routes kind:'structure' to the
structure pending slot (renamed pendingPoiId → pendingStructureId); computeDesiredHash
writes focus=<id> for structures. Both pending slots + drains kept (galaxy async vs
structure sync). Stops using the poiUrl codec. Task B3 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#poi= is fully folded into #focus= (B1-B3); the structure URL codec has no
remaining consumers. Task B4 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ulary

isPoi → isStructure (returns StructureRecord), resolvePoiFromPick →
resolveStructureFromPick (PickPoiInput → PickStructureInput), and poiIndex →
structureIndex everywhere incl. the structureMarker WESL pick varying. Pure
renames, no behaviour change. Tasks C1/C2/C4 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The style table is already keyed by StructureCategory; the Poi in its name was a
holdover. STRUCTURE_POI_STYLES → STRUCTURE_MARKER_STYLES, file + test renamed. Task
C3 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ectedStructure

FocusState.poiId → structureId; category widened from the three-literal union to
StructureCategory (adds the focusable group category). selectedPoi param/comments →
selectedStructure. Tasks C5/C6 of the poi-free plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ent sweep

LabelLayerId 'poi' → 'structure' (the structure label fade layer) across producers,
the fade registry, and tests; reword a first batch of poi/POI comments and #poi=
references to structure/#focus= vocabulary. Partial Task C7 (sweep continues).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reword every remaining poi/POI/pois comment, docstring, test description, and
WESL comment to structure vocabulary; rename poi/pois local variables (and the
UseUrlSyncInput.pois input field → structures) across src + tests. Only the
deliberate hasDeepLink #poi= test and the *.poi.test.ts filenames remain. Task C7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
skymap fee8697 Commit Preview URL

Branch Preview URL
Jun 08 2026, 11:20 AM

rulkens and others added 4 commits June 8, 2026 13:02
The three *.poi.test.ts files → *.structure.test.ts (contents already swept);
remove the now-unused Source imports the comment sweep left in surveyFluxLimits
and sourceMask. Task C8 of the poi-free plan. Codebase is now poi-free except the
deliberate hasDeepLink test asserting #poi= is no longer a deep link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`'galaxyNames' | 'structure'` was a raw literal union written five times
across the registry field and labelCategories.ts — an unnamed subset of
LabelLayerId with no canonical home. Extract it as CategoryLabelLayer
(Extract<LabelLayerId, ...>) so the subset can't drift to a layer that
doesn't exist and a rename in LabelLayerId propagates for free.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DoD audit READY: tests (2456) + typecheck + build green, codebase
poi-free apart from the deliberate hasDeepLink regression test, no new
TODOs, test parity improved. Move plan + spec to completed/, tick
remaining checkboxes, restore mangled task headers, drop the backlog item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rulkens rulkens merged commit c54469c into main Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant