feat(web): React UI v2.0 — Phase 7 responsive (useBreakpoint + TabletShell + MobileShell + sheets)#38
Merged
Merged
Conversation
- 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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Phase 7 of v2.0-rc1 (depends on #34 merged). Adds responsive layout dispatch:
useBreakpoint()hook.mobile <768/tablet 768-1199/desktop ≥1200. SSR-safe. matchMedia change events. 5 tests.<TabletShell>. 2-pane (180px SessionsRail + Canvas) with a right-sliding Monitors sheet. App.tsx switches via useBreakpoint. 3 tests.<MobileShell>(1-pane + bottom tab nav) +<MobileSheet>(Radix Dialog sheet) wrapping SessionsRail / MonitorRail. 7 tests. CSS keyframeasr-sheet-slide-up(gated byprefers-reduced-motion).Verification
npm run typecheckcleannpm run test:unit→ 45 files / 183 tests passTest plan
prefers-reduced-motion: reducesystem setting → sheet still functional, no slide animation🤖 Generated with Claude Code