Repository navigation
Conversation
ae35536 to
84f266a
Compare
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
06ac7b6 to
d431eed
Compare
998241e to
04b6dc9
Compare
…erminal Opening a session replaced the host list, so swipe and hardware back landed on the server list whenever that list was not already underneath. Push the session onto the list, and insert the list when a replace, deep link, or resume skipped it. Co-Authored-By: Grok <[email protected]>
The session route reads the host stack through useNavigation. That sweep renders the screen, so its expo-router mock has to export the hook. Co-Authored-By: Grok <[email protected]>
A tap in the page-served host list stays inside that WebView, so the native stack is still the server list under one host screen. That screen's swipe belongs to the parent and pops the whole document. While the page claims Back, disable the parent gesture and turn a left-edge swipe into the page's own back. Co-Authored-By: Grok <[email protected]>
04b6dc9 to
492729d
Compare
ELI5
Swiping back from a chat or terminal on the phone used to throw you all the way out to the server list. Now it takes you one step back, to that server's list of sessions. A second swipe takes you to the server list.
What Changed
There were two causes, and both are fixed.
/h/[hostId]is a page document, and tapping a session navigated inside that document. The native stack stayed[server list, host document], so the iOS edge swipe, which belongs to the parenthscreen, popped the whole document back to the server list. While the page claims Back (shell path still/h/:idwith a session open), the shell now turns the parent gesture off, and a left-edge pan callsbridge.sendBack(). The page then goes back to that host's session list. When the claim drops, the parent gesture returns.navigateToHostStackRoutemounted the host list and then a REPLACE removed it, which left[server list, session]. Home's "jump back in", resume and notification taps now PUSH the session, so the host list stays underneath. The native session route also inserts the host list when nothing is underneath (new workspace, agent launch, diff-review replace). Standalone web inserts the route too, so browser back lands on the host list.Android hardware back follows the same stack. iPhone Duo and iPad still pop to the host index on
HostStack.Why
The first fix only covered native pushes. On a real device the host list is a page-served document, so the session never became its own native screen, and the swipe always belonged to the parent. Routing the edge swipe through the page's own Back claim fixes the real path without changing how pages are hosted.
Linked Issue
Fixes #36879
Visual Proof
Verified on an iPhone Duo (Ad Hoc build of this branch on a fork, paired to a dev host). From a host's session list, open a session, then swipe from the left edge: you land on that host's session list. A second swipe goes to the server list. Before: the first swipe went straight to the server list. A screen recording will follow in a comment.
Testing
cd mobile && pnpm typecheck && pnpm typecheck:testsnpx vitest run src/mobile-web-shell src/navigation src/session: shell back-claim, host-stack push, session-route repair and the workspace route sweepnpx oxlint mobile/src🤖 Generated with Claude Code