feat(web): setting to turn off trackpad swipe navigation #34481
main fromrefs/pull/34481/head·opened View on GitHubProblem#
On macOS, the desktop app goes back or forward when you swipe left or right with two fingers on the trackpad. Some users swipe by accident, or scroll in a way the app reads as a swipe, and then lose their place in a thread. Today the only way to stop this is to turn off the gesture for all of macOS.
Related open reports (this PR does not fix them; it gives affected users a way to turn the gesture off): #30160, #33888, #28160.
Change#
Add a client setting, Settings → General → Display → Swipe to navigate. It is on by default, so nothing changes unless a user turns it off. When it is off, HistorySwipeNavigation adds no wheel or trackpad listeners. The row and its search entry show only in the desktop app on macOS, where the gesture works. The setting is part of "Restore defaults". The keybindings guide mentions it next to navigation.back and navigation.forward.
Scope and approval#
This is a focused configuration option for an established capability (CONTRIBUTING, "Establish the problem and scope first"):
- Existing capability: two-finger trackpad swipe navigation in the macOS desktop app (#27430).
- What the option controls: only whether that gesture is active. The back and forward buttons and the
navigation.back/navigation.forwardshortcuts do not change. - Why the scope stays within that capability: the default keeps current behavior. The option adds no new workflow and does not change how the gesture detects a swipe.
Verification#
vp test run apps/web/src/components/HistorySwipeNavigation.browser.test.tsx apps/web/src/components/HistorySwipeNavigation.test.ts apps/web/src/components/settings/settingsSearch.test.ts packages/contracts/src/settings.test.ts: 69 tests passed.- The new browser test row ("a swipe with swipe navigation turned off keeps the thread") fails when the setting check is removed and passes with it.
vp run check:changed: format, lint, knip, typecheck, tests and react compiler pass.- Before/after screenshots of the General settings page in the macOS desktop app: to follow in a comment.
- Manual check on macOS (swipe navigates when on, does nothing when off): to follow in a comment.
Model and harness: Claude Opus 5.5 in Claude Code (T3 Code).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Approved at
5d12160Macroscope's review found this PR approvable — Adds a macOS desktop setting to turn off trackpad swipe navigation while keeping it enabled by default. The change is limited to a reversible navigation preference and its settings UI.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Thanks for this. #28370 makes the same change and is the one being kept.
#28370 adds the same default-on setting and also removes the swipe indicator when the option is turned off during a gesture. That makes it the more complete version to carry forward.
Your macOS-only visibility and keybindings guidance are useful refinements that could be brought into the kept PR. The underlying accidental-navigation reports remain relevant; the setting provides an opt-out rather than correcting gesture detection.
Closing as a duplicate.
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes