Skip to content

fix(app): disable native back-swipe on host screens#1342

Open
thedavidweng wants to merge 1 commit into
getpaseo:mainfrom
thedavidweng:fix/1321-ios-swipe-back-gesture
Open

fix(app): disable native back-swipe on host screens#1342
thedavidweng wants to merge 1 commit into
getpaseo:mainfrom
thedavidweng:fix/1321-ios-swipe-back-gesture

Conversation

@thedavidweng
Copy link
Copy Markdown

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

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
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 5, 2026

Greptile Summary

This PR extends the existing gestureEnabled: false option — previously applied only to the agent screen — to all five host screens that live inside MobileGestureWrapper (workspace, agent, host index, sessions, open-project), preventing the native iOS back-swipe from conflicting with the sidebar pan gesture. It also renames the constant to GESTURE_DISABLED_OPTIONS and adds a comment explaining the constraint.

  • Gesture option broadened: gestureEnabled: false is now consistently applied to all host screens covered by MobileGestureWrapper, fixing the regression where swiping right navigated back instead of opening the sidebar.
  • h/[serverId]/settings is intentionally left without the option, consistent with it not being wrapped by MobileGestureWrapper.

Confidence Score: 5/5

Minimal, targeted change with no logic risk — safe to merge.

The change is a one-liner repeated across five screen declarations, with a rename and comment added for clarity. The screens that need the option get it; the settings screen that should not is correctly left out. No new dependencies, no new state, no risk of breakage on other platforms since gestureEnabled is ignored outside iOS native stack.

No files require special attention.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "fix(app): disable native back-swipe on h..." | Re-trigger Greptile

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.

bug: Right swipe gesture on iOS incorrectly triggers back navigation instead of opening sidebar

1 participant