Repository navigation
fix(mobile): workspace row long-press opens only the menu; delete shows progress and tolerates teardown failures - #6598
Conversation
|
Warning Review limit reached
Next review available in: 40 seconds Limit details: You’ve used all 10 included reviews currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
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. Comment |
5a44f71 to
207c1ec
Compare
expo-router <= 56.2.18 attaches the iOS context-menu interaction to a Link.Trigger but never cancels react-native's in-flight touch, so lifting the finger after the menu presents still fires the row's onPress — a long-press on a home workspace row opened the menu and navigated. Upstream fixed it natively in 56.2.19 (released today; blocked by bun's minimumReleaseAge and paired with a new expo-modules-core), so carry that change as a bun patch of the pinned 56.2.18: when UIKit asks for the menu configuration, toggle the nearest RCTSurfaceTouchHandler so the press is delivered as touchesCancelled. Documented in patches/README.md with the guard test the convention requires; drop it on the next SDK 56 batch bump.
The workspace row's context menu now hands its actions to useWorkspaceRowActions, which owns rename/delete/copy/share and an isDeleting flag: while workspaceCleanup.destroy runs the row dims, a spinner takes the icon slot, and tap and "+" are disabled. Delete is a destructive menu item. Delete-flow fixes, mirrored on the workspace-screen sheet: - a failing teardown script no longer prompts (or loops — the old "Force delete" retry never passed skipTeardown): the script already ran, so the delete retries once without it and finishes - dirty worktree still prompts, now "Delete anyway" as on desktop - other failures show the host's message; after a relay timeout the list is refetched and a missing row counts as committed (the host archives before any slow work), instead of "Delete failed" for a delete that is still running
207c1ec to
daad5c8
Compare
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
…u onto #6598's row actions)
Summary
Why / Context
Reported: "pressing and holding does the normal click (navigates)" and "the delete flow has no signal and then it fails". Three distinct defects were under that:
Link.Menuputs aUIContextMenuInteractionon the trigger, but RN'sRCTSurfaceTouchHandlercan't be prevented by a descendant's gesture, so lifting the finger after the menu presents still deliversonPress. Upstream fixed it in 56.2.19 (cancelReactNativeTouches) — released 2026-08-17, blocked by bun's 3-dayminimumReleaseAgeand paired with a new expo-modules-core (bumping one module alone risks a launch crash, seepatches/README.md).forcebut notskipTeardown, so the script ran and failed again — an endless "Force delete" prompt.How It Works
patches/expo-router@56.2.18.patch: verbatim upstream Swift — when UIKit asks for the menu configuration, find the nearestRCTSurfaceTouchHandlerand toggleisEnabledso the press is delivered astouchesCancelled. Native change: dev clients need a rebuild to pick it up. Guard test reads the installed Swift file, so it keeps passing after the eventual bump; drop the patch then.useWorkspaceRowActions(new, underWorkspaceRow/hooks/) owns rename/delete/copy/share +isDeleting;WorkspaceRowMenuis now purely the nativeLink.Menu(Delete markeddestructive).skipTeardownautomatically, no prompt (per Satya: the toast was annoying, and the script already ran); other errors alert with the host's message; on any other failure the host list is refetched and, because the host archives the row before slow work, a missing row means the delete committed (covers the relay timeout).useHostWorkspacescache ops gainrefetchHostfor that.Manual QA Checklist
Verified on the iPhone 16e simulator with a native build of this branch, against a live host over the relay (standalone host-service, scratch project with two worktrees, one with a 6s teardown, one dirty with a teardown that exits 1). Screenshots + notes: https://claude.ai/code/artifact/eb182eda-203d-4622-8520-506ac8f09208
Testing
bun run typecheck(mobile, afterbuild:types)bun run lintbun testinapps/mobile(incl. the new patch guard)xcodebuild, Debug simulator)Known Limitations
Follow-ups
patchedDependenciesentry.Summary by cubic
Fixes iOS long-press on a workspace row so it opens only the native context menu (no navigation), and makes delete show progress while tolerating teardown failures and relay timeouts. Previously, long-press also fired the row’s onPress; delete had no in-flight UI and could loop or misreport failures.
Carries upstream Swift fix as a bun patch to
expo-router@56.2.18so the menu cancels the in-flight touch. While delete runs the row dims, a spinner replaces the icon, and tap and the "+" button are disabled. A teardown failure is retried once withskipTeardown; dirty worktrees prompt “Delete anyway”; other errors show the host’s message; after a relay timeout the host list is refetched and a missing row counts as committed.useHostWorkspacesaddsrefetchHostto confirm commits after relay timeouts.Rollout notes
expo-routerpatch.expo-router≥ 56.2.19, removepatches/expo-router@56.2.18.patchand itspatchedDependenciesentry; the guard test continues to pass.Reviewer notes
package.json/bun.lock.WorkspaceRowMenuis now a thinLink.Menu; actions moved intouseWorkspaceRowActionswithisDeletingwired intoWorkspaceRow.Written for commit daad5c8. Summary will update on new commits.