Skip to content

Add warp://tabconfig/<name> deeplink#9379

Open
haha1903 wants to merge 2 commits intowarpdotdev:masterfrom
haha1903:haichang/tabconfig-uri
Open

Add warp://tabconfig/<name> deeplink#9379
haha1903 wants to merge 2 commits intowarpdotdev:masterfrom
haha1903:haichang/tabconfig-uri

Conversation

@haha1903
Copy link
Copy Markdown

@haha1903 haha1903 commented Apr 29, 2026

Closes #9060
Related to #9083

Description

Add a warp://tabconfig/<name> URL scheme handler so users can launch a saved tab config straight from a deeplink (alongside the existing warp://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's name field case-insensitively, falling back to the file stem so both warp://tabconfig/My%20Tab and warp://tabconfig/my_tab.toml work.

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-standing warp://launch/... deeplink for launch configs.

How

  • New UriHost::TabConfig variant in app/src/uri/mod.rs, parsed from tabconfig host string and listed in validate_custom_uri's allowlist.
  • New handler handle_tab_config_uri that resolves the config and either reuses the active window's workspace or opens a new window (via open_new_window_get_handles), then calls workspace.open_tab_config(...).
  • Workspace::open_tab_config promoted from private to pub(crate) so it can be invoked from the URI handler.
  • Added a wasm-side stub for load_tab_configs so the cross-platform pub(crate) use imp::load_tab_configs; in user_config/mod.rs matches the pattern already used by load_launch_configs (no cfg gate 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.
  • Tab config with params triggers the existing params modal.
  • Worktree-style tab configs still get an autogenerated branch name.
  • Unknown <name> logs a warning and is a no-op.

cargo fmt and cargo clippy --workspace --all-targets --all-features --tests -- -D warnings both pass locally. Full ./script/presubmit will run on CI.

Server API dependencies

No server changes.

Agent Mode

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

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.
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 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 @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 to trigger another check.

@haha1903
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

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

@haha1903 haha1903 marked this pull request as ready for review April 29, 2026 12:15
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@haha1903

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 /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 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

Comment thread app/src/uri/mod.rs Outdated
Use WindowBehaviorHint::Nothing so handle_tab_config_uri is the sole
owner of the new-vs-reuse decision.
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 30, 2026

@haha1903

I'm checking this implementation PR for association with a likely matching ready issue.

Powered by Oz

@captainsafia captainsafia added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Apr 30, 2026 — with Warp Dev Github Integration
@haha1903
Copy link
Copy Markdown
Author

haha1903 commented May 3, 2026

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@haha1903

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

@haha1903
Copy link
Copy Markdown
Author

haha1903 commented May 3, 2026

Found matching issue #9060 (Support warp://tab_config/<tab_configuration_path>) — linked it via Closes #9060 in the PR body and left a comment there requesting ready-to-implement. #9083 covers the same ground from a broader angle and is referenced as Related to. Happy to adjust the URL path (tabconfig vs tab_config) or any other naming to match whatever the team prefers.

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 warp://tabconfig/<name> URI host, resolves saved tab configs by display name or file stem, and opens the selected config in an existing or new window.

Concerns

  • The new handler imports and calls root_view::workspace_for_window, but that helper is not present in the repository and is not added by this diff, so the PR will not compile.
  • This is user-visible behavior and the PR description does not include screenshots or a video demonstrating the deeplink flow end to end; per repository review guidance, please upload visual evidence for faster review.

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/uri/mod.rs
use crate::launch_configs::launch_config::LaunchConfig;
use crate::linear::{LinearAction, LinearIssueWork};
use crate::root_view::{open_new_window_get_handles, OpenLaunchConfigArg};
use crate::root_view::{open_new_window_get_handles, workspace_for_window, OpenLaunchConfigArg};
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] workspace_for_window is imported and called below, but root_view does not define or export this helper in the current codebase and this diff does not add it, so this fails to compile. Use the existing ctx.views_of_type::<Workspace>(window_id) lookup pattern or add/export the helper in this PR.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This isn't accurate — workspace_for_window is already defined as pub fn at app/src/root_view.rs:550 (pre-existing, not added by this PR; it's also used within root_view.rs at lines 633 and 733). The use crate::root_view::{..., workspace_for_window, ...} import in uri/mod.rs resolves fine.

Verified locally: cargo check -p warp --lib passes on this branch.

@haha1903
Copy link
Copy Markdown
Author

haha1903 commented May 3, 2026

@seemeroland when you have a minute — could I get a look from you on this one? It mirrors the existing warp://launch/... flow for tab configs. Oz flagged a CRITICAL compile error on the workspace_for_window import, but that function is already pub fn at root_view.rs:550 (and cargo check -p warp --lib passes locally), so I pushed back in-thread. Thanks!

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.

Support warp://tab_config/<tab_configuration_path>

2 participants