Add warp://tabconfig/<name> deeplink#9379
Conversation
Mirrors the existing warp://launch flow: resolves <name> against the user's tab configs (case-insensitive on the config name, falling back to the file stem) and dispatches to Workspace::open_tab_config, which already handles the params modal / worktree branch generation. By default the tab config opens as a new tab in the active window; pass ?new_window=true (or have no Warp window open) to open in a brand-new window instead. Gated on the existing FeatureFlag::TabConfigs.
|
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 @haha1903 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 |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I requested changes on this pull request and posted feedback. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds a warp://tabconfig/<name> handler that resolves local tab configs by display name or source file stem and opens them in an existing or new workspace.
Concerns
- The URI window-behavior hint can create a fallback window before the tabconfig handler sees
?new_window=true, which can violate the documented default/new-window behavior on platforms that cannot activate the existing window. - Security pass: no additional security findings beyond the window-selection behavior noted inline.
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
| // Linear deeplink opens a new tab with agent view | ||
| Self::Linear => W::default(), | ||
| // Tab config deeplink prefers existing window unless ?new_window=true. | ||
| Self::TabConfig => W::default(), |
There was a problem hiding this comment.
window_behavior_hint() is resolved before handle_tab_config_uri can inspect ?new_window=true; on Linux/Wayland this W::default() fallback can create a window up front, so no-query links may ignore the existing window and new_window=true can produce an extra empty window before the tab config opens. Move the new/reuse decision into the handler or use a hint that cannot pre-create a window.
Description
Add a
warp://tabconfig/<name>URL scheme handler so users can launch a saved tab config straight from a deeplink (alongside the existingwarp://launch/<name>).By default the tab config opens as a new tab in the active window. Pass
?new_window=true(or invoke when no Warp window is open) to open in a brand-new window instead.<name>matches the tab config'snamefield case-insensitively, falling back to the file stem so bothwarp://tabconfig/My%20Tabandwarp://tabconfig/my_tab.tomlwork.The handler dispatches to the existing
Workspace::open_tab_config, so the params modal and worktree branch generation flows are reused unchanged.Gated on the existing
FeatureFlag::TabConfigs.Why
Lets users (and external tools / scripts / browser bookmarks) jump straight into a configured pane layout without going through the
+menu. Mirrors the long-standingwarp://launch/...deeplink for launch configs.How
UriHost::TabConfigvariant inapp/src/uri/mod.rs, parsed fromtabconfighost string and listed invalidate_custom_uri's allowlist.handle_tab_config_urithat resolves the config and either reuses the active window's workspace or opens a new window (viaopen_new_window_get_handles), then callsworkspace.open_tab_config(...).Workspace::open_tab_configpromoted from private topub(crate)so it can be invoked from the URI handler.load_tab_configsso the cross-platformpub(crate) use imp::load_tab_configs;inuser_config/mod.rsmatches the pattern already used byload_launch_configs(nocfggate needed).Testing
Manual:
open "warposs://tabconfig/<name>"opens the config as a new tab in the focused window.open "warposs://tabconfig/<name>?new_window=true"opens it in a new window.paramstriggers the existing params modal.<name>logs a warning and is a no-op.cargo fmtandcargo clippy --workspace --all-targets --all-features --tests -- -D warningsboth pass locally. Full./script/presubmitwill run on CI.Server API dependencies
No server changes.
Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: Added a
warp://tabconfig/<name>deeplink that opens a saved tab config in the active window (or a new one with?new_window=true).