feat: allow tab swipes from any horizontal gesture#503
feat: allow tab swipes from any horizontal gesture#503vforsh wants to merge 3 commits intoDimillian:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c9cf24b6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const nextTab = resolveSwipeTabTarget(state, touch.clientX, touch.clientY); | ||
| if (nextTab) { | ||
| handleMainTabSelect(nextTab); |
There was a problem hiding this comment.
Avoid switching tabs from horizontal drags in scrollable content
Because handleAppTouchStart arms swipe detection for every single-touch gesture and handleAppTouchEnd immediately routes any qualifying horizontal drag to handleMainTabSelect, horizontal drags inside content areas now trigger tab changes instead of interacting with that content. On phone layouts this steals gestures from existing horizontally scrollable UI (for example message image rails and code blocks styled with overflow-x: auto in src/styles/messages.css), so users trying to pan those surfaces can be navigated away to another tab.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in cee8f62.
Changes:
- Arm tab swipe only when touch starts near screen edges (24px zone).
- Do not arm swipe when touch starts inside a horizontally scrollable ancestor.
This keeps horizontal pan behavior for code blocks/image rails while preserving edge tab-swipe navigation.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cee8f62f66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isTouchWithinEdgeSwipeZone(touch.clientX, container.getBoundingClientRect())) { | ||
| edgeSwipeRef.current = null; | ||
| return; |
There was a problem hiding this comment.
Remove edge-only start check for global tab swipes
handleAppTouchStart still drops the swipe state unless the initial touch is within a 24px edge zone, so swipes that begin in the middle of the screen never reach handleAppTouchEnd and cannot change tabs. In practice, this keeps the old edge-only behavior and prevents the advertised “swipe from any horizontal gesture” flow on phones.
Useful? React with 👍 / 👎.
Summary
Context
I have tried to do animated swipes several times but Codex failed me so I have decided to keep it as is.
Testing