You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mobile): let iPhone Duo chats use the status column and sit on the bottom edge - #36726
On the iPhone Duo, chats now use the whole screen width. Before, the chat stopped short of the right edge because the clock column was reserved, even though nothing sits below the clock on a chat tab. The chat box and the terminal's text entry now also sit right at the bottom of the screen, without the gap under them.
What Changed
Chat uses the status column. While a session page is focused, the shell screen asks the shell's SideSafeArea to leave the status-column side unpadded, so the WebView really spans the window. The page's own SideSafeArea then leaves that side to the session (releaseSide on /h/[hostId]/session/… when the page geometry reports a side rail).
The session pads itself. The worker strip, the terminal panes, the input dock, the create-warning banner and the Markdown, file and browser tabs keep clear of the column. A docked side panel keeps the whole row clear. Only the chat overlay fills it. The header's background reaches the edge, but its tabs and buttons are padded clear: the camera pill and clock sit over that row and take its touches.
Terminals keep their size. Panes sit in an inset layer inside the terminal frame, and the frame size passed to the terminal subtracts the column. Switching between chat and a terminal never resizes the PTY.
Bottom edge. Beside the column, the chat composer has no home-indicator inset. Its bottom margin matches its side margins, and its bottom corners follow the screen's. The terminal input dock uses the same bottom inset the keyboard lift already assumed (dockBottomInset).
Expand / collapse button. The chat composer gets a button left of the mic, shown only while the session has the status column to itself. It switches the transcript between running across the column (the default) and keeping clear of it, so nothing the column draws overlaps it. The composer keeps its full width either way. The choice applies to every chat and is kept across relaunches (duo-chat-width.ts).
Why a claim and not a negative margin. A negative margin on the shell screen rendered but was clipped by its native parent, so the chat was laid out full width and then cut off.
Review follow-ups
Docked panel width: the row width used to decide whether a panel can dock now leaves out the released status-column strip.
Header: the header keeps the larger of its top-chrome clearance and the strip padding.
Collapse toggle: a late storage read no longer overwrites a newer tap.
The expand/collapse toggle is one device-wide preference (orca:duoChatExpanded, default expanded) that applies to every chat and survives restarts. It's persisted through mirrored page storage (added to the exact and negotiated page-storage key lists), so the native shell and the page-served chat agree. Toggling it in one chat updates any open chat. A revision guard ignores stale storage echoes, so a late older value can't undo a newer toggle.
Why
The status column is only needed below the clock when the key rail shows terminal keys. On chat tabs that space was empty, while lines were truncated beside it.
Real iOS Simulator screenshots (iPhone Duo cover, iOS 27.1) of a scratch chat; not layout renders. No personal data in frame.
Collapsed: chat and composer stop beside the status column; the expand toggle is in the composer.
Expanded: messages and the bottom-edge composer run across the status column; the collapse toggle is in the composer.
Testing
Installed on an iPhone Duo (cover screen) against a dev desktop: the Grok chat transcript and composer run to the right edge, the header's buttons stay tappable beside the column, and terminal tabs keep the key rail.
mobile typecheck (app and tests), oxlint and oxfmt are clean. Session, layout, mobile-web-shell and app suites pass.
I manually tested these changes locally
Automated tests added/updated, or explained why not below: layout-only change, verified on the device; existing session and shell suites cover the touched components.
AI Disclosure
Written with Claude Code (Claude Opus 5.5).
Notes
Mixed versions: an older shell keeps padding the column, so a newer page sees no side inset and lays out as before. A newer shell under an older page sends the column's inset, and the older page's SideSafeArea pads it, as before.
Docked Files panel follow-up
With Files docked on a folded iPhone Duo, the session row already clears the side rail. The collapsed transcript now uses that inset once.
The Safari simulator fixture exercised the production inset hooks with a fixed docked panel. At the same viewport, the transcript width increased from 127 to 211 CSS pixels and the rail stayed in place.
Before
After
Verification: pnpm check:changed --base=upstream/main, mobile typecheck, the mobile web bundle and its size check, and the two existing Duo chat-width posture tests.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Session routes with a side rail can release one side safe-area inset when an eligible screen claims it. Session content, headers, strips, and docks apply side-specific layout adjustments. Native chat now derives its bottom padding and transcript inset from keyboard and side-rail state, and its composer can fit screen corners and display a persisted width toggle.
Estimated code review effort
Severity of issue fixed: Medium
Merge Risk: Moderate · up to 42222
On affected Duo layouts, content can overlap the status-column area in ineligible states, and the composer can sit unnecessarily far above the bottom edge while the keyboard is open.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly summarizes the main changes: using the iPhone Duo status column for chats and placing content at the bottom edge.
Linked Issues check
Only directly linked issue #36725 applies. Its coding requirements, grouped:
1. Full-width chat transcript and composer on chat tabs [#36725]: MobileWebShellScreen claims the status-column side relea…
Out of Scope Changes check
The changes address the status-column layout requested by #36725. These include side-release handling in SideSafeArea and the shell, session inset helpers, header clearance, terminal frame sizing, bot…
Description check
The description has a clear ELI5, a detailed What Changed section, a Why section, a Linked Issue (Fixes #36725), Visual Proof with before/after style screenshots of collapsed and expanded states, Test…
Full details: Linked Issues check
Explanation
Only directly linked issue #36725 applies. Its coding requirements, grouped:
Full-width chat transcript and composer on chat tabs [#36725]: MobileWebShellScreen claims the status-column side release while a session page is focused and the terminal key-rail grant is present. The page's SideSafeArea then releases that side for the session. useChatBottomFit returns transcriptInset null when the chat is expanded, so the transcript runs across the column by default.
Header kept beside the clock [#36725]: MobileSessionHeader adds padding on the released side, equal to the larger of the inset width and the top-chrome clearance. Header tabs and buttons stay clear of the column.
Chat composer and terminal input on the bottom edge [#36725]: when a side rail is present, useChatBottomFit sets the bottom safe-area inset to zero, and the composer uses corner-fit styles. useMobileSessionPresentation sets dockBottomInset to zero when a side rail is shown, and MobileSessionCommandDock uses that value.
Terminal tabs keep the key rail [#36725]: the side claim requires BRIDGE_TERMINAL_KEY_RAIL_GRANT, and side-rail geometry is still reported on terminal tabs. MobileSessionActiveContent subtracts the strip width from the terminal frame, so the PTY size stays stable.
The evidence comes from the PR summary and the author's description, read at the reviewed head. Device behavior is author-reported. The issue does not require automated tests, so their absence does not fail this check.
Full details: Out of Scope Changes check
Explanation
The changes address the status-column layout requested by #36725. These include side-release handling in SideSafeArea and the shell, session inset helpers, header clearance, terminal frame sizing, bottom-edge fitting, and the dock inset.
The chat width toggle (MobileNativeChatWidthToggle), its persisted store (duo-chat-width.ts), and its i18n strings go beyond the literal expected behavior in #36725. The default state is expanded, which matches the issue. The toggle only changes whether the transcript clears the same status column, and it sits in the same composer. This is a related extension, so it is not an unrelated change.
The overlay-route pathname handling in _layout.web.tsx supports the session-route side-release logic. No unrelated change is demonstrated.
Full details: Description check
Explanation
The description has a clear ELI5, a detailed What Changed section, a Why section, a Linked Issue (Fixes #36725), Visual Proof with before/after style screenshots of collapsed and expanded states, Testing steps with manual testing checked, a Performance statement, a Risk section with rollback guidance, and an AI Disclosure. Gaps: the Performance section is missing a completed one-line justification (it is not addressed beyond the template placeholder, and the Performance line 'None, because' is left unfinished); the Risk section has no Level value (the template's 'Low, Medium, or High' placeholder is unfilled) and no explicit revert/backout instructions; the Review and Agent skill upstream boundary checkboxes are not addressed; the Checklist is not ticked; the Visual Proof screenshots are external links, and the 'Before' versus 'After' pairing is only given for the docked-panel follow-up. Automated tests are not added, which the author explains as a layout-only change. The description is substantive and mostly complete, so this is a pass with minor remediation items.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Follow-up Comments
Refresh paneFrame when the released inset changes.
375-376: Minor · Functional Correctness · Quick win
Refresh paneFrame when the released inset changes.
When the safe-area inset changes while the session remains undocked, the outer contentFrame can keep the same width and height. React Native Web then does not invoke its ResizeObserver callback. paneFrame keeps the previous effective width, so terminalPaneDirection and splitFrame can use stale geometry. In auto mode, a width crossing the 600-pixel threshold can select the wrong split direction.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Files skipped from review as they are similar to previous changes: 1
mobile/src/session/MobileSessionSurface.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (2)
Minor · Rely on the claimant instead of releasing the inset by route. · _layout.web.tsx:30-44
mobile/app/_layout.web.tsx:30-44 Minor · Functional Correctness · Quick win
Rely on the claimant instead of releasing the inset by route.
releaseSide releases the selected inset for every matching session route, while MobileWebShellScreen claims that inset only when focus, strip, overlay, and BRIDGE_TERMINAL_KEY_RAIL_GRANT eligibility all hold. SideSafeArea then subtracts the inset before any claim exists, so session content and controls can occupy the status-column or rail area during those ineligible states.
Remove the unconditional route release and let the existing claimant select the side:
Minor · Do not add the safe-area inset when the keyboard is open. · use-chat-bottom-fit.ts:24-31
mobile/src/session/native-chat/composer/use-chat-bottom-fit.ts:24-31 Minor · Functional Correctness · Quick win
Do not add the safe-area inset when the keyboard is open.
The native keyboard height already includes the iOS home-indicator area. When sideRail is false, keyboardInset + insets.bottom double-counts that clearance and can place the composer too far above the bottom edge.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…he bottom edge
Duo chats can run across the status column, with a composer toggle to
switch the width, a header that stays clear of the column, and a
bottom-edge composer fit.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Prevents RN Web Pressable focus theft from collapsing the idle pill
composer and unmounting the width toggle before onPress fires.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This PR at 6f6fc640ead merged with that main: 12,708,477 (10,877 over). The feature adds 8,771 bytes of minified JS. esbuild's metafile shows no module copied into a second chunk.
Lazy-loading does not reduce this number. The check counts every JS asset, not only the entry chunk.
The Nov 28 note of 12,685,122 was an older head. Later main commits, including the phone pairing change, used up the slack. Trimming the width feature cannot also cover main's 2,106-byte overage, and deleting the feature would still leave main over the cap. I did not raise the budget and did not push a further merge.
Existing light Duo shots on this PR show the collapsed chat and the expanded chat with the width toggle. Dark shots are not attached; another xcodebuild is using the machine.
Duo cover (folded), light and dark. Collapsed keeps the composer clear of the status column. Expanded runs the chat under that column. The width control is the arrow button in the composer.
Collapsed, light:
Expanded, light:
Collapsed, dark:
Expanded, dark:
The Phase C eager budget is still over the cap. upstream/main at 8481b851217 measured 12,699,706 eager bytes against 12,697,600, and this feature adds 8,771 bytes of JS on top of that. Lazy-loading does not reduce eager bytes, because every JS chunk stays in the total. The cap was not raised, and a local merge of current main was not pushed.
Note on the mobile-web eager budget: upstream main is currently over the Phase C eager cap on its own, and this feature adds about 8.8 KB of eager JS, so the PR can't get under the cap without dropping the feature or raising the cap. Happy to lazy-load it differently if you'd prefer a specific approach; otherwise this needs a maintainer decision on the cap.
onegaop
pushed a commit
to onegaop/orca
that referenced
this pull request
Nov 28, 2026
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
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.
ELI5
On the iPhone Duo, chats now use the whole screen width. Before, the chat stopped short of the right edge because the clock column was reserved, even though nothing sits below the clock on a chat tab. The chat box and the terminal's text entry now also sit right at the bottom of the screen, without the gap under them.
What Changed
SideSafeAreato leave the status-column side unpadded, so the WebView really spans the window. The page's ownSideSafeAreathen leaves that side to the session (releaseSideon/h/[hostId]/session/…when the page geometry reports a side rail).dockBottomInset).duo-chat-width.ts).Review follow-ups
Remembered expanded/collapsed state
The expand/collapse toggle is one device-wide preference (
orca:duoChatExpanded, default expanded) that applies to every chat and survives restarts. It's persisted through mirrored page storage (added to the exact and negotiated page-storage key lists), so the native shell and the page-served chat agree. Toggling it in one chat updates any open chat. A revision guard ignores stale storage echoes, so a late older value can't undo a newer toggle.Why
The status column is only needed below the clock when the key rail shows terminal keys. On chat tabs that space was empty, while lines were truncated beside it.
Linked Issue
Fixes #36725
Visual Proof
Real iOS Simulator screenshots (iPhone Duo cover, iOS 27.1) of a scratch chat; not layout renders. No personal data in frame.
Collapsed: chat and composer stop beside the status column; the expand toggle is in the composer.
Expanded: messages and the bottom-edge composer run across the status column; the collapse toggle is in the composer.
Testing
Installed on an iPhone Duo (cover screen) against a dev desktop: the Grok chat transcript and composer run to the right edge, the header's buttons stay tappable beside the column, and terminal tabs keep the key rail.
mobiletypecheck (app and tests), oxlint and oxfmt are clean. Session, layout, mobile-web-shell and app suites pass.I manually tested these changes locally
Automated tests added/updated, or explained why not below: layout-only change, verified on the device; existing session and shell suites cover the touched components.
AI Disclosure
Written with Claude Code (Claude Opus 5.5).
Notes
Mixed versions: an older shell keeps padding the column, so a newer page sees no side inset and lays out as before. A newer shell under an older page sends the column's inset, and the older page's
SideSafeAreapads it, as before.Docked Files panel follow-up
With Files docked on a folded iPhone Duo, the session row already clears the side rail. The collapsed transcript now uses that inset once.
The Safari simulator fixture exercised the production inset hooks with a fixed docked panel. At the same viewport, the transcript width increased from 127 to 211 CSS pixels and the rail stayed in place.
Verification:
pnpm check:changed --base=upstream/main, mobile typecheck, the mobile web bundle and its size check, and the two existing Duo chat-width posture tests.🤖 Generated with Claude Code