Repository navigation
feat(nav): Back says where it goes; a place with one class opens it - #476
Conversation
Area fits are capped at zoom 11.5 rather than 13, so a city whose classes meet a few streets apart (Prague) still shows the city, and going back from a class visibly zooms out. A venue keeps 13 and a class 15. The camera's fallback sheet padding follows the phone sheet's new 356px open stop, and a source pin holds the two equal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every place and class page opens with "Back to …" above its name instead of an unexplained X. Back runs the existing dismiss, so it never leaves the host page: with in-widget history it names the entry it returns to (a push now stamps `from`), and on a fresh deep link it climbs the region tree's real ancestry, passing over the venue and any place holding a single class. A country goes back to the world map, a class opened from a search to the results near that place, and the results themselves get a small arrow beside the search box. An X is left only on the filters over the calendar. A place holding one in-person class opens that class: its row links straight to it, and a link to the place redirects. A climb stamps `climbedFrom`, so leaving the class upward never bounces back into it. On a phone the sheet peeks at 104px (Back, one line of title and "Show more") and opens at 356px; whatever the peek cannot show is hidden rather than sliced. A window 480px tall or less keeps every stop 75px below the top. The three new strings are stand-ins until SahajCloud#1262 ships; the spoken-only "Explore" is retired. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With Back naming where it goes, the faint cards stacked behind the panel no longer carry anything a visitor needs, so they go, with everything that existed to draw them: PeekStrip, the per-level peek width and fade, the strip labels, `dismissDepth` and the depth-0 ancestor ref, and the strip half of the sheet-top mirror. DrawerStack now only needs whether the view has a parent, and Register takes the class's path it already has. The cog moves in to 16px past the panel, the gap the strips no longer need. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Back's label and its press now read one answer, `backStep`, worked out once in DrawerStack; `dismissAction`, `toStackTarget` and `canDismiss` go, and an entry stamped with no `from` climbs rather than stepping back blind. The filter overlay's control carries `overlay`, so NavHeader draws its X and no leaf re-derives it. `collapsed` is never true where the sheet cannot collapse, which had left a widened panel with no header controls. DrawerStack reads the region tree and the feed from the cache instead of observing them, and works out the places a climb passes over once per feed. BackButton looks names up instead of building a Map of every region, the one-class row reuses the counts already in hand, the searched place's short name has one reader, and the sheet's two heights are shared constants rather than literals pinned by reading source. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Back's step re-reads the region tree and the feed when either arrives, so a deep link's label and climb stop naming the plain parent once the caches fill, without observing them. - A place answering the post-event email keeps its page, so the acknowledgement shows instead of redirecting to the class. - A place that redirects to its class no longer frames the map first, so the camera flies once. - A push from a place above no longer counts as leaving the class, and a class reached at its other address still counts as itself. - The calendar, and the loading chrome of search, raise the sheet from its peek like every other header. - A one-class row keeps the list's filters. - The attribution spec pins the sheet's lowest stop again, not a constant. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
Register and Share sit over a class still on screen behind them, so Back there says "Back to class" (a new string, SahajCloud#1262) instead of naming a place, and the class-title lookup Back carried for them goes. The filters sit over the page they narrow, so they close with an X wherever they open, not only over the calendar. Back keeps the Button atom's own padding on both sides, pulled out so its chevron lines up with the title, and stories name each view's real parent page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
No ticket is linked, so this is judged against its body. Back replacing the X is what lets PeekStrip, perLevelPeek, stripLabel and dismissDepth go, and backStep is one answer where the X re-derived its own. That half pays for itself.
The second feature is the one I question. A place redirecting to its lone class needs five new pieces and a state key — climbedFrom, climbedUpFrom, cameUpFrom, sameClass, classIdOf — all to stop a loop the redirect creates. The row shortcut (singleEventPath) gives most of the benefit for one field. Is the redirect worth the rest?
Cross-repo: SahajCloud#1262 sanctions the stand-in but declares three keys. back_to_class, added since, is in no ticket. fallbackLng: 'en' keeps a merge cheap.
Findings
should-fix
- Three answers to "exactly one class", disagreeing under a filter —
navigation.ts:142 singleEventPathspread on after the zod parse —fetch.ts:596REGION_MAX_ZOOMnow means a venue —use-map-controller-real.tsx:58- Streamline, six more:
DrawerStack.tsx:120,Drawer.tsx:381,shared.tsx:62,nav.tsx:87,navigation.ts:169,path.ts:420— ~70 lines
consider
- One "cannot suspend" note became four copies —
shared.tsx:147 - The peek is decided twice —
DrawerStack.tsx:446 - 75px of map above the sheet against the camera's 160px —
DrawerStack.tsx:112, pre-existing - A comment on the wrong line —
fallbacks.tsx:189
What was checked
Read whole on the branch: navigation.ts, DrawerStack.tsx, shared.tsx, fallbacks.tsx, RegionView.tsx, nav.tsx, fetch.ts, use-map-controller-real.tsx, six docs files. The streamliner covered 46 pieces, kept 37; its sketches were re-checked against their callers. Consumers: SahajCloud#1262, both fetchers against RegionListItemSchema. No fixture block or question threads.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The chevron's glyph sits 7.5px inside its box, so with the Button atom's own padding it stood indented from the title. The icon is pulled in by that much, leaving the same hover padding either side of what is drawn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CHANGELOG's Unreleased § Changed took both sides: #478's calendar highlight and #469's palette from main, with this branch's three #476 entries between them, keeping the list in descending PR order. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
It described the Back button two lines above, after the search header gained the expand button between them. `BackButton` returns null without a `backTo`, so the sentence restated the code either way. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
Deleting CloseButton left its explanation copied verbatim into four callers, where there had been one copy and four pointers. It states one property of every control here, so it sits beside the preset they share. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
Its one call site can pass the same three classes through `className`,
which NavHeader's other branch already does two lines up. Both forms reach
the same `slots.header({ className })`.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
NavHeader already holds the control it read, and nothing else renders it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
With the collapse toggle gone its one reader was the Escape ladder, in DrawerStack, where the local value and the snap are both in scope. Escape behaviour is unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
It stopped capping a region when the area fit took AREA_MAX_ZOOM, and the two then read as synonyms beside each other while one means a venue and the other a city, region or country. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
A module-level WeakMap held the passable places against the feed object while the memo that read it was keyed on the location, so `placePathsOf` rebuilt its Map of the region tree on every navigation. `cachesFilled` already changes exactly when either wholesale query updates, so one memo keyed on it keeps the once-per-feed work and drops the cache. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
The sheet leaves 75px of map on a landscape phone while the camera pads for 160, so a framed pin can sit under it there. The number is continuity with main's flat 300px stop on a 375px window, not a second reading of the strip, and it now says so with the trigger to change it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
The body was hidden off the live sheet top while the header's controls switched on the settled snap, so for the length of a drag the row could offer a view's actions over an invisible body. `collapsed` now comes from the same measurement the attribute does; the setter bails out on an unchanged value, so a crossing costs one render rather than a frame. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
…s row getRegion spread the field on after `toListItem`'s schema parse, so that one field never met the schema while getCountries passed it through. Both callers now hand it to `toListItem` and one shape is parsed once. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
loneClassPath reassembled in the view what getRegion had already worked out for every child row, so "exactly one class" had a third answer that read the list differently from the other two. The region now carries `singleEventPath` like its rows do, derived from the same partition, and RegionView reads the field. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqLPupaFArGET849k
|
Merged All 13 critic threads adopted, one commit each, with the SHA in a reply on the thread, now resolved. Nothing rebutted, nothing asked. The streamliner's eight pieces are gone or folded into their one caller, and the body's follow-up list is down to two. One correction to the review body: SahajCloud#1262 declares all four keys, Lean gate ✓ lint, typecheck, 2398 unit. Browser lane ✓ 10 passed. Security review ✓ no findings. Body refreshed. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
#471's type scale and gutter sweep landed on the same headers this branch rewrote, so every hunk keeps both: main's `px-gutter`, `text-xl` title and `HEADER_EDGE` alignment over this branch's NavHeader, NavRow and ExpandSheetButton. HEADER_EDGE is exported, because the controls that end a header row now include nav.tsx's overlay X. CloseButton and CollapseToggle are gone on this branch, so main's edits to them have no target; the X that replaced CloseButton takes the same alignment, and the calendar header drops its pinned close rather than re-adopting `end-gutter`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWs8VXwkzYzNnCSzGP
|
Merged #471's sweep landed on the headers this branch rewrote, so its styling won throughout: Two choices the diff does not explain:
Green on the merge: lint, typecheck, 2405 unit tests, and the browser lane's 10 scenarios. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 69a656e | Nov 25 2026, 03:52 PM |
- `climbDestination` is one search up the stack instead of an index loop. - `passablePlaces` keeps one count and a set of places holding an in-person class, and `indexRegions` takes a readonly list, so no copy is made. - `loneClassExit` matches the class by id through `resolveStack`, which also reads Register and Share, in place of three string helpers. - One reader for a stamped route; shorter docblocks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#476 rewrote tests/browser/navigation.spec.ts: Cambridgeshire now holds one class, so the drill-down is two steps and dismissal is the sheet's own Back button inside the dialog. This branch only renamed the fixture module there. Resolved to main's scenarios with the rename applied: main's three tests and its `backTo` helper, reading `SAHAJCLOUD_EVENT` from `src/mocks/sahajcloud`. `CITY` and the ancestor-strip assertions are gone because main removed the levels they addressed, not because this branch dropped them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWhWJBM1ssxxhXKQyW
#476 replaced the X with the sheet's own Back, dropped the Cambridge level and added a third navigation scenario, leaving the table describing two scenarios under names no spec carries and omitting the third. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWhWJBM1ssxxhXKQyW
#476 rewrote the drawer header: every page below the root opens with "Back to …" and the standalone X went with the peek strips. This branch's submit flow had its own X and its own strip label. - The X moves to `views/nav.tsx` as `CloseButton`, which `NavHeader` now renders instead of repeating its markup. The add-a-class step panel keeps it: its listing stays live behind it, which is what an X means here. - The submit listing is a page in the stack, so its header takes `NavRow` like every other page. `EventHeader`'s `trailing` slot is gone with #476. - `stripLabel` and `stripsRef` go with the strips #476 deleted. - `AGENTS.md` no longer says the filters are the only X. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVcSBPwJ51Gv7CQNHL
* refactor(mocks): name the fake SahajCloud for what it is "wire" (as on the network) was not legible. src/mocks/wire.ts becomes src/mocks/sahajcloud.ts, its fixture export wire becomes sahajCloud, and the docs that named it follow. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mocks): finish the rename through the lane's identifiers The module and its fixture export were renamed, but four names still called the fake backend "wire": WIRE_API_KEY, WIRE_EVENT, wireEventFeature and the spec's serveWire. So playwright.config.ts imported WIRE_API_KEY from sahajcloud. The header's "⚠ Wire shape" and docs/testing.md's "The fixtures are wire shape" are the other, right sense — the network shape a fetcher parses — and stay. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYYwfAJAz63CzUU8A6 * fix(mocks): inline the answer type at its one reader WireAnswer was exported and read once, in the signature a line below it. Nothing outside the file imported it, and it carried the word the rename retires. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYYwfAJAz63CzUU8A6 * docs(testing): name the browser lane's navigation scenarios as they run #476 replaced the X with the sheet's own Back, dropped the Cambridge level and added a third navigation scenario, leaving the table describing two scenarios under names no spec carries and omitting the third. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWhWJBM1ssxxhXKQyW --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
- The inline column takes #476's header: Back names where it goes, above the view's own controls. `NavHeader` passes `isPlace` through, so a region's title still gives way to the page heading inline. - "Close map" renders beside the cog now that the peek strips are gone, and reads the sheet's live top from a wrapper the sheet-top loop also writes. - The inline embed reads #481's fixture names (`sahajcloud.ts`, `sahajcloud-demo.ts`); the branch's own copies of the Ladle backend and the demo atlas give way to main's. - The deep-link scenarios assert #476's climb past one-class places, inline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Change outline
Flow — what Back does
One answer,
backStep, now gives both the label and the press. Before, the X re-derived its target and nothing named it.Every push stamps where it left, so history can be named:
Components — the header
Behaviour — a place with one class opens it
Components — the sheet
Preview
Preview pending: the Workers preview for this PR is published by CI. Once it is up, open these on a phone width (~390px) and on desktop:
?atlas=/gb: "Back to the world map"?atlas=/<country>/<region>/<city>/<venue>/<id>: Back names the city, not the venueLocally:
pnpm build && pnpm review:embed, then/__review/full-map.htmlat 390×844, 360×640 and 667×375.Test results
.claude/skills/pr-prep/check.sh): ✓ lint, typecheck, 2398 unit testspnpm test:browser): ✓ 10 passed, including 3 navigation scenarios (history Back, deep-link climb past one-class places, one-class redirect with no bounce)Modal.focus.test.tsxfailed once in two of five full-lane runs and passed alone; it touches nothing on this branch.Manual verification
Notes for reviewer
common.chrome.back_to_class,back_to_world_map,back_to_results_near,show_more) are hand-added totranslations.en.jsonas stand-ins. Once production holds them,pnpm sync:translations --writereplaces them.origin/mainis merged in (style(calendar): today's highlight takes the solid button's dark green #478, style(theme): warm greys, a green default, and cluster counts that read #469). CHANGELOG's § Changed was the only conflict, resolved by keeping both sides in descending PR order — which is also why this PR had no check runs before.DrawerStack,FullInterface) and feat(widget): submit or correct a class, and opt into a mailing list #318 (DrawerStack,views/shared.tsx).src/config/api/fetch.tsandsrc/lib/shape/path.ts. No findings either time.fromandclimbedFromare host-writable, but they only feed label text and comparisons, and the press usesnavigate(-1):loneClassExitreturns an enum, so host-written state picks a branch and never a target.singleEventPathreaches<Navigate to>and the row's href with the samesafePathgating as before, and now meets a schema the subregion row used to bypass.Detail
Review findings left for follow-up:
entryName.passablePlacesreads the whole feed, while the row shortcut and the page redirect read the filtered one. So a climb still passes over a place that holds one class unfiltered, even where a filter has widened its list. Pre-existing, and the climb is structural rather than a view of the list.Fixed from review:
collapsedstayed true on a widened panel, which hid its header controls.getRegionhad already worked out per row, so "exactly one class" had a third reading. The region carriessingleEventPathnow.singleEventPathwas spread onto a subregion row after its schema parse, so that one field never met the schema.REGION_MAX_ZOOMcapped a venue rather than a region, and read as a synonym of the newAREA_MAX_ZOOM.shortcut:line against the camera's 160px reserve.loneClassPath,climbedUpFrom,cameUpFrom,viewRegion,passableFor,OverlayCloseButton,DrawerHeader'sstackedandDrawerControl'scanCollapse.Translation stand-in, not dismissed:
translations.en.jsonis hand-edited only for the four keys SahajCloud#1262 adds, as #466 does.🤖 Generated with Claude Code