Repository navigation
feat(web-standalone): the shared link carries the scene, and the address bar follows - #125
Merged
Merged
Conversation
…ess bar follows Share sent Step 1 only; whoever opened the link landed on the candidate list and started over (#123, the open question from #34). buildShareUrl() now adds, each only when it differs from the automatic outcome: region (the locked region's centroid; ranks shift, centroids do not), obs (active observers with weights, keyed by the first 8 hex of the node key, when they differ from the lock's own result), moved (dragged observers), droplink (removed proven links), est (observer or terrain), layers (when touched) and relief (when changed). On load applyDeepLinkParams() keeps the scene in pendingScene and applies layers and relief at once. After discovery restoreSceneRegion() picks the candidate nearest the link's centroid within 15 km, pulls its links under the loading overlay, then applyPendingScene() reweights through reweightLockedCluster(), moves through moveObserver(), removes links through removeProvenLink(), runs the estimate, and names in the editor status whatever no longer applies. The address bar follows the state through history.replaceState from syncControlStates() and the Step 1 inputs, so copying it gives the same link as the button. Verified in the pane: a scene built by hand (one observer unticked, one at weight 0.5, one moved 1 km, one link removed, observer estimate, Links layer off) gives a 306-character link with all seven parts, equal to the address bar. Opening it: the same region locks, 10 observers with the same weights, the move is there, the estimate ran, layers as set, editor status "Restored from the link: 10 observers as in the link, 1 moved." In that run mc-radar returned no proven links (429), so the removed link was reported as not in this cluster any more, the path for a missing item; the found path is not exercised. Co-Authored-By: Claude Fable 5.1 <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.
Closes #123. The open question from #34, decided: the link carries the scene.
Share sent Step 1 only; whoever opened the link landed on the candidate list and started over.
Change
buildShareUrl()adds, each only when it differs from the automatic outcome:region=52.017,4.457obs=KEY8:weight,…moved=KEY8@lat,lon;…droplink=KEY8-KEY8;…est=observerorterrainlayers=…,relief=…On load the scene waits in
pendingScene; layers and relief apply at once. After discoveryrestoreSceneRegion()picks the candidate nearest the link's centroid within 15 km and pulls its links under the loading overlay;applyPendingScene()then reweights throughreweightLockedCluster(), moves throughmoveObserver(), removes links throughremoveProvenLink(), runs the estimate, and names in the editor status whatever no longer applies.The address bar follows the state through
history.replaceState(fromsyncControlStates()and the Step 1 inputs), so copying it gives the same link as the button. README table extended, changelog entry.Verified in the pane
A scene built by hand (one observer unticked, one at weight 0.5, one moved 1 km, one link removed, observer estimate, Links layer off) gives a 306-character link with all seven parts, equal to the address bar. Opening it: the same region locks, 10 observers with the same weights, the move is there, the estimate ran, layers as set, editor status "Restored from the link: 10 observers as in the link, 1 moved."
In that run mc-radar returned no proven links (429), so the removed link was reported as "not in this cluster any more", the path for a missing item. The found path is not exercised.
🤖 Generated with Claude Code