Repository navigation
fix(embed): honour the script's atlas default under routing=path - #250
Merged
Merged
Conversation
Path mode always booted at the prefix root, so a host's `atlas=` default was ignored: the page's own address is the root view, and mountDecision has no "nobody asked" state there. The default now becomes the home route, which FullInterface already navigates to once when the interface opens — the mechanism the client record's home region uses — and it outranks that region. Query mode is unchanged: the default was already its boot route. The WordPress plugin's "Atlas page opens at" setting depends on this; most Atlas pages run path routing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying sahajatlas-design with
|
| Latest commit: |
7520dba
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0ecbf954.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://fix-path-mode-start-route.sahajatlas-design.pages.dev |
Deploying sahajatlas with
|
| Latest commit: |
7520dba
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9cdfb03c.sahajatlas.pages.dev |
| Branch Preview URL: | https://fix-path-mode-start-route.sahajatlas.pages.dev |
Contributor
Author
|
The WordPress browser lane confirms the fix. The
The |
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.
Summary
atlas=default now works underrouting=path. Before, it was ignored there, and the page always opened on the world list. Now the widget navigates to the default the first time the interface opens. This is the same mechanism that already opens a client record's home region. The default outranks the region, and Back returns to the world list.docs/embedding.mdandCHANGELOG.mddescribe the path-mode behaviour.Why now: the WordPress plugin's new "Atlas page opens at" setting (sydevs/SahajAtlasWordpress, for 0.3.0) sends
atlas=. Atlas pages run path routing whenever they have pretty permalinks and are registered, so without this the setting would do nothing on most sites. The plugin's browser lane caught it: the plugin printedauto.js?…&atlas=/gb&routing=path, and the page still opened on the world list.Changes
src/lib/shape/routing.ts: newhomePathFor(). In path mode it returns the script's default; otherwise the client record's region. A route that came from the page is never treated as a default.src/App.tsx:homePathcomes fromhomePathFor().src/views/FullInterface.tsx: comment only.Test results
pnpm vitest run src/lib/shape/routing.test.ts: 90 passed, 5 of them new..claude/skills/pr-prep/check.shpassed.pnpm buildpassed, including the CSS-scoping and no-sourcemap checks.start-routecell will run against this PR's Cloudflare preview, with the result posted here.Notes for reviewer
No other in-tree host sends
atlas=withrouting=path: WeMeditateWeb'slib/atlas-embed.tssends onlyrouting: 'path'. So no existing host's behaviour changes.🤖 Generated with Claude Code