Skip to content

OPE-279 Add tablet split view for Home and Settings - #356

Merged
ivanfenenko merged 4 commits into
mainfrom
feature/ope-279-tablet-split-view
Oct 10, 2026
Merged

ivanfenenko merged 4 commits into
mainfrom
feature/ope-279-tablet-split-view

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • On regular width (iPad) and windows ≥ 720dp (Android), Home renders the session list beside the selected Session Chat, and Settings renders its list beside the selected sub-screen. Tapping a row swaps the detail pane instead of pushing.
  • A sidebar button in the detail pane top bar hides and shows the leading pane in both states; with the pane hidden the content centers on the existing 720pt readable column.
  • The divider carries a grab handle: drag resizes the pane between 280 and 480, releasing below 220 snaps it closed, tap toggles. The handle is hidden while collapsed.
  • Pane width and collapsed state persist per screen (SplitPanePreferences, cleared by Clear All Data). Compact widths keep the current stacked navigation.
  • New shared sidebar icon (Lucide panel-left) and an OpenCodeSplitPane design-system component with a Component Gallery entry on both platforms.
  • Follow-up fixes from iPad testing, both verified on the simulator with before/after recordings: Session Chat keeps its view model across push and pop (no reload flash or list jump when returning from Session Context or Changes), opening a session no longer paints an empty first frame or jumps when the branch pill appears, and the selected session row draws an inset rounded highlight with the adjacent dividers hidden.
  • Design was settled with a browser prototype; source is on prototype/ope-279-tablet-split-view.
iPad Home, pane openiPad Home, collapsed
iPad Settings splitiPad Settings after drag snapped closed
Android tablet Home splitAndroid tablet Home, collapsed
Android tablet SettingsAndroid tablet portrait Settings
iPhone unchangedAndroid phone unchanged

Checks

  • iOS: xcodebuild test on iPad Pro 13-inch (M4) simulator: 1719 tests in 180 suites passed. Build also verified on an iPhone destination.
  • Android: ./gradlew :app:assembleDebug :app:testDebugUnitTest: BUILD SUCCESSFUL, 192 suites, 0 failures. ktlintCheck adds no new violations in changed files (pre-existing ones remain, soft-failed in CI).
  • Manual: real-app screenshots above against a local opencode serve with seeded sessions on iPad Pro 13 and Pixel Tablet emulators.

Linear

  • OPE-279

Risks / Follow-ups

  • Bugbot findings on the first commit (Settings handoff on narrowing, developer-tools lock in the Settings pane, stale Home selection after Clear All Data, RTL drag) are fixed in b155ad9 with unit tests.
  • Android: screens the chat pushes (context, changes, child session, tool group, terminal) open as full-screen routes over the split; iOS pushes them inside the detail pane. Follow-up: Session Chat lifecycle in the split view #357.
  • Left-edge swipe, keyboard shortcuts and the large-phone-landscape decision: follow-up Tablet input polish #358. Changes and Terminals split views: follow-up Changes and Terminals split views #359.
  • iOS tests: the gitignored OpenCode MobileTests/GeneratedSnapshotEvidence folder contains stale files that break test builds locally; moved aside for the run. Not part of this change.
  • Phones in landscape wider than the threshold (iPhone Max on iOS, large Android phones) also get the split.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.


Note

Medium Risk
Large navigation and layout changes affect how sessions and settings open across form factors; Android still pushes some chat destinations as full-screen routes over the split (documented platform gap).

Overview
Adds a tablet / wide-window split layout on Android (≥720dp) and iOS (regular width) so Home shows the session list beside an embedded chat, and Settings shows its menu beside the selected sub-screen instead of always stacking routes.

Introduces shared OpenCodeSplitPane (resizable/collapsible leading pane, divider handle, sidebar toggle in detail top bars via openCodeDetailLeading / detailControl) with SplitPanePreferences persisting width and collapsed state per screen (cleared on Clear All Data). Navigation is refactored to swap detail panes in split mode while preserving stacked navigation on compact widths, including handoff when the window narrows (selection → push route on Android, navigationPath on iOS). Home split chat uses a one-entry decorated back stack so session ViewModels scope like a popped route; list rows gain selection highlighting. Settings detail routes are centralized (SettingsDetail, settingsDetailContent on Android). Adds sidebar icon, Component Gallery demo, product analytics for sidebar toggle, and unit tests for layout/preferences codecs.

