fix(desktop): fix dev protocol plist patching to prevent deep link collisions#1445
Conversation
…llisions The patch-dev-protocol script had bugs that left Electron.app with the default com.github.Electron bundle ID, causing macOS Launch Services to treat all dev worktrees as the same app and route deep links to the wrong instance. - Delete existing CFBundleURLTypes before re-adding to prevent stale/duplicate entries - Validate both bundle ID and scheme in "already patched" check - Stop swallowing errors on PlistBuddy commands so failures surface
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughUpdates macOS protocol patch script to validate existing bundle identifier and URL schemes before patching. Introduces workspace-aware validation and multi-worktree isolation by setting unique bundle IDs and cleaning stale URL type entries before adding fresh protocol scheme registrations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
patch-dev-protocol.tsleaving Electron.app with defaultcom.github.Electronbundle ID, causing macOS Launch Services to treat all dev worktrees as the same appAddcommands now delete existingCFBundleURLTypesfirst, preventing stale/duplicate URL scheme entries from accumulating across dev sessionsbun installwipes the plist)Test plan
bun devin two worktrees with differentSUPERSET_WORKSPACE_NAMEvaluesRegistering superset-{workspace}:// scheme...with its own workspace namebun devagain in both — verifyalready registeredmessage (idempotency)Summary by CodeRabbit
Bug Fixes
Chores