Skip to content

feat(mobile): put the chat jump buttons in the iPhone Duo side rail - #37914

Open
gsxdsm wants to merge 49 commits into
stablyai:mainfrom
gsxdsm:feat/mobile-duo-rail-jump-buttons
Open

gsxdsm wants to merge 49 commits into
stablyai:mainfrom
gsxdsm:feat/mobile-duo-rail-jump-buttons

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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.

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

  • 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
Jump button offset from the rail axis Jump button centered on the rail axis

Changed checks, mobile typecheck, and the mobile web build and budget passed.

🤖 Generated with Claude Code

gsxdsm added a commit to gsxdsm/orca-stably that referenced this pull request Nov 3, 2026
@gsxdsm

gsxdsm commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Visual proof (iPhone Duo simulator)

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.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

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.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed 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 Passed 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.

Share

Recent 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: 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.

Suggested fix
   const back = duoRailBackFrame(args)
+  const column = statusColumn(args)
   const size = back.size
   const gap = spacing.sm
   const latestTop = args.composerTop - gap - size
   const previousTop = latestTop - gap - size
   const floor = args.keyboardUp ? args.strip.top : back.top + back.size + gap
-  if (previousTop < floor || latestTop + size > args.composerTop - gap) {
+  const statusOverlap =
+    column !== null &&
+    (column.y <= 1
+      ? previousTop < column.y + column.height
+      : latestTop + size > column.y)
+  if (previousTop < floor || latestTop + size > args.composerTop - gap || statusOverlap) {
     return null
   }
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.

Files selected for processing: 1
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-previous-align.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@gsxdsm
gsxdsm force-pushed the feat/mobile-duo-rail-jump-buttons branch from 8e20def to ed9c9c4 Compare November 4, 2026 01:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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: f51d54f8-350e-4b94-9bd7-ff8e0aeedcdd
Commits

Reviewing files that changed from the base of the PR and between 8e20def and ed9c9c4.

Files selected for processing: 2
  • mobile/src/i18n/locales/en.json
  • mobile/src/session/native-chat/MobileNativeChatView.tsx
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.

@gsxdsm
gsxdsm force-pushed the feat/mobile-duo-rail-jump-buttons branch 8 times, most recently from 54c45e9 to 5e7b096 Compare November 5, 2026 16:25
@gsxdsm
gsxdsm force-pushed the feat/mobile-duo-rail-jump-buttons branch from 5e7b096 to 32d4675 Compare November 6, 2026 02:21
gsxdsm and others added 9 commits November 5, 2026 22:03
…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]>
…l-jump-buttons

Keep the Duo rail, back control, and full-width chat on top of the moved mobile modules.
…l-back-pr

Keep the Duo back control and full-width chat on top of the moved mobile modules.
…t-full-width

Keep full-width Duo chat on top of the moved mobile modules.
…l-jump-buttons

# Conflicts:
#	mobile/src/session/MobileSessionSurface.tsx
gsxdsm and others added 13 commits November 27, 2026 16:36
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 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]>
# Conflicts:
#	mobile/src/components/nav-bar/NavBarButton.tsx
# Conflicts:
#	mobile/src/components/nav-bar/NavBarButton.tsx
The upstream merge left the shell screen one line over the limit. Both hooks still run for that screen.
The upstream merge left the shell screen one line over the limit. Both hooks still run for that screen.
@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · Fix the idle composer covering the width toggle before merging.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect Duo session layout and back navigation on mobile.

Fix the idle composer covering the width toggle before merging.

Findings

  1. P1 Field covers width toggle ▶
  2. P2 Docked chat loses extra width ▶

Summary

Moves the chat's latest-message button into the Duo side rail when the chat is collapsed and there is room above the composer.

  • Duo chats can use the side column or stay clear of it.
  • Collapsed Duo chats put their message-jump buttons in the side rail.
  • Collapsed chats add a back button beside the status column.

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile

…rail

The rail overlay also stays hidden while an undocked sidebar is open.
# Conflicts:
#	mobile/src/session/MobileSessionContentRow.tsx
# Conflicts:
#	mobile/src/session/MobileSessionContentRow.tsx
# Conflicts:
#	mobile/src/session/MobileSessionContentRow.tsx
gsxdsm and others added 9 commits November 29, 2026 16:32
persistMirrored resolves after the local write, so the revision guard was dropping before the shell echoed the latest choice.
Keep the Duo dock on the bottom edge while taking the phone key dock and the setup update notice.
Keep the Duo rail back control with the phone key dock and the setup update notice.
…tons

Keep the Duo jump controls with the rail back button, the phone key dock, and the setup update notice.
Keep the Duo session content, and read the renamed session toast.

This branch has not been deployed

No deployments
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.

Mobile: put the chat jump buttons in the iPhone Duo side rail

1 participant