Reviewed by Cursor Bugbot for commit 6d06ffe. Bugbot is set up for automated code reviews on this repo. Configure here.

On regular width (iPad) and windows 720dp or wider (Android), Home shows the
session list beside the selected Session Chat, and Settings shows its list
beside the selected sub-screen. A sidebar button in the detail top bar hides
and shows the leading pane; the divider carries a grab handle that resizes
the pane (280-480), snaps closed below 220, and toggles on tap. Pane width and
collapsed state persist per screen. Compact widths keep stacked navigation.

Adds the `sidebar` Lucide icon to the shared catalog and an OpenCodeSplitPane
component with a Component Gallery entry on both platforms.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@linear-code

linear-code Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
OPE-279 Tablet split view for Home and Settings

On wide screens (iPad regular width, Android expanded width class) Home and Settings show two panes side by side: the existing phone Home list (top bar, session rows, project scope dock) or Settings list on the left, and Session Chat or the Settings sub-screen on the right. The left pane can be hidden so the content column takes focus and centers.

Decision (prototype, 2026-10-10): split view with a persistent sidebar toggle in the content pane top bar, plus a divider grab handle as a bonus: drag resizes the pane (280–480pt), dragging below 220pt snaps it closed, tap toggles. When the pane is collapsed the handle disappears; the top-bar button is the way back, with an optional left-edge swipe. Pane width and collapsed state are remembered per screen. Phones and compact widths keep the current stacked navigation. Builds on the shared compact/regular width work from OPE-232.

Acceptance:

  • Regular/expanded width: Home shows session list left and the selected Session Chat right; tapping a row swaps the right pane instead of pushing.
  • Regular/expanded width: Settings shows the settings list left and the selected sub-screen right.
  • Sidebar toggle button at the leading edge of the right pane top bar, present in both states; collapsing centers the content at the readable column width.
  • Divider handle: drag to resize within min/max, snap closed below threshold, tap to toggle; hidden while collapsed.
  • Pane width and collapsed state persist across launches, per screen.
  • Compact width unchanged.

Remaining:

  • ☐ iOS split container for Home and Settings
  • ☐ Android split container for Home and Settings
  • ☐ Shared layout state (width, collapsed) persistence and tests

Review in Linear

@ivanfenenko
ivanfenenko marked this pull request as ready for review October 10, 2026 12:37
@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6d06ffe. Configure here.

ivanfenenko and others added 2 commits October 10, 2026 16:02
Returning from Session Context, Changes, a tool group or a child session
rebuilt the chat view model inside .task(id:), which reloaded the model
catalog and the timeline and made the list jump. The view now keeps its view
model while the session identity is unchanged and only resumes observation on
reappear. Opening a session no longer paints an empty first frame from the
warm path, and the bottom pin survives the top pill inset change.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Plain OpenCodeListItem rows draw selection and press highlights as a rounded
shape inset 8 horizontally and 2 vertically, keeping row geometry. The Home
session list skips the divider directly above and below the selected row.
Gallery entries show a selected plain row on both platforms.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
- Settings hands its selected sub-screen to stacked navigation when the
  window narrows, like Home does for the open chat (both platforms).
- The iOS Settings trailing pane falls back to Servers when developer tools
  are locked; the rule is a shared SettingsDetail helper on both platforms.
- Home clears the selected session when the active profile changes or is
  cleared, and when a listed session disappears; Android bumps the home reset
  generation on profile-cleared too.
- The iOS divider drag respects right-to-left layout.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

This branch was previously deployed

2 inactive deployments
ios-release — b155ad99 Deployed Oct 10, 2026 by ivanfenenko
android-release — b155ad99 Deployed Oct 10, 2026 by ivanfenenko
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