fix(app): disable native back-swipe on host screens#1342
Conversation
On native iOS, the default React Navigation back-swipe gesture was enabled on workspace and other host screens. Swiping right would navigate back (often to a different host's screen) instead of opening the sidebar. Disable the native gesture on all screens inside the MobileGestureWrapper (workspace, agent, host index, sessions, open-project) so that right-swipes are handled by the wrapper's Pan gesture, which opens the sidebar as expected. Fixes getpaseo#1321
|
| Filename | Overview |
|---|---|
| packages/app/src/app/_layout.tsx | Renamed AGENT_SCREEN_OPTIONS to GESTURE_DISABLED_OPTIONS and applied gestureEnabled:false to all five MobileGestureWrapper host screens; h/[serverId]/settings correctly left unchanged. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User swipes right on iOS host screen] --> B{gestureEnabled?}
B -- "true (before fix)" --> C[Native back-swipe fires]
C --> D[Navigates back to previous host screen]
D --> E[❌ Sidebar does not open]
B -- "false (after fix)" --> F[Native gesture suppressed]
F --> G[MobileGestureWrapper Pan gesture captures swipe]
G --> H[✅ Sidebar opens]
Reviews (1): Last reviewed commit: "fix(app): disable native back-swipe on h..." | Re-trigger Greptile
What
On native iOS, the default React Navigation back-swipe gesture was enabled on workspace and other host screens. Swiping right would navigate back (often to a different host screen) instead of opening the sidebar.
Changes
Disable the native gesture on all screens inside the MobileGestureWrapper (workspace, agent, host index, sessions, open-project) so that right-swipes are handled by the wrapper Pan gesture, which opens the sidebar as expected.
Fixes #1321