Skip to content

fix(panes): gate pane-grid collapse on viewport, not device - #2682

Merged
2witstudios merged 1 commit into
masterfrom
pu/ipad-split-panes
Sep 18, 2026
Merged

2witstudios merged 1 commit into
masterfrom
pu/ipad-split-panes

Conversation

@2witstudios

Copy link
Copy Markdown
Owner

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

SessionPanes gated the collapsed layout on useMobile(), which deliberately folds iPad into "mobile" (useMobile.ts returns isSmallViewport || 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:

  • An iPad at full width renders the real resizable grid and gets split controls.
  • A genuinely narrow window (phone, or an iPad squeezed by Split View / Slide Over) still collapses, because the breakpoint follows the real window width.

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

  • All 153 tests in src/components/agents/panes/__tests__/ pass (incl. the 18 SessionPanes layout tests; test mock updated from useMobile → useBreakpoint)
  • bun run --filter 'web' typecheck clean
  • ESLint clean on both touched files

Notes

UI change — iPad screenshots can be attached if wanted. No DB migrations, no config changes.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ca5bd588-42f9-4c11-88b9-4f1603d4b747

📥 Commits

Reviewing files that changed from the base of the PR and between 4dbc6ab and ad62ca7.

📒 Files selected for processing (2)
  • apps/web/src/components/agents/panes/SessionPanes.tsx
  • apps/web/src/components/agents/panes/__tests__/SessionPanes.test.tsx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@2witstudios
2witstudios merged commit f9093c2 into master Sep 18, 2026
4 checks passed
@2witstudios
2witstudios deleted the pu/ipad-split-panes branch September 23, 2026 04:03
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