Skip to content

feat: add "Restore macOS Terminal as Default" functionality#9971

Open
jiakeboge wants to merge 4 commits intowarpdotdev:masterfrom
jiakeboge:feature/unset-default-terminal
Open

feat: add "Restore macOS Terminal as Default" functionality#9971
jiakeboge wants to merge 4 commits intowarpdotdev:masterfrom
jiakeboge:feature/unset-default-terminal

Conversation

@jiakeboge
Copy link
Copy Markdown

@jiakeboge jiakeboge commented May 3, 2026

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:

  • A new platform-specific function for macOS to restore the default role handler to Terminal.app.
  • A dynamic menu item that toggles between "Set Warp as Default Terminal" and "Restore macOS Terminal as Default" based on the current state.
  • An updated Features settings page that provides a link to restore the default terminal when Warp is currently set as default.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Screenshots or a short video of the implementation are included below.

Screenshots / Videos

Testing

  • Manual Testing: Verified on macOS that clicking "Set Warp as Default Terminal" correctly updates the system setting, and the menu item subsequently changes to "Restore macOS Terminal as Default". Clicking the restore option correctly sets the default back to Terminal.app.
  • Unit Testing: Updated the DefaultTerminal model to ensure the is_warp_default state is correctly updated when the restore action is triggered.
  • Cross-platform: Verified that the logic correctly fallbacks to "Not implemented" on non-macOS platforms.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI 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.

jiakeboge added 2 commits May 3, 2026 18:38
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.
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 3, 2026

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 @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 3, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@jiakeboge

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@oz-for-oss oz-for-oss Bot requested a review from lucieleblanc May 3, 2026 11:08
Copy link
Copy Markdown
Contributor

@lucieleblanc lucieleblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread app/src/default_terminal/mod.rs Outdated
}
}

pub fn unset_warp_default(&mut self, ctx: &mut ModelContext<Self>) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread app/src/default_terminal/mac.rs Outdated
set_default_terminal(&bundle_id)
}

pub fn unset_warp_as_default_terminal() -> Result<(), String> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: please rename identifiers to use the "restore" wording instead of the "unset" wording.

@jiakeboge
Copy link
Copy Markdown
Author

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).

WIP

@jiakeboge jiakeboge closed this May 9, 2026
@jiakeboge jiakeboge reopened this May 9, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@jiakeboge

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 9, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@cla-bot cla-bot Bot added the cla-signed label May 9, 2026
@jiakeboge
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@jiakeboge

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@jiakeboge
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 9, 2026

The cla-bot has been summoned, and re-checked this pull request!

oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 9, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rs contains stray trailing tokens after the final GraphicsBackendWidget implementation, 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

Comment thread app/src/settings_view/features_page.rs Outdated
col.finish()
}
}
nish()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [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.
@jiakeboge
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@jiakeboge

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: @lucieleblanc.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed stale reviews from themself May 9, 2026 03:30

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@oz-for-oss oz-for-oss Bot requested a review from lucieleblanc May 9, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add 'Restore macOS Terminal as Default' functionality

2 participants