Skip to content

fix(stars): focused-star sphere falls back to the focus slot#469

Merged
rulkens merged 5 commits into
mainfrom
worktree-star-body-selection-braid
Jul 21, 2026
Merged

fix(stars): focused-star sphere falls back to the focus slot#469
rulkens merged 5 commits into
mainfrom
worktree-star-body-selection-braid

Conversation

@rulkens

@rulkens rulkens commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What

Three fixes un-braiding the close-range field-star body from selection state — surfaced by smoke-testing #focus=star-<recordIdx> deep links and background-click deselection at solar-radius range.

  1. 360d765c — the sphere layer falls back to the focus slot when select holds no star (per-slot star check, module-local focusedStarRow). (Superseded by 3, kept for history.)
  2. 5af3dc3awatchSelectionRowsSaga's late-arrival gap-fill now fires on both catalog-commit pulses. The star bin commits via engineSourceCountReported and never dispatches catalogLoaded, so a star deep-link's focus row previously stayed null forever: camera arrives, no body, no InfoCard.
  3. e2d36723presence-by-proximity: the renamed fieldStarSphereLayer derives WHICH star gets a body from nearestResolvableStar (expanded-box octree descent — a star just across a leaf face is still found; positions reconstructed through the one shared resolveStarRecord formula) with a 4px-on / 3.2px-off hysteresis band. Selection now only decorates (halo, InfoCard) and can never blink the body out. The commit-1 fallback is deleted as dead.

Also merges origin/main (perf harness #464, reversed-Z #466 lineage) and sweeps two backlog items (both implemented here).

Verification

  • npm run typecheck clean; npm test 4611/4611 green.
  • New tests: saga gap-fill on the star commit pulse; nearestResolvableStar (nearest-wins, null-when-far, leaf-face edge, position parity with resolveStarRecord); layer presence with no selection, hysteresis band both directions, recede-clears, pick-id packing.

Smoke checklist

  • #focus=star-4731668 deep link → visible, clickable star sphere + InfoCard on arrival.
  • Double-click a star, descend, click the background → the body stays (halo/InfoCard clear).
  • Descend the last ~3 AU: the f32 sprite swim fades behind the stable f64 sphere (the swim itself is the documented sprite precision limit; judge whether the dissolve envelope needs tightening).

🤖 Generated with Claude Code

The close-range field-star sphere gated on selectionRows.select alone,
but the #focus=star-<recordIdx> URL-restore path fills only the focus
slot — so a deep link arrived at an invisible star (the Gaia point
sprite is distance-retired in-shader at that range by design). The
layer's three sites (enabled/draw/drawPick) now share one module-local
focusedStarRow helper: the select slot's star row if select is a star,
else the focus slot's star row. The star-check is per slot, so a
non-star select row does not suppress a star focus row.

Backlog: the braid item is picked up by this change; the remaining
deselect-at-close-range blink (clearSelection nulls both slots) is
re-filed as the narrower presence-by-proximity un-braid, needs-design.

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

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown

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 1d50cd8 Commit Preview URL

Branch Preview URL
Jul 21 2026, 12:14 AM

rulkens and others added 4 commits July 21, 2026 01:25
…ands

watchSelectionRowsSaga's late-arrival gap-fill was keyed on catalogLoaded
alone — the galaxy cloud's commit signal. The Gaia star bin commits via
engineSourceCountReported and never dispatches catalogLoaded, so a
#focus=star-<recordIdx> deep link (whose ref resolves statically at
bootstrap, before the bin loads) left its focus row null forever: camera
arrives, but no star body and no InfoCard. The gap-fill now fires on both
commit pulses; the handler is guarded and idempotent, so extra firings
are no-ops.

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

The close-range star sphere gated on selection rows, so clearing the
selection (background click, Esc) blinked the body out while the camera
still sat at solar-radius range — the sphere is the star's only
close-range geometry (the Gaia sprite is distance-retired in-shader for
its f32 swim). Presence is a fact about where the camera is: the renamed
fieldStarSphereLayer now asks nearestResolvableStar (expanded-box octree
descent, so a star just across a leaf face is still found; positions
reconstructed through the one shared resolveStarRecord formula) for the
nearest star each frame, with a 4px-on / 3.2px-off hysteresis band so
the threshold cannot strobe. Selection now only decorates (halo,
InfoCard); the select-else-focus fallback this replaces is deleted.

Backlog: presence-by-proximity item implemented and removed; the
"resolve predicate duplicated" item died with starResolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rulkens
rulkens marked this pull request as ready for review July 21, 2026 00:25
@rulkens
rulkens merged commit d4cbb2f into main Jul 21, 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