Repository navigation
feat(components): add a mobile menu, and make the compact bar the phone's header - #283
Conversation
Below `lg:` this site had no menu at all: the nav's link row is `hidden lg:flex`, and nothing replaced it. A phone reached only the logo and the map pin — and on `/map`, which renders no footer, those two were the only way out of the page (#275, #234). `MobileMenu` is the trigger and the panel together, because Floating UI's context couples them: splitting the two would lift that state into `Header` for nothing. It is `lg:hidden`, so `lg:` and above keep today's bar exactly. The panel is portaled and `position: fixed`, which is what frees it from the `overflow-hidden h-dvh` column `/map` renders the bar inside, and from the `pointer-events-none` box a splash route wraps the header in. Unlike `Dropdown` and `HeaderNavDropdown` it is focus-trapped: a full-screen panel leaves nothing behind it to reach. The un-stuck nav no longer hides itself below `lg:`. Its committed reason was that it held nothing visible there, which the trigger ends. `common.a11y.menu` is hand-copied from sydevs/SahajCloud#1211's branch, into `server/payload-types.ts` and `lib/translations.en.json`, so this branch typechecks before that one merges. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVPxLDn9tU7ZE36Q1p
A portaled, fixed panel is what makes the `overflow-hidden h-dvh` column on `/map` and the splash route's `pointer-events-none` box irrelevant, so that property is worth a test of its own. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVPxLDn9tU7ZE36Q1p
Four cleanup lenses over the branch. What changed: The panel's four constant style properties become Tailwind classes, leaving Floating UI to supply only `top`. Tailwind can see and purge them, and the comment defending them shrinks with them. `HeaderNavDropdown`'s `className` prop goes with the wrapper it styled: its doc named that wrapper, and nothing passes it. Comments that restated the code, the library, or each other are cut — the `/map` constraint now has one home, and the trigger's accessible name one. Tests that re-asserted the `Button` atom's own matrix, or fired one event in two cases, are folded together. `tests/_helpers/markup.ts` gains `tagFor`, the sibling of `anchorFor` these two specs were hand-rolling. `Header.test.tsx` loses a negative narrowed until it matched nothing: the two controls are already pinned positively on the lines above it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVPxLDn9tU7ZE36Q1p
…r it Three failures the review pass found, each with a test that fails without its fix. **A destination left the panel open.** Vike swaps the page under a header that stays mounted, so taking a row rendered the new page behind a panel that still covered it — with `markOthers` holding that page hidden from assistive tech. **A rotated tablet trapped its viewer.** Crossing `lg:` while open hides the trigger, which is the only pointer-reachable way to close, and collapses its rect so the panel covers the bar as well. The panel now draws a close control, which `common.a11y.close` already names. **The page scrolled behind the panel.** The nav is `position: sticky`, so that flipped its sticky state under an open panel and the panel's own top edge jumped mid-gesture. `FloatingOverlay lockScroll` holds it. `tagFor` matched backwards from the attribute, so an attribute any element may carry could return a slice spanning two of them. It now matches forwards over the tag's own openings. The component's summary claimed the panel reaches every destination the `lg:` row does. It does not: the mega menu's featured articles are editorial picks rather than nav, and the summary now says so. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVPxLDn9tU7ZE36Q1p
sydevs-bot
left a comment
There was a problem hiding this comment.
1 question for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | dbdedbe | Commit Preview URL Branch Preview URL |
Nov 20 2026, 10:36 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the ticket and no larger: one new organism, the un-gating of the un-stuck bar, and part 5's span removal — which was dead code, since main's Header.tsx:198 never passed HeaderNavDropdown's className. tagFor is generic with two callers, so it earns its place. One defect, on iOS: Floating UI's scroll lock puts position: fixed on <body>, which takes the scroll container out from under the sticky nav — #204's mechanism, reached by the one platform this panel exists for. And the criterion the ticket demanded be measured was measured in a Ladle section, where #202's clipping edge cannot exist.
Findings
blocker—MobileMenu.tsx:70—lockScrollbreaks the sticky nav on iOS.should-fix—MobileMenu.stories.tsx:54— the 44×44 measurement cannot reproduce #202 here.should-fix—Header.test.tsx:83— the bar'stouch-target-overlayguard was deleted, not scoped.consider—MobileMenu.tsx:86— the close control duplicates the visible trigger.consider—Header.tsx:189— where the trigger sits in the un-stuck row; the ticket left this to you.
What was checked
Read whole on the branch: MobileMenu.tsx, its three test and story files, Header.tsx, HeaderNavDropdown.tsx, Header.test.tsx, tests/_helpers/markup.ts, and Button.tsx for the branches the trigger and the rows take. Ladder: every new piece is an existing dependency or the repo's own Button/Link; fullWidth and touch-target-overlay were read off Button.tsx rather than assumed. Contract side: common.a11y.menu is PR sydevs/SahajCloud#1216 under issue #1211, and the hand-copied WmWebTranslationsCommonA11YStrings member matches. The scroll lock was read from @floating-ui/[email protected], not from memory. No preview was opened.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Floating UI's `lockScroll` puts `position: fixed; top: -scrollY` on `<body>` on iOS (`enableScrollLock`, @floating-ui/react 0.27.20). That takes the scroll container out from under the `sticky` nav, so the bar leaves the viewport by `scrollY` and `autoUpdate` drags the panel's anchored `top` negative behind it — the close control and the first rows off the top of the screen, on the one platform this panel exists for. #204's mechanism, and jsdom takes the non-iOS branch of that lock, so nothing covered it. The panel takes the whole viewport instead of anchoring under the bar, so nothing measures the nav: `useFloating` is reduced to the interactions context, and `autoUpdate` and the inline `top` are gone. The trigger is covered while the panel is open, which is what the close control was already there for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmSEnAmJiZip3w8Zv
The trigger legitimately brings one `touch-target-overlay` into the compact bar, and `not.toContain` came out of the case for it. The bar is still the clipping edge #202 found, so a count admits the trigger and keeps the guard. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmSEnAmJiZip3w8Zv
The 44x44 criterion was measured in this section, where the viewport edge that clipped #202 to 44x31 cannot exist and the two boxes either side stand in for the real `Logo` and map-pin boxes. The measurement now runs on the preview; the description says what the section is and is not for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmSEnAmJiZip3w8Zv
|
Five findings addressed on
The one check nothing here can run: the panel on a real iOS device. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
Ready to review with sydevs/SahajCloud#1211. It merges after sydevs/SahajCloud#1211 does: auto-merge is armed once that closes, after its contract re-sync lands here. 🤖 sydevs dispatcher |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-design | dbdedbe | Commit Preview URL Branch Preview URL |
Nov 20 2026, 10:36 PM |
|
The session for fix-ci did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
|
@sydevs-bot the earlier sessions stalled on a usage limit — please pick this up again. |
… path `blocks.general.wisdom_sidetext` is declared in SahajCloud's schema but holds no English, so `t()` answered with the key path and all eleven wisdom-style pages painted `blocks.general.wisdom_sidetext` down the block's own edge. Confirmed on the deployed preview at /central-channel. The committed English mirror hid it: WeMeditateWeb#269 hand-copied the key there ahead of its producer, sydevs/SahajCloud#1218, so the translation-key guard resolved it and the tests read real copy. The label is now the caller's. Absent, the ornament simply does not draw, which is what a decorative `aria-hidden` span owes a page over rendering a key path. The prop's docs name the upstream PR, so the default comes back when the key answers. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXwbtu5nZhTXgtw3B2
`pnpm sync:translations` output, replacing this branch's hand-copied `common.a11y.menu` now that sydevs/SahajCloud#1216 has merged and deployed. It also sweeps three drifts the mirror carried on `main`: the retired `common.a11y.opens_in_new_tab`, the reworded `lecture.a11y.untitled_heading`, and three keys indented by four spaces. `blocks.general.wisdom_sidetext` goes with them — the commit before this one stops reading it. The contract check compares the whole of a copied file the PR touches, so a branch that edits the mirror at all owes every one of these. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXwbtu5nZhTXgtw3B2
|
🩹 CI is fixed in
One sweep was load-bearing. Lean gate green: lint, Still yours: Manual verification 1 to 5, item 3 on real iOS especially. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
`layouts/LayoutChrome.tsx` was the only conflict. Both sides moved the same two lists, in opposite directions: this branch lifted `languages` and `socialLinks` into `useSiteNav`, so the footer and the phone menu read one list on both layouts, while #282 replaced the layout's hard-coded social array with `SOCIAL_PROFILES` in `lib/site-identity.ts` and kept `languages` local. Both intents hold: `useSiteNav` stays the one place the layouts read, and it now returns `SOCIAL_PROFILES` rather than a second copy of the same three profiles. `lib/content-seo.ts` claims that constant as the `Organization`'s `sameAs`, so a profile added there reaches the markup, the footer and the menu together. `SOCIAL_PROFILES` is `readonly`, which `Footer` already took, so `SiteNav.socialLinks` and `MobileMenu`'s prop widen to match. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjV1jbvBJgicqpdxHKQ
|
Merged
The body's Types sketch still says Lean gate green on the merge: lint, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
lg:the compact bar is the whole header, 56px instead of 139px, on one 24px gutter in every state.blocks.general.wisdom_sidetextdown its own edge on eleven live pages.Change outline
Components — Header
The banner becomes desktop-only and the sticky row becomes the phone's header. At
lg:the stuck row restates the page band, so its logo holds the banner logo's edge instead of jumping from x 24 to x 160 on stick.HeaderNavDropdown's trigger gains a trailing chevron, since it opens a panel rather than a page.Components — MobileMenu
One component owns the trigger and the panel, because Floating UI's context couples them. The panel opens on a copy of the bar, drawing the same
min-h-14and-mr-2.5, so × replaces ☰ in place.Behaviour — the three things that decide where the panel's DOM may go
Flow — closing
Types
useSiteNavnow owns the language options and the social links, so the footer and the phone menu on both layouts read one list.Logogains the lockup a bar needs.Files
components/organisms/ +├── MobileMenu/ # the trigger, the panel, and its NavRow and MenuFoot └── Header/ └── HeaderNavDropdown.tsx # loses the <span> that carried refs.setReference, and its className propPreview
Narrow the window below 1024px for the phone header and the menu.
/— the home page, a splash route whose header sits insidepointer-events-none/chakras-channels— an ordinaryLayoutChromeroute; scroll it at 1024px and up to see the stuck row keep the banner logo's edge/map—LayoutMap, which renders no footer and puts the bar insideoverflow-hidden h-dvhinlinelockupContract impact
common.a11y.menuis no longer hand-copied: sydevs/SahajCloud#1216 merged and deployed, soserver/payload-types.tstook it from the dispatcher's contract sync andlib/translations.en.jsonnow carries thepnpm sync:translationsoutput.The contract check compares the whole of a copied file a PR touches, not the lines it changed, so editing the mirror at all made three of
main's own drifts this branch's to sweep:common.a11y.opens_in_new_tab, retired upstream, read by nothinglecture.a11y.untitled_heading, reworded upstream toUntitled Lecturefooter_navigation,primary_navigation,skip_to_main, indented by four spacesblocks.general.wisdom_sidetext, hand-copied by #269 ahead of its producerblocks.general.wisdom_sidetextstill holds no English upstream. feat(translations): declare a key's English in the schema, reconciled on boot SahajCloud#1218 declares it and is open. The mirror's hand copy was the only thing resolving it, sotests/guards/translation-keys.test.tspassed while the live read answered with the key path: the deployed preview paintsblocks.general.wisdom_sidetextdown the edge of every wisdom-style block, on all eleven chakra and channel pages.OrnateTextBoxtakes the label from its caller only. Absent, the ornament does not draw, which is what anaria-hiddendecoration owes a page over a key path. The prop's docs name #1218, and the default comes back when the key answers.server/payload-types.tskeeps one hand-restored entry.blocks.general.wisdom_sidetextwas hand-typed by WeMeditateWeb#269, andpnpm types:cmsdrops it again on every run until feat(translations): declare a key's English in the schema, reconciled on boot SahajCloud#1218 merges.Test results
.claude/skills/pr-prep/check.sh— lint,tsc --noEmit, 1537 tests in 152 files, includingmain's axe gate (feat(components): skip link, nav names, page titles and an axe gate #284), on the branch merged with currentmainblockConverters,tests/a11yandtests/guardspnpm sync:translationsre-run after the commit leaves the mirror unchanged, which is what the contract check measuresMeasured with Playwright against a local dev server reading production SahajCloud:
elementFromPointat the × centre on/, a splash routegetBoundingClientRecton<nav>over/chakras-channels, this branch's Cloudflare preview againstmain's deployed Worker, at 1024, 1280 and 1440 — identical at all three:mainThe
lg:row is +12px un-stuck, +11px stuck: the wordmark inmin-h-14wheremaindrew a 16px lotus. #275 records the design pass that asks for it.Manual verification
/, an article page and/map: the bar is one 56px row with the logo, pin and ☰ on the 24px gutter; it is transparent at the top of/and white once scrolled.LayoutChromeroute down a screen or two, then open the menu: the panel covers the viewport with no strip of page above it, and every row and the close control work. Chromium takes the other branch of Floating UI's scroll lock, so nothing here can stand in for this.Notes for reviewer
common.a11y.menu, so ☰'s accessible name readsMenufrom the live global as well as from the mirror.textColorwasdarkin production SahajCloud, which drew the header grey; it is nowlight, like the legacy site. White on the bright sky behind the header is still under 4.5:1 — a scrim behind the header over photo splashes would be a follow-up.xl:only. A fifth featured page fills that row at 1024px, and a grid that cannot fit pushes the document sideways (fix(components): the sticky nav overflows the viewport on mobile #202).bannerlandmark stays on a phone.<header>renders at every width and only its band ismax-lg:hidden:<nav>cannot carrybannerbeside its own role, and fix(components): the sticky nav never pins on a content page #204 rules out a wrapper above it.lg:row's featured pages are not the footer'sinfoPages. Neither nav list carries those today, so on/mapthey stay unreachable; worth its own ticket if it should change.components/atoms/Dropdowndoes not grow — the reviewer picked A, keep them separate. Each popover needs a different positioning strategy, and adopting the atom would movearia-label,aria-expandedandButton's 44×44 guarantee off a real<button>.components/organisms/Header/bar.tsis gone — the reviewer called it unnecessary indirection.min-h-14and-mr-2.5are written at their four call sites, and a test on each row keeps × on ☰./code-review high(the PR review toolkit is not installed) and/simplifyran over the whole branch;/security-reviewran becauseserver/payload-types.tsmatches the trigger, and found nothing. Dismissed: the hand-copiedmenukey (the Contract impact above); the wordmark derived for everyLogovariant and its locale-blind lower-casing (unmeasurable cost, and the casing predates this branch); the hairline under the transparent phone bar (the chosen design); a padding shift at the moment of sticking (measured: none)./simplifyitems left for later: the panel'sfixed inset-0insideFloatingOverlay's own fixed box (unverifiable here on iOS), splittingbandClassNameinto geometry and asurfaceprop, one language row shared withLanguageDropdown, and lazy-loading the panel (≈1.4 KB gz).Detail
Why the panel measures nothing.
lockScrollputsposition: fixed; top: -scrollYon<body>on iOS (enableScrollLock,@floating-ui/[email protected]). That takes the scroll container out from under thestickynav, so the bar leaves the viewport byscrollY, and an anchoredtopfollowed it off the screen. The panel takes the whole viewport instead, anduseFloatingRootContextsupplies only the interactions context —useFloatingwould still compute a position on open and re-render the panel to store it.Why the panel is trapped when the other two popovers are not.
Dropdownpassesmodal={false}so an autocomplete can keep typing, andHeaderNavDropdownmounts no focus manager. Neither covers the page. This one does, so keyboard movement must stay inside it, and the trap is also what marks everything behind it inert.Why the languages are an inline list, not
LanguageDropdown. Its list portals atz-50, under this panel'sz-60overlay.Why the wordmark, not an
aria-label, names the bar's logo.main's axe gate (#284) asks for review of everyaria-labelbeside visible words (label-content-name-mismatch), and the wordmark already says the site's name.How × stays on ☰. The bar row and the panel's copy of it both draw
min-h-14, and both trailing controls-mr-2.5.Header.test.tsxpins the bar's pair,MobileMenu.interaction.test.tsxthe panel's, so moving one row alone is a failing test rather than a silent drift.jsdom's limits, and what stands in. jsdom implements no Tab key and no
matchMedia. "Focus stays inside" is asserted through the other half of the same mechanism — everything outside the portal is inert andaria-hidden— and the close-at-lg:test stands in amatchMediawith achangeit drives.Closes #275
Generated by Claude Code
https://claude.ai/code/session_01Mg9rjXwbtu5nZhTXgtw3B2
Generated by Claude Code