explorer: centralize globe-hash writes behind writeGlobeHash() (#208 PR4a)#288
Open
rdhyee wants to merge 1 commit into
Open
explorer: centralize globe-hash writes behind writeGlobeHash() (#208 PR4a)#288rdhyee wants to merge 1 commit into
rdhyee wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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
_suppressHashWritegate into one place. Per theCodex-verified per-site matrix (
REFACTOR_PR4_PLAN.md§1):writeGlobeHash(viewer)force:true(map sample/cluster click, table row click, enter/exit point mode, source-filter selection-invalidation, Share button)replace:falsefor the 4 push sites (map/cluster click, enter/exit mode)#208 smell 2 (dual
mode) was already resolved earlier; not touched here.buildHashextraction and the camera.changed/moveEnd reconcile (smell 1b) aredeferred 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