feat: mobile nav popover, offline indicator, Varlock test env - #70
Conversation
🎨 Mobile navbar popover menu with avatar or hamburger trigger 📡 Restyled offline indicator with pulse offline and solid online states 🔧 Varlock test env via .env.test and preload shim, no Bitwarden fetch 🐛 Disabled NavLink prefetch by default to reduce network noise 🧪 Expanded sign-in component and e2e auth test coverage 📝 Synced README badges, nav/offline docs, and Varlock test notes 📦 Regenerated bun.lock and bumped Next, Varlock, Panda, nuqs deps Co-authored-by: Cursor <cursoragent@cursor.com>
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
PR Summary by QodoMobile nav popover, restyled offline indicator, and Varlock test env
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
Code Review by Qodo
1.
|
| <NavLink | ||
| borderPosition="left" | ||
| className={mobileNavigationLinkClassName} | ||
| href="/3d-models" | ||
| > |
There was a problem hiding this comment.
1. Popover stays open on nav 🐞 Bug ≡ Correctness
The new mobile popover menu has no explicit close behavior when a menu item is clicked, so its open/closed state is left entirely to browser defaults. Because the Navbar is mounted via a persistent App Router slot, navigating with these links can leave the popover open over the next page until the user manually dismisses it.
Agent Prompt
### Issue description
The mobile navigation popover (`popover="auto"`) is opened via `popoverTarget`, but none of the internal navigation actions explicitly close it. In an App Router layout where the Navbar persists across navigations, this can leave the popover open after clicking a menu link.
### Issue Context
- Navbar is rendered via a parallel route slot (`{navbar}`) and is therefore typically persistent across navigations.
- The popover links are `NavLink` (client) components, but the server `Navbar` component cannot pass event handlers directly.
### Fix Focus Areas
- src/components/navbar/navbar.tsx[385-431]
- src/components/nav-link/nav-link.tsx[34-95]
### Suggested approach
1. Add a serializable boolean prop to `NavLink` (e.g. `closePopoverOnClick?: boolean`).
2. Inside `NavLinkInner` (client), wrap/compose the click handler:
- call any existing `onClick`
- when `closePopoverOnClick` is true, find the nearest ancestor popover (e.g. `e.currentTarget.closest('[popover]')`) and call `hidePopover()` when available.
3. Set `closePopoverOnClick` on the mobile popover `NavLink`s in `Navbar`.
This avoids passing functions from a server component while ensuring deterministic popover closure.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Extract desktop/mobile nav, auth slots, and shell styles from monolithic navbar. Dismiss mobile popover on nav link click via hidePopover(). Move offline UI into src/components/offline/ with mobile connectivity status in popover. Closes #71 Co-authored-by: Cursor <cursoragent@cursor.com>
Pin Bun 1.4 on Vercel for lockfileVersion 2 installs. Collapse offline UI back to offline-indicator with container-responsive detail. Logo wordmark from xs breakpoint; drop popover mobile connectivity chip. Add xs/xxs Panda breakpoints and ignore .kombai/canvas. Closes #72 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Qodo it does close via the NavLink, which closes the closest popover? The sign out is left uncovered as it has pending state as it's async by nature |
You're right: The sign-out action is different: it is an async |
Summary
🎨 Mobile navbar popover menu with avatar or hamburger trigger below
sm🧩 Navbar split into focused modules (desktop/mobile nav, auth slots, shell styles)
📡 Offline indicator with container-responsive detail; wordmark logo from
xs(480px)🔧 Varlock test env via
.env.testand preload shim — no Bitwarden fetch in tests🐛 Disabled
NavLinkprefetch by default; dismiss popover on nav link click viahidePopover()🚀 Vercel Bun 1.4 config for
bun.locklockfileVersion 2🧪 Navbar component tests + mobile menu e2e; expanded sign-in component and e2e auth coverage
📝 Synced README badges, nav/offline docs, and Varlock test notes
📦 Regenerated
bun.lockand bumped Next, Varlock, Panda, nuqs depsCloses #64
Closes #67
Closes #68
Closes #69
Closes #71
Closes #72
Test plan
bun run test— 67 tests pass without Bitwarden/networkbun run type— passes via pre-commit hookbun run check— Biome/Ultracite clean on staged filesMade with Cursor