fix(panes): gate pane-grid collapse on viewport, not device - #2682
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 38 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
iPads could not use split panes in agent workspaces — even a 13" iPad Pro in landscape with plenty of room. Every iPad got the collapsed phone layout: one full-bleed pane with a strip switcher, no split controls.
Root cause
SessionPanesgated the collapsed layout onuseMobile(), which deliberately folds iPad into "mobile" (useMobile.tsreturnsisSmallViewport || isTablet). A device-identity decision was used where the component's own comment justified a width decision ("a phone cannot hold a split grid" — that's about 375px, not about iPads).Fix
The collapse is now keyed to the actual viewport —
useBreakpoint('(max-width: 767px)')— not device identity:The stored pane tree was never touched by the old layout, so splits made on desktop were already intact — iPads just could not create or see them laid out. Now they can.
Verification
src/components/agents/panes/__tests__/pass (incl. the 18SessionPaneslayout tests; test mock updated fromuseMobile→useBreakpoint)bun run --filter 'web' typecheckcleanNotes
UI change — iPad screenshots can be attached if wanted. No DB migrations, no config changes.