Repository navigation
#358 Tablet keyboard shortcuts and phones always stacked - #643
Merged
Merged
Conversation
Hardware keyboard shortcuts on iPad and Android tablets: toggle sidebar, next/previous session, focus composer. They are listed in the iPad shortcut overlay and the Android Keyboard Shortcuts Helper, and stay off while another text field, sheet, or dialog has focus. OpenCodeSessionComposer can be asked to take focus and reports its focus. The Home and Settings split layout now requires a tablet; phones stay stacked in landscape on both platforms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…put-polish # Conflicts: # android/app/src/main/java/dev/opencode/mobile/ui/components/layout/OpenCodeSplitPaneLayout.kt # ios/OpenCode Mobile/OpenCode Mobile/Components/Layout/OpenCodeSplitPane.swift # ios/OpenCode Mobile/OpenCode Mobile/Components/Layout/OpenCodeSplitPaneLayout.swift
ivanfenenko
marked this pull request as ready for review
October 11, 2026 12:39
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9079a3c. Configure here.
Keyboard session stepping scrolled the selected row into view but left the follow-top pin set, so a later newcomer pinned the list back to the top and moved the selected row off-screen. After the reveal, follow the top only if the list is still at it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…put-polish # Conflicts: # android/app/src/main/java/dev/opencode/mobile/Navigation.kt
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
Hardware keyboard shortcuts on iPad and Android tablets:
Next/previous follows the visible Home list order for the current filter. It does not wrap. With nothing selected, it picks the first or last session. The newly selected row is scrolled into view.
The shortcuts stay off while another text field, a sheet or a dialog has focus. They work while the composer has focus.
They are listed only where they apply: in the iPad View menu and hold-⌘ overlay, and in the Android Keyboard Shortcuts Helper (Meta+/) under "Sessions".
OpenCodeSessionComposercan be asked to take focus and reports whether it has focus, on both platforms. Its gallery entries show both. No visual change.Decision on large phones in landscape: phones always use the stacked layout. The Home and Settings split now requires an iPad at regular width on iOS, or a smallest screen width of at least 600dp plus a window at least 720dp wide on Android. Before this, iPhone Plus/Max and almost every Android phone split in landscape.
The left-edge swipe to reopen the sidebar is not included. It conflicts with Android's system Back gesture and iOS's back-swipe, and the top-bar button and handle drag already reopen the pane.
Checks
:app:assembleDebugsucceeded.:app:testDebugUnitTestran 1,854 tests with 1 failure (ConnectionProbeServiceTest, which this branch does not touch; it passes 12/12 when run alone). ktlint reports only violations that already exist (soft-fail in CI).xcodebuild test -only-testing:"OpenCode MobileTests"on the iPad Pro 13-inch (M4) simulator: 1,774 tests passed.Issue
Risks / Follow-ups
UIKeyCommands, so the menu lists them without the ⌃⇥ glyph.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Note
Medium Risk
Touches global key dispatch, split-layout breakpoints, and focus/modal gating across Home, Settings, and chat; behavior differs by platform (e.g. iPad Ctrl+Tab priority) and was not fully re-tested on device after merge conflicts.
Overview
Adds tablet hardware keyboard shortcuts on Android and iOS with shared behavior: toggle Home/Settings sidebar, step sessions in the visible Home list (no wrap), and focus the session chat composer. Shortcuts are gated so they do not fire while a non-composer text field is focused or a modal/sheet is up; the composer still allows them.
Android introduces a window-level
KeyboardShortcutHostinMainActivity(dispatchKeyEventbefore Compose),KeyboardShortcutHandlerregistration, and anOpenCodeInputFocusRegistrywired through text inputs and bottom sheets. iOS adds scene commands, a text-focus monitor, window overlay tracking, and priorityUIKeyCommands so Ctrl+Tab is not stolen by system focus navigation.OpenCodeSessionComposergains a programmatic focus API on both platforms (gallery demos included). The session list reports display order and scrolls keyboard-selected rows into view.Split layout is tightened so phones stay stacked in landscape: Android requires smallest width ≥600dp plus window ≥720dp; iOS requires iPad with regular horizontal size class (replacing width-only / large-phone split).
Reviewed by Cursor Bugbot for commit 9079a3c. Bugbot is set up for automated code reviews on this repo. Configure here.