Skip to content

feat(web-standalone): the shared link carries the scene, and the address bar follows - #125

Merged
khagele merged 1 commit into
mainfrom
share-scene
Sep 7, 2026
Merged

khagele merged 1 commit into
mainfrom
share-scene

Conversation

@khagele

@khagele khagele commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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:

param carries
region=52.017,4.457 the locked region's centroid (ranks shift, centroids do not)
obs=KEY8:weight,… active observers with weights, when they differ from the lock's own result
moved=KEY8@lat,lon;… dragged observers
droplink=KEY8-KEY8;… removed proven links
est=observer or terrain which estimate ran
layers=…, relief=… the layer switch when touched, the slider when changed

On load the scene waits in pendingScene; layers and relief apply at once. After discovery restoreSceneRegion() picks the candidate nearest the link's centroid within 15 km and pulls its links under the loading overlay; applyPendingScene() then 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. 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

…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>
@khagele
khagele merged commit fd9f7e1 into main Sep 7, 2026
2 checks passed
@khagele
khagele deleted the share-scene branch September 7, 2026 17:39
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.

A shared link drops everything after Step 1: region, edits, moved repeaters, estimate

1 participant