Skip to content

feat(viewer): responsive mobile layout with drawer sidebar#9

Merged
benvinegar merged 1 commit into
mainfrom
claude/keen-shannon-88mhth
Jun 12, 2026
Merged

feat(viewer): responsive mobile layout with drawer sidebar#9
benvinegar merged 1 commit into
mainfrom
claude/keen-shannon-88mhth

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Add responsive design for phone widths (≤700px) that collapses the sidebar into an off-canvas drawer behind a slim top bar, while the stream takes the full width. This fixes layout breakage on mobile devices and ensures hover-only actions remain accessible on narrow or touch screens.

Key changes:

  • Rename #live to .livedot class to support multiple live indicators (top bar + sidebar)
  • Add .topbar header with hamburger menu button and unread indicator dot
  • Implement off-canvas drawer pattern: sidebar slides in from left with scrim overlay, toggled by menu button
  • Auto-close drawer when selecting a session
  • Make hover-revealed card actions (open/delete) always visible at narrow widths or on touch devices
  • Add setLive() helper to update all live indicators at once
  • Update e2e tests to verify mobile layout behavior and drawer interaction

Implementation details:

  • Media query at 700px breakpoint switches layout from side-by-side to stacked
  • Sidebar uses position: fixed with transform: translateX(-105%) for smooth off-canvas animation
  • Scrim (semi-transparent overlay) enables closing drawer by clicking outside
  • Menu dot shows when unread sessions exist, providing visual feedback
  • Touch-friendly: actions stay visible without hover, improving usability on mobile

https://claude.ai/code/session_01SqNrCv6FbdqxLXeaNhjNe6

@benvinegar benvinegar force-pushed the claude/keen-shannon-88mhth branch from 8b32558 to 3ab7268 Compare June 12, 2026 12:01
Below 700px the fixed 248px aside left ~120px for the stream and the
layout broke. The sidebar now slides in as an off-canvas drawer behind
a slim top bar (hamburger with an unread dot, brand, live indicator),
the stream takes the full width, and hover-only actions (card
open/delete, session delete) stay visible on narrow or touch screens.

https://claude.ai/code/session_01SqNrCv6FbdqxLXeaNhjNe6
@benvinegar benvinegar force-pushed the claude/keen-shannon-88mhth branch from 3ab7268 to 2335ff7 Compare June 12, 2026 12:36
@benvinegar benvinegar merged commit e7d0005 into main Jun 12, 2026
6 checks passed
benvinegar pushed a commit that referenced this pull request Jun 12, 2026
… the Solid viewer

main changed the old inline-JS viewer this branch replaced; the conflict
resolution re-implements both changes in viewer/src/:

- optimistic comment echo (pending until POST confirms, deduped against
  the SSE refetch by id), failed sends restore the input with a toast
- new snippets only auto-scroll near the bottom; otherwise the
  "new snippet" pill offers the jump
- unread activity badges the tab title; returning to the tab clears the
  selected session; hidden-tab activity counts as away
- SSE reconnect resyncs the session list, snippets, and comments
- sidebar collapses into an off-canvas drawer behind a top bar below
  700px; hover-only actions stay visible on narrow/touch screens

All 10 e2e tests (5 new from main) pass on chromium.

https://claude.ai/code/session_01ApwZm1DNZoCQTJHha19thS
benvinegar added a commit that referenced this pull request Jun 12, 2026
…ild (#11)

Rewrites the viewer from inline vanilla JS to Solid components in
viewer/src/, typed against server/types.ts. Vite + vite-plugin-singlefile
builds one self-contained viewer/dist/index.html, so both runtimes keep
serving the viewer as a single in-memory document — no static-asset
routes; auth and withOrigin rewriting unchanged.

Includes the re-implementation of main's feedback-loop fixes (#8) and
mobile drawer (#9) in the Solid viewer; the full e2e suite covers both.
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.

2 participants