Hide Dock icon when using dedicated hotkey window (GH-1154)#9926
Hide Dock icon when using dedicated hotkey window (GH-1154)#9926ShankyJS wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
Adds an opt-in macOS-only setting that hides Warp's Dock icon while a dedicated hotkey window is the active global hotkey mode and a keybinding is configured. When effective, Warp switches NSApplicationActivationPolicy to Accessory; otherwise it stays Regular. Off by default. Recovery is built into the effective-state rule rather than left to the user: clearing the keybinding, switching away from Quake Mode, or turning the setting off restores the Dock icon immediately, so the user can never end up without an obvious way back to the app. Implements the spec at specs/GH1154/.
|
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 @ShankyJS 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 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 a macOS-only opt-in setting for hiding Warp from the Dock while the dedicated hotkey window mode is active, wires the setting through keybinding/mode transitions, and adds platform delegate support for changing the NSApplication activation policy.
Concerns
- For faster review, please upload screenshots or a video of the feature working end to end. This is a user-visible Settings/UI change and the provided PR context does not include visual evidence.
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
|
Hey @oz-agent thanks for the review, I've attached a video testing the feature. In the description (check for the manual testing done) |
|
/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 |
There was a problem hiding this comment.
Overview
This PR adds a macOS-only setting to hide Warp from the Dock while using the dedicated hotkey window and wires it through settings, startup, and the platform delegate.
Concerns
- Existing persisted
QuakeModeSettingsvalues that do not include the new field can fail deserialization unless the field has a serde default. - The startup application path only runs when an
AppStateexists, so launches without persisted app state skip enforcing the saved Dock visibility setting.
Verdict
Found: 0 critical, 2 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
| #[schemars( | ||
| description = "macOS only. Whether Warp should hide its Dock icon while the dedicated hotkey window is the active global hotkey mode and a keybinding is configured. Has no effect on Linux or Windows." | ||
| )] | ||
| pub hide_dock_icon: bool, |
There was a problem hiding this comment.
hide_dock_icon; without a serde default, deserializing QuakeModeSettings can fail instead of falling back to false.
| #[schemars( | |
| description = "macOS only. Whether Warp should hide its Dock icon while the dedicated hotkey window is the active global hotkey mode and a keybinding is configured. Has no effect on Linux or Windows." | |
| )] | |
| pub hide_dock_icon: bool, | |
| #[serde(default)] | |
| #[schemars( | |
| description = "macOS only. Whether Warp should hide its Dock icon while the dedicated hotkey window is the active global hotkey mode and a keybinding is configured. Has no effect on Linux or Windows." | |
| )] | |
| pub hide_dock_icon: bool, |
|
|
||
| if let Some(app_state) = &arg.app_state { | ||
| maybe_register_global_window_shortcuts(global_resource_handles.clone(), ctx); | ||
| KeysSettings::as_ref(ctx).apply_effective_dock_icon_visibility(ctx); |
There was a problem hiding this comment.
if let Some(app_state), so launches without a persisted app state skip applying the saved Dock visibility setting; move the apply outside the if or run it from the launch path after settings load so startup always enforces the setting.
Description
Implements issue #1154 per spec PR #9349.
Adds a macOS-only opt-in setting under Settings → Features → Global hotkey → Dedicated hotkey window: "Hide Warp from the Dock". When the user has selected the dedicated hotkey window mode and configured a keybinding, enabling the switch flips Warp's
NSApplicationActivationPolicytoAccessoryso the Dock icon disappears while Warp keeps running and responds to the global hotkey.Recovery is built into the effective-state rule, not the UI: switching away from Quake Mode, clearing the keybinding, or turning the setting off all restore the Dock icon immediately. Non-macOS platforms ignore the setting entirely (default no-op on the platform delegate trait).
Files
app/src/settings/mod.rs—hide_dock_icon: boolfield onQuakeModeSettings(defaultfalse).app/src/terminal/keys_settings.rs— setters,should_hide_dock_icon,apply_effective_dock_icon_visibility, and a purecompute_should_hide_dock_iconhelper that the unit tests target. Re-applied from the existingset_global_hotkey_mode_…andset_quake_mode_keybinding_…paths so mode/keybinding changes immediately update Dock visibility.crates/warpui_core/src/platform/mod.rs—Delegate::set_dock_icon_visible(&self, bool)with default no-op.crates/warpui/src/platform/mac/delegate.rs— macOS impl calls[NSApp setActivationPolicy:]on the main thread.crates/warpui_core/src/core/app.rs—AppContext::set_dock_icon_visible.app/src/root_view.rs— applies effective state at startup right aftermaybe_register_global_window_shortcuts.app/src/settings_view/features_page.rs— newFeaturesPageAction::QuakeEditorToggleHideDockIcon, telemetry mapping, action handler, mouse-state field, andrender_quake_mode_hide_dock_icon_rowrendered only inside theQuakeModebranch and gated with#[cfg(target_os = "macos")].Testing
Automated. Six new unit tests in
app/src/terminal/keys_settings.rscover each invariant fromspecs/GH1154/product.md:cargo fmt,cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings,clang-format, andcargo test -p warpare all clean locally.wgslfmtand the full-workspacecargo nextestrun were not executed locally (the diff doesn't touch shaders or the broader workspace), so reviewers should rely on CI for those.Manual. A full sweep of the product-spec invariants 1–17 has not been performed. Recommended manual validation before merging:
Server API dependencies
None.
Agent Mode
Changelog Entries for Stable
CHANGELOG-NEW-FEATURE: macOS: added an option to hide Warp from the Dock while using the dedicated hotkey window (Settings → Features → Global hotkey).
Closes #1154
Spec: #9349