Skip to content

feat(web): React UI v2.0 — Phase 7 (responsive: useBreakpoint + TabletShell + MobileShell + sheets)#35

Closed
aksOps wants to merge 3 commits into
feat/web-v2-phase-0-to-6from
feat/web-v2-phase-7
Closed

feat(web): React UI v2.0 — Phase 7 (responsive: useBreakpoint + TabletShell + MobileShell + sheets)#35
aksOps wants to merge 3 commits into
feat/web-v2-phase-0-to-6from
feat/web-v2-phase-7

Conversation

@aksOps

@aksOps aksOps commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 7 of v2.0-rc1. Adds responsive layout dispatch:

  • Task 57useBreakpoint() hook. mobile <768 / tablet 768-1199 / desktop ≥1200. SSR-safe. matchMedia change events. 5 tests.
  • Task 58<TabletShell>. 2-pane (180px SessionsRail + Canvas) with a right-sliding Monitors sheet. App.tsx switches via useBreakpoint. 3 tests.
  • Tasks 59+60+61<MobileShell> (1-pane + bottom tab nav) + <MobileSheet> (Radix Dialog sheet) wrapping SessionsRail / MonitorRail. 7 tests. CSS keyframe asr-sheet-slide-up (gated by prefers-reduced-motion).

Total: 15 new tests, 183 passing in the file.

Stacked PRs

Based on #34 (Phases 0-6). After #34 merges, this PR will retarget to main.

Verification

  • npm run typecheck clean
  • npm run test:unit → 45 files / 183 tests pass
  • Manual: resize browser window across 768 / 1200 breakpoints — TabletShell and MobileShell take over correctly.

Test plan

  • Resize at 480×800 → MobileShell (3-tab bottom nav)
  • Resize at 1000×800 → TabletShell (Monitors button opens sheet)
  • Resize at 1440×900 → DesktopShell (3-pane unchanged)
  • prefers-reduced-motion: reduce system setting → sheet still functional, no slide animation

🤖 Generated with Claude Code

aksOps added 3 commits May 16, 2026 09:36
- web/src/state/useBreakpoint.ts: returns 'mobile' (<768px),
  'tablet' (768-1199), or 'desktop' (>=1200) via matchMedia. SSR-safe:
  returns 'desktop' when window or matchMedia is unavailable. Listens
  for change events on both breakpoint queries.
- web/tests/component/useBreakpoint.test.tsx: 5 tests covering each
  bucket, change-event updates, and SSR fallback.

Verified: typecheck clean; 5/5 hook tests pass.
- web/src/shell/TabletShell.tsx: 2-pane grid (180px SessionsRail +
  Canvas) with a 'Monitors' button that opens MonitorRail in a
  Radix right-sliding sheet. data-shell="tablet" marker for tests.
- web/src/App.tsx: useBreakpoint() picks TabletShell at 768-1199px;
  desktop layout unchanged.
- web/tests/component/TabletShell.test.tsx: 3 tests (shell marker,
  monitors button, sheet open).

Verified: vitest 43 files / 176 tests pass.
…ors)

- web/src/shell/MobileSheet.tsx: Radix Dialog wrapped as a
  bottom-anchored sheet. Slide-up animation gated by
  prefers-reduced-motion (CSS keyframe asr-sheet-slide-up).
  data-mobile-sheet="<id>" marker for tests.
- web/src/shell/MobileShell.tsx: single-pane SessionCanvas + 3-tab
  bottom nav (Sessions / Canvas / Monitors). Sessions and Monitors
  tap opens MobileSheet over SessionsRail / MonitorRail respectively.
  Selecting a session inside a sheet closes it.
- web/src/styles/global.css: asr-sheet-slide-up keyframe.
- web/src/App.tsx: breakpoint==='mobile' branch mounts MobileShell.
- Tests: MobileShell (4) + MobileSheet (3).

Verified: typecheck clean; vitest 45 files / 183 tests pass.
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