Skip to content

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

Merged
aksOps merged 3 commits into
mainfrom
feat/web-v2-phase-7
May 16, 2026
Merged

feat(web): React UI v2.0 — Phase 7 responsive (useBreakpoint + TabletShell + MobileShell + sheets)#38
aksOps merged 3 commits into
mainfrom
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 (depends on #34 merged). 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).

Verification

  • npm run typecheck clean
  • npm run test:unit → 45 files / 183 tests pass

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:45
- 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.
@sonarqubecloud

Copy link
Copy Markdown

@aksOps aksOps merged commit 7dfce8c into main May 16, 2026
9 checks passed
@aksOps aksOps deleted the feat/web-v2-phase-7 branch May 16, 2026 10:51
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