feat: add "Restore macOS Terminal as Default" functionality#9971
feat: add "Restore macOS Terminal as Default" functionality#9971jiakeboge wants to merge 4 commits intowarpdotdev:masterfrom
Conversation
This change allows users to revert the default terminal setting back to the macOS system Terminal (com.apple.Terminal). - Added `unset_warp_as_default_terminal` to macOS platform implementation. - Updated `DefaultTerminal` model to support unsetting the default status. - Modified the app menu to dynamically toggle between "Set" and "Unset" labels. - Enabled unsetting the default terminal from the Features settings page.
- Added `unset_warp_as_default_terminal` to revert to Terminal.app. - Updated menu item label to "Restore macOS Terminal as Default" when Warp is the current default. - Added a corresponding link in the Features settings page for better discoverability.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @jiakeboge on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: @lucieleblanc. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds a macOS restore path for the default terminal handler, updates the app menu to toggle between setting Warp and restoring Terminal.app, and adds a matching settings-page action.
Concerns
No important correctness or security concerns were identified in the changed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
lucieleblanc
left a comment
There was a problem hiding this comment.
Thank you for the PR! The overall approach makes sense to me. Instead of trying to restore whatever the previous default terminal app was, restoring the default MacOS Terminal.app is simpler.
A couple of changes to make before we enable CI:
- Lename the new events, enum variants, functions, etc. to use the "restore" wording instead of the "unset" wording. "Restore" is the more accurate terminology.
- Include a screen recording in the PR description that demonstrates this feature working end to end.
- Make sure to sign the CLA (see bot comment above).
| } | ||
| } | ||
|
|
||
| pub fn unset_warp_default(&mut self, ctx: &mut ModelContext<Self>) { |
There was a problem hiding this comment.
This isn't really "unset" -- it resets to the native terminal app. Could we rename this to "restore_macos_terminal_as_default" or something of the like?
| set_default_terminal(&bundle_id) | ||
| } | ||
|
|
||
| pub fn unset_warp_as_default_terminal() -> Result<(), String> { |
There was a problem hiding this comment.
Same here: please rename identifiers to use the "restore" wording instead of the "unset" wording.
WIP |
|
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 adds a macOS restore path for the default terminal setting and wires it into the app menu and Features settings page.
Concerns
⚠️ The change is user-visible, but the PR description's Screenshots / Videos section only contains placeholder bullets and no attached screenshot or screen recording. Manual testing evidence is required for changes that can be manually tested; please attach screenshots or a screen recording showing the menu toggle and settings link end to end, or justify why visual evidence is not possible.
Verdict
Found: 0 critical, 1 important, 0 suggestions
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
Renamed internal identifiers, functions, and enum variants from 'unset' to 'restore' to better reflect the action of reverting the default terminal back to Terminal.app. This addresses feedback from the PR review to use more accurate terminology, consistent with recent UI label changes. - Renamed `unset_warp_default` to `restore_macos_terminal_as_default`. - Updated `UnsetWarpDefaultTerminal` to `RestoreMacOSTerminalAsDefault`. - Updated associated telemetry and UI event handlers.
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Overview
This PR adds controls to restore macOS Terminal as the default shell handler from the app menu and Features settings page.
Concerns
app/src/settings_view/features_page.rscontains stray trailing tokens after the finalGraphicsBackendWidgetimplementation, which should make the Rust source fail to compile.- Manual testing evidence is missing for a user-visible menu/settings change. The PR description only contains placeholder entries (
[Menu Bar Toggle Demonstration],[Settings Page Link Update]) rather than screenshots or a screen recording showing the change end to end.
Verdict
Found: 1 critical, 1 important, 0 suggestions
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
| col.finish() | ||
| } | ||
| } | ||
| nish() |
There was a problem hiding this comment.
🚨 [CRITICAL] This stray token block leaves features_page.rs syntactically invalid, so the app will not compile. Remove the extra lines after the GraphicsBackendWidget impl.
Fixed a syntax error at the end of features_page.rs caused by stray 'nish()' tokens. Also verified all 'unset' references are removed in favor of 'restore' terminology per reviewer request.
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
Oz no longer requests changes for this pull request after the latest automated review.
There was a problem hiding this comment.
Overview
This PR adds a macOS restore path for resetting the default terminal handler to Terminal.app and updates the menu/settings entry points to dispatch that action.
Concerns
- No blocking correctness or security concerns found in the annotated diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
This PR implements the functionality to unset Warp as the default terminal. Currently, setting Warp as the default terminal is a one-way operation. This change allows users to easily revert the default terminal setting back to the macOS system Terminal (
com.apple.Terminal).Closes #10007
The implementation includes:
Linked Issue
ready-to-specorready-to-implement.Screenshots / Videos
Testing
DefaultTerminalmodel to ensure theis_warp_defaultstate is correctly updated when the restore action is triggered.Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: Added the ability to restore the macOS system Terminal as the default terminal from the Warp menu and settings page.