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): put the chat jump buttons in the iPhone Duo side rail - #37914
Merged with current main (1bc358fbafb) on 2026-11-27. The jump overlay now subtracts the session pane's window origin, so Split View does not shift the buttons. pnpm check:changed --base=upstream/main passed on dd1a102ed2e.
Stacked: builds on #37185 (Duo side-rail back control) and #37238 (previous-message arrow). Until they merge, this diff includes their commits; review only the last two commits: e73006e "move chat jump buttons into the Duo side rail" and b7d41a6 "keep Duo rail jump buttons above the composer".
ELI5
On an iPhone Duo with the chat collapsed, the ↑ previous-message and ↓ latest buttons move into the side rail next to the transcript: same size and column as the back button, lower down, always above the chat box, and they rise with the keyboard.
What Changed
When the native chat is collapsed beside the Duo status column and the rail has room, the floating jump controls render in the rail instead of over the transcript: 44pt, centered on the status-cluster midX like the rail back control, stacked ↑ above ↓ near the bottom of the column.
Their bottom edge stays a gap above the measured composer top, and they lift with the keyboard and with composer height (multi-line input, attachments). The rail back control still hides while the keyboard is up; the jump buttons stay visible.
Expanded chat, no rail, or not enough room: unchanged in-transcript placement. Behaviour (show/hide, first-tap and glyph-hit fixes) is unchanged; only placement moves, reusing the rail placement code.
Why
On the Duo the transcript is narrow when collapsed and the rail has unused space; moving the controls there frees the transcript and keeps them reachable near the thumb, without ever covering the composer.
Verified on an iPhone Duo device (folded and unfolded, keyboard up and down). Simulator screenshots will follow in a comment.
Testing
Focused placement tests: rail vs in-transcript selection, positions inside the column below the back control, above the composer, and lifted with keyboard height and composer growth.
Full mobile vitest (only the known local e2ee large-text-frame failure), pnpm typecheck && pnpm typecheck:tests in mobile, localization, oxlint, pnpm build:mobile-web with verify.
The previous-message button joins the rail in a follow-up once #37238 lands.
Jump control alignment update
The web overlay measures its layout origin without the host stack’s slide transform. The jump button stays centered on the status rail after the stack finishes moving.
The same production overlay ran in Safari on a private folded iPhone Duo simulator clone. The line marks the expected rail axis. After a simulated host transition, the baseline button ends to the right of the axis and the fix keeps it centered.
Before
After
Changed checks, mobile typecheck, and the mobile web build and budget passed.
Collapsed native chat beside the status column: the previous-message arrow sits in the side rail, centred on the status column and above the composer.
Front (cover) screen
Inner display
Keyboard-up placement (the buttons lifting with the keyboard) was verified on a physical iPhone Duo; the simulator could not hold keyboard focus for a capture.
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.
No actionable comments were generated in the recent review.
Walkthrough
The changes add side-inset release and apply the released space to session content. Duo chat gains a shared, stored width preference and composer adjustments for keyboard and rail layouts. The session adds side-rail Back and jump controls. Native and web chat lists gain previous-message navigation, including target selection, alignment, and scroll handling. Tests cover layout placement, preference persistence, Back routing, and message jumps.
Severity of issue fixed: Low
Merge Risk: Low · previous review 74edb
Rail jump buttons may be obscured when a prompt opens the keyboard. This is a bounded placement issue to fix or explicitly accept before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: moving the chat jump buttons (previous-message and jump-to-latest) into the iPhone Duo side rail. The changeset matches this. Files such as duo-rail-jump-controls.tsx,…
Linked Issues check
Issue #37913 requires rail placement for collapsed iPhone Duo chat when space is available. At head, duoRailJumpPlacement selects rail placement only when chat is visible, collapsed, a strip exists,…
Out of Scope Changes check
The whole-PR changes support #37913 or its disclosed stacked prerequisites. Rail geometry, composer measurement, rail rendering, collapsed-chat state, side-rail insets, and jump navigation are require…
Description check
The description follows the repository template: it has ELI5, What Changed, Why, Linked Issue (Fixes #37913), Visual Proof (before/after images for the alignment update), Testing, Risk, and Performanc…
Full details: Title check
Explanation
The title names the main change: moving the chat jump buttons (previous-message and jump-to-latest) into the iPhone Duo side rail. The changeset matches this. Files such as duo-rail-jump-controls.tsx, duo-rail-jump.ts, and MobileNativeChatFloatingControls.tsx implement rail placement for those buttons. The title follows the conventional commit form and is specific enough for a teammate scanning history.
Full details: Linked Issues check
Explanation
Issue #37913 requires rail placement for collapsed iPhone Duo chat when space is available. At head, duoRailJumpPlacement selects rail placement only when chat is visible, collapsed, a strip exists, and composerTop is known. duoRailJumpFrames uses the 44pt back-control size and back.left, stacks previous above latest, and keeps the stack above the composer. It returns no rail frames when space is insufficient. Keyboard-up placement uses the strip top because the rail back control is hidden. duo-rail-jump.test.ts covers rail selection, composer clearance, keyboard movement, composer growth, and insufficient space.
Full details: Out of Scope Changes check
Explanation
The whole-PR changes support #37913 or its disclosed stacked prerequisites. Rail geometry, composer measurement, rail rendering, collapsed-chat state, side-rail insets, and jump navigation are required to provide the requested placement and preserve existing behavior. The related tests support these changes. No unrelated change is established by the available evidence.
Full details: Description check
Explanation
The description follows the repository template: it has ELI5, What Changed, Why, Linked Issue (Fixes #37913), Visual Proof (before/after images for the alignment update), Testing, Risk, and Performance sections. Several parts are incomplete or missing. The Performance section is unfinished ("None, because" with no reason). The Risk section has no Level value and no revert guidance. The Testing checklist is unticked. The Visual Proof for the main placement change is deferred to a later comment. The Review, Agent skill upstream boundary, and Checklist sections are unfilled, and the AI Disclosure section is blank even though the description says it was generated with Claude Code. The description is mostly complete with clear context, so it passes on substance, though the gaps listed here should be fixed.
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c81a699f-854e-4c17-83eb-9ad5fe797670
Commits
Reviewing files that changed from the base of the PR and between 2ce42e4 and 74edbb4.
Files selected for processing: 1
mobile/src/i18n/locales/en.json
Files skipped from review as they are similar to previous changes: 1
mobile/src/i18n/locales/en.json
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.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (3)
Minor · Reject a keyboard-up stack that overlaps a bottom status… · duo-rail-jump-controls.tsx:115-130
mobile/src/session/duo-rail-jump-controls.tsx:115-130 Minor · Functional Correctness · Quick win
Reject a keyboard-up stack that overlaps a bottom status column.
When the turned Duo column begins at y=545 and the measured composer top is 560, the latest control spans y=508..552. The keyboard-up branch does not check the status column, so the control can overlap the reserved region. Reject the rail placement when either control intersects the status column.
Minor · Clear alignment when the pending target is… · use-mobile-native-chat-previous-align.ts:232-245
mobile/src/session/native-chat/transcript/use-mobile-native-chat-previous-align.ts:232-245 Minor · Functional Correctness · Quick win
Clear alignment when the pending target is removed.
A reachable transcript replacement can omit a pending target before its row is measured. The at === undefined branch then leaves pendingAlign.current, aligning.current, and the matching inflightKey.current set. This keeps reading-place restoration disabled. A later previous-message tap treats the removed key as the in-flight target, so previousMessageChained returns null and the tap does nothing.
This is separate from measured-row retry exhaustion. Clear the pending state when the target is no longer present, while retaining the existing retry behavior for a target that is still in the draw window.
Suggested fix
- if (at === undefined || at < latest.current.first) {+ if (at === undefined) {+ pendingAlign.current = null+ aligning.current = false+ if (inflightKey.current === pending.key) {+ inflightKey.current = null+ }+ return+ }+ if (at < latest.current.first) {
return
}
Minor · Clear the native jump state when retries are exhausted. · MobileNativeChatRowList.tsx:145-155
mobile/src/session/native-chat/transcript/MobileNativeChatRowList.tsx:145-155 Minor · Functional Correctness · Quick win
Clear the native jump state when retries are exhausted.
When onScrollToIndexFailed decrements pending.left to zero, the current code schedules another retry and leaves jump.retry and jump.inflightKey set. A later cell layout can then service the exhausted retry. If the row is still unmeasured, a later previous-message tap treats it as committed and can skip it during chaining.
Suggested fix
pending.left -= 1
+ if (pending.left <= 0) {+ jump.retry = null+ if (jump.inflightKey === pending.key) {+ jump.inflightKey = null+ }+ return+ }
// averageItemLength 0 would scroll to the top and drop the pending row.
if (info.averageItemLength > 0) {
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 3e5b7810-f19b-43d2-9535-4370adb80a18
Commits
Reviewing files that changed from the base of the PR and between b7d41a6 and 8e20def.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Files skipped from review as they are similar to previous changes: 1
mobile/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 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]>
The jump frames are window coordinates. In Split View the overlay sits inside the session pane, so the buttons were shifted by that pane's origin.
Co-Authored-By: Claude Opus 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 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 an iPhone Duo with the chat collapsed, the ↑ previous-message and ↓ latest buttons move into the side rail next to the transcript: same size and column as the back button, lower down, always above the chat box, and they rise with the keyboard.
What Changed
Why
On the Duo the transcript is narrow when collapsed and the rail has unused space; moving the controls there frees the transcript and keeps them reachable near the thumb, without ever covering the composer.
Linked Issue
Fixes #37913
Visual Proof
Verified on an iPhone Duo device (folded and unfolded, keyboard up and down). Simulator screenshots will follow in a comment.
Testing
pnpm typecheck && pnpm typecheck:testsinmobile, localization, oxlint,pnpm build:mobile-webwith verify.The previous-message button joins the rail in a follow-up once #37238 lands.
Jump control alignment update
The web overlay measures its layout origin without the host stack’s slide transform. The jump button stays centered on the status rail after the stack finishes moving.
The same production overlay ran in Safari on a private folded iPhone Duo simulator clone. The line marks the expected rail axis. After a simulated host transition, the baseline button ends to the right of the axis and the fix keeps it centered.
Changed checks, mobile typecheck, and the mobile web build and budget passed.
🤖 Generated with Claude Code