Skip to content

explorer: centralize globe-hash writes behind writeGlobeHash() (#208 PR4a)#288

Open
rdhyee wants to merge 1 commit into
isamplesorg:mainfrom
rdhyee:promote/pr4a-writeglobehash
Open

explorer: centralize globe-hash writes behind writeGlobeHash() (#208 PR4a)#288
rdhyee wants to merge 1 commit into
isamplesorg:mainfrom
rdhyee:promote/pr4a-writeglobehash

Conversation

@rdhyee

@rdhyee rdhyee commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

#208 PR4a — single URL-hash writer (writeGlobeHash())

Promotes refactor step PR4a (already merged to the fork as rdhyee#13, cce4d1f)
to upstream, continuing the #249 explorer extraction shipped in #287.

Addresses #208 smell 1a: introduces writeGlobeHash(viewer, {replace, force})
as the only place that writes the globe hash, and migrates all 11
history.{replace,push}State(buildHash(viewer)) call sites to it. Behavior-neutral.

The boundary bakes the _suppressHashWrite gate into one place. Per the
Codex-verified per-site matrix (REFACTOR_PR4_PLAN.md §1):

  • 3 settled-camera writers honor the gate (camera.changed early/late, moveEnd) → writeGlobeHash(viewer)
  • 8 explicit user-action writers were already ungated and keep writing via force:true (map sample/cluster click, table row click, enter/exit point mode, source-filter selection-invalidation, Share button)
  • replace:false for the 4 push sites (map/cluster click, enter/exit mode)

#208 smell 2 (dual mode) was already resolved earlier; not touched here.
buildHash extraction and the camera.changed/moveEnd reconcile (smell 1b) are
deferred to PR4b.

Verification

Verified behavior-neutral on the fork: smoke 4, characterization 7, url-roundtrip 5
(incl. #203 Bug B, #205 sub-threshold moveEnd, cross-context push/replace round-trip)
all green; render clean. Cherry-pick onto upstream/main (#287) applied with zero conflicts.

🤖 Generated with Claude Code

…ash() (#13)

Single URL-hash writer (issue isamplesorg#208 smell 1a). Introduces
writeGlobeHash(viewer, {replace, force}) as the only place that writes the
globe hash, and migrates all 11 history.{replace,push}State(buildHash(viewer))
call sites to it. Behavior-neutral.

The boundary bakes the `_suppressHashWrite` gate into one place. Per the
Codex-verified per-site matrix (REFACTOR_PR4_PLAN.md §1):
- 3 settled-camera writers honor the gate (camera.changed early/late, moveEnd)
  -> writeGlobeHash(viewer)
- 8 explicit user-action writers were already ungated and keep writing via
  force:true (map sample/cluster click, table row click, enter/exit point
  mode, source-filter selection-invalidation, Share button)
- replace:false for the 4 push sites (map/cluster click, enter/exit mode)

isamplesorg#208 smell 2 (dual `mode`) was already resolved earlier; not touched here.
buildHash extraction and the camera.changed/moveEnd reconcile (smell 1b) are
deferred to PR4b per the plan.

Verified behavior-neutral: smoke 4, characterization 7, url-roundtrip 5
(incl. isamplesorg#203 Bug B, isamplesorg#205 sub-threshold moveEnd, cross-context push/replace
round-trip) all green; render clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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