Skip to content

feat(server/ui): mobile-friendly layout with a hamburger sidebar drawer - #76

Open
louisreingold wants to merge 1 commit into
masterfrom
ui-mobile-drawer
Open

feat(server/ui): mobile-friendly layout with a hamburger sidebar drawer#76
louisreingold wants to merge 1 commit into
masterfrom
ui-mobile-drawer

Conversation

@louisreingold

Copy link
Copy Markdown
Member

What

Makes the devbox server UI mobile-friendly by turning the sidebar into a hamburger drawer on narrow screens (≤760px).

Previously, mobile used a one-pane-at-a-time swap: selecting a session hid the sidebar entirely, and the only way back to the list was a back button that deselected the session — unmounting the session view and killing its live SSE stream every time.

How it works now

  • The main pane (session view / empty state) always fills the viewport on mobile.
  • The sidebar slides in from the left as an off-canvas drawer over it, with a scrim behind.
  • Open: ☰ button in the session header bar (and on the empty pane). Close: tap the scrim, the new ✕ in the sidebar header, or pick a session.
  • The session view stays mounted while the drawer is open, so the live stream keeps flowing while you browse envs/sessions.
  • The drawer starts open on phone-sized viewports, so first load shows the env/session list rather than an empty pane.
  • Desktop is untouched — the two-column grid renders exactly as before; the drawer classes are inert there.

Details

  • Modal z-index raised above the drawer (30 > 20) so Settings / Health / New Env opened from the drawer are usable.
  • 100dvh heights (with 100vh fallback) so the composer isn't hidden behind mobile browser chrome.
  • 16px form inputs on mobile to stop iOS Safari's focus-zoom; modals capped at 92dvh with internal scroll.
  • Generalized the mobile-only visibility class (.back.mobile-only).

UI-only change (ui/app.js + ui/style.css) — served fresh from disk, no server restart needed. node --check passes on app.js.

🤖 Generated with Claude Code

On narrow screens (<=760px) the sidebar is now an off-canvas drawer over
an always-full-screen main pane, replacing the old one-pane-at-a-time
swap (which unmounted the session view — killing its live stream — every
time you went back to the list).

- Hamburger button in the session bar and empty pane opens the drawer;
  scrim tap, a new X in the sidebar header, or picking a session closes
  it. The session view stays mounted underneath, so SSE keeps flowing.
- Drawer starts open on phone-sized viewports so first load shows the
  env/session list; inert on desktop (grid layout unchanged).
- Modal z-index raised above the drawer so Settings/Health/New Env
  opened from it are usable.
- 100dvh heights so the composer isn't hidden behind mobile browser
  chrome; 16px inputs on mobile to stop iOS focus-zoom; modals capped
  at 92dvh with internal scroll.
- Generalized the mobile-only visibility class (.back -> .mobile-only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant