Stop Warp auto-claiming common file types on macOS (LSHandlerRank=Alternate)#13121
Conversation
Set LSHandlerRank=Alternate on the CFBundleDocumentTypes entries in script/update_plist that previously omitted it (Folder, Terminal shell script, Unix Executable File, Markdown File, Plain Text File, and Source Code File). With Alternate rank, Warp still appears in the macOS "Open With" list for these types but is no longer auto-selected as the default handler, so it stops silently taking over files like .md without the user choosing it. The remaining entries (the source-code extension list and "All Documents") were already Alternate. Co-Authored-By: Warp <agent@warp.dev>
|
@warp-dev-github-integration[bot] I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates the macOS Info.plist generation script so all declared document types use LSHandlerRank=Alternate, preventing Warp from being auto-selected as the default handler while keeping it available in Open With.
Concerns
- The change affects user-visible macOS file-handler behavior, but the PR description does not include screenshots or a short recording demonstrating that Warp no longer becomes the default handler and still appears under Open With.
Verdict
Found: 0 critical, 0 important, 1 suggestion
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| <dict> | ||
| <key>CFBundleTypeName</key><string>Folder</string> | ||
| <key>CFBundleTypeRole</key><string>Editor</string> | ||
| <key>LSHandlerRank</key><string>Alternate</string> |
There was a problem hiding this comment.
💡 [SUGGESTION] For this user-facing macOS handler behavior change, please include screenshots or a short recording showing Warp is no longer the default handler and still appears under Open With.
There was a problem hiding this comment.
Thanks for the suggestion. I unfortunately can't produce macOS Finder screenshots/recordings here: this PR is generated by an automated agent running on a Linux cloud runner, and the behavior in question (LSHandlerRank / default-handler selection and the "Open With" list) is enforced by macOS LaunchServices, which does not exist on Linux.
This change is pure Info.plist metadata — no Rust/app code path. I validated it by (a) bash -n script/update_plist, and (b) parsing the generated CFBundleDocumentTypes XML with plistlib, confirming it is well-formed and that all 8 declared document types now carry LSHandlerRank=Alternate.
A maintainer on macOS can confirm end-to-end by bundling the app (script/bundle) and checking that Warp no longer auto-becomes the default handler for .md/text/source files while still appearing under "Open With".
| <dict> | ||
| <key>CFBundleTypeName</key><string>Unix Executable File</string> | ||
| <key>CFBundleTypeRole</key><string>Shell</string> | ||
| <key>LSHandlerRank</key><string>Alternate</string> |
There was a problem hiding this comment.
| <key>LSHandlerRank</key><string>Alternate</string> |
As a terminal, we should claim "Unix Executable File"
There was a problem hiding this comment.
Done — removed LSHandlerRank=Alternate from the Unix Executable File entry so Warp claims it at default rank again. (0701ae6)
| <dict> | ||
| <key>CFBundleTypeName</key><string>Terminal shell script</string> | ||
| <key>CFBundleTypeRole</key><string>Shell</string> | ||
| <key>LSHandlerRank</key><string>Alternate</string> |
There was a problem hiding this comment.
| <key>LSHandlerRank</key><string>Alternate</string> |
As a terminal, we should claim "Terminal shell script"
There was a problem hiding this comment.
Done — removed LSHandlerRank=Alternate from the Terminal shell script entry so Warp claims it at default rank again. (0701ae6)
Per review feedback (acarl005): Warp is a terminal, so it should remain the default handler for Terminal shell scripts (com.apple.terminal.shell-script) and Unix Executable Files (public.unix-executable). Remove the LSHandlerRank=Alternate from those two CFBundleDocumentTypes entries so they register at default rank again. The editor-style types (Folder, Markdown, Plain Text, source code, All Documents) keep Alternate so Warp no longer auto-claims those. Co-Authored-By: Warp <agent@warp.dev>
Description
On macOS, Warp registers itself as a handler for a broad set of file types via the
CFBundleDocumentTypesblock written into the app'sInfo.plistbyscript/update_plist. Several of those entries omittedLSHandlerRank, so they registered at the default rank — which lets macOS LaunchServices auto-select Warp as the default handler for things like Markdown (.md), plain text, and source files, silently taking them over without the user ever choosing Warp.This sets
LSHandlerRank = Alternateon the six entries that previously omitted it:public.folder)com.apple.terminal.shell-script)public.unix-executable)net.daringfireball.markdown,public.markdown, …)public.plain-text)public.source-code)With
Alternaterank, Warp still appears in the macOS "Open With" list for these types but is no longer auto-picked as the default handler. The two remaining entries (the source-code extension list and "All Documents") were alreadyAlternate, so after this change every declared document type isAlternate.This is the build-time/packaging portion of the fix discussed in the Slack thread. A separate, optional runtime opt-in (a setting that uses LaunchServices to make Warp the default for chosen categories) can be layered later for users who want Warp as their editor.
Linked Issue
Reported via Slack (no GitHub issue): see thread.
ready-to-specorready-to-implement.Testing
This is a macOS-only packaging/plist change in a shell script — there is no Rust code path, UI surface, or app-runtime behavior to exercise, and it cannot be meaningfully validated on this Linux runner (macOS LaunchServices is what consumes
LSHandlerRank). Validation performed:bash -n script/update_plistpasses (script syntax).CFBundleDocumentTypesXML withplistliband confirmed it is well-formed and that all 8 document-type entries now carryLSHandlerRank = Alternate.A regression unit test,
./script/presubmit(Rust fmt/clippy/tests), andcomputer_useUI verification are not applicable to a macOS-onlyInfo.plistpackaging change and could not run on a Linux runner. A maintainer on macOS can confirm by bundling the app and checking that Warp no longer auto-becomes the default handler for.md/text/source files (it should still be available under "Open With")../script/runAgent Mode