Skip to content

fix: Swipeable code breaking after RNGH v3.4 - #667

Merged
cyanChill merged 2 commits into
devfrom
fix/swipeable-rngh-3.4
Nov 27, 2026
Merged

cyanChill merged 2 commits into
devfrom
fix/swipeable-rngh-3.4

Conversation

@cyanChill

@cyanChill cyanChill commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Why

This PR fixes an issue where the miniplayer swipe gesture behaved inconsistently since v3.7.0. We narrowed down the cause to be RNGH v3.4, in which our temporary fix for v3.9.0 was to downgrade RNGH to v3.3.

After doing a bit of investigation work, it seems the cause was: software-mansion/react-native-gesture-handler#4582

  • I think this is an unintended side-effect as this mainly was to fix an issue w/ scrollables.
  • In our case, we have a Pressable wrapping the GestureDetector used by the swipeable, where potentially the onPress seems to cancel the gesture.
    • Adding the disabled prop to the Pressable allows the swipe gesture to work on every attempt.

Creating a patch undoing the changes from that PR verified that this was indeed the cause of the issue.

Note

An alternative to maintaining this patch whenever RNGH releases a new version is to maybe rewrite Swipeable to use React Native's Animated API (again).

Checklist

  • New files have the SPDX license identifier at the top of the file.
  • Documentation is up to date to reflect these changes.
  • Ensure dependency licenses are up-to-date by running pnpm sync:licenses.
  • This diff will work correctly for pnpm android:prod.
  • Add tests if necessary.

Summary by CodeRabbit

  • Bug Fixes
    • Improved touch handling when native views take over a gesture, reducing unintended cancellations of other gestures.
  • Updates
    • Updated the gesture-handling library to a newer version.

@cyanChill cyanChill added the Bug Issue was opened via the bug report template. label Nov 27, 2026
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile app upgrades react-native-gesture-handler from 3.3.0 to 3.5.0 and applies a patch that changes how native-touch-grab events cancel handlers.

Changes: Gesture Handler Upgrade

Layer / File(s) Summary
Dependency version and patch setup
mobile/package.json, mobile/pnpm-workspace.yaml, mobile/src/resources/licenses.json
The dependency and recorded license version change to 3.5.0. The workspace maps the package to its patch file.
Native-touch-grab cancellation
mobile/patches/react-native-gesture-handler.patch
The root helper passes the mid-gesture flag to the orchestrator. The orchestrator cancels native-view handlers when their hook returns true for that flag. The detector view removes native DOWN-time tracking and detector-based cancellation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Low · up to 3634c · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix: Swipeable code breaking after RNGH v3.4" names the problem the PR addresses: swipe gestures in the miniplayer broke after react-native-gesture-handler v3.4. The changeset upgrades reac…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix: Swipeable code breaking after RNGH v3.4" names the problem the PR addresses: swipe gestures in the miniplayer broke after react-native-gesture-handler v3.4. The changeset upgrades react-native-gesture-handler to 3.5.0 and adds a patch that reverts the orchestrator and detector-view grab-cancellation behavior tied to upstream PR #4582. The title does not name the patch or the version bump, but it identifies the main purpose of the change. It is clear and specific enough for a teammate scanning history.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 46a0c368-bb8b-4326-9022-9e03ff4c46e5
Commits

Reviewing files that changed from the base of the PR and between 5ecd6c1 and 3634cf5.

Files ignored due to path filters: 1

  • mobile/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 4

  • mobile/package.json
  • mobile/patches/react-native-gesture-handler.patch
  • mobile/pnpm-workspace.yaml
  • mobile/src/resources/licenses.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@cyanChill
cyanChill merged commit 9658d00 into dev Nov 27, 2026
3 checks passed
@cyanChill
cyanChill deleted the fix/swipeable-rngh-3.4 branch November 27, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Issue was opened via the bug report template.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant