Skip to content

Run tab-level commands from launch config URIs - #13103

Merged
moirahuang merged 2 commits into
warpdotdev:masterfrom
AndreKalberer:andrekalberer/launch-config-uri-commands
Jul 8, 2026
Merged

moirahuang merged 2 commits into
warpdotdev:masterfrom
AndreKalberer:andrekalberer/launch-config-uri-commands

Conversation

@AndreKalberer

@AndreKalberer AndreKalberer commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Launch configuration tabs can include a top-level commands: block. When opening a launch config through warp://launch/<name>, Warp preserved the tab layout/cwd but dropped those tab-level commands because only pane-level commands were applied to the pane layout.

This normalizes tab-level commands into the startup pane before opening the tab. For split layouts, commands are applied to the focused pane, falling back to the first pane if no pane is focused.

Linked Issue

Closes #9007

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

Testing

  • I have manually tested my changes locally with ./script/run

Automated:

  • cargo fmt
  • cargo test -p warp launch_config --lib
  • cargo check -p warp --lib
  • cargo check -p integration
  • cargo clippy -p warp --tests -- -D warnings

Manual:

  • Before: master opens warposs://launch/warptest, but cat /tmp/warp-9007-uri-command.txt reports no such file.
  • After: this branch opens the same URI and automatically runs echo after > /tmp/warp-9007-uri-command.txt; cat prints after.
  • Multi-pane: this branch opens a split-pane launch config and runs the tab-level command in the focused pane; cat /tmp/warp-9007-uri-multipane-command.txt prints multipane-after.

Screenshots / Videos

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed launch configuration tab-level commands not running when opened through warp://launch/<name>.

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 26, 2026
@AndreKalberer
AndreKalberer marked this pull request as ready for review June 26, 2026 21:00
@warp-for-oss

warp-for-oss Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

@AndreKalberer

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

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

Powered by Oz

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

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.

Overview

This PR deserializes tab-level launch-config commands and normalizes them into the startup pane before opening a launch-config window, including URI launches. It preserves existing pane-level command behavior and includes coverage for leaf layouts and focused panes in split layouts.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found. The only non-blocking follow-up is to cover the no-focused-pane fallback path added in this PR.

Verdict

Found: 0 critical, 0 important, 1 suggestion

Approve

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

Powered by Oz

PaneTemplateType::PaneBranchTemplate { panes, .. } => {
if let Some(focused_pane) = panes.iter_mut().find(|pane| pane.is_focused_pane()) {
focused_pane.add_commands_to_startup_pane(tab_commands)
} else if let Some(first_pane) = panes.first_mut() {

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.

💡 [SUGGESTION] Add a unit test for the no-focused-pane path so the documented fallback applies tab-level commands to the first pane, not just to focused panes.

@warp-for-oss
warp-for-oss Bot requested a review from moirahuang June 26, 2026 21:05
@AndreKalberer

Copy link
Copy Markdown
Contributor Author

/oz-review

@warp-for-oss

warp-for-oss Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

@AndreKalberer

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

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

Powered by Oz

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

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.

Overview

This PR teaches launch config tab templates to deserialize legacy tab-level commands, normalizes those commands into the startup pane before opening a launch config window, and adds unit coverage for leaf, focused split-pane, and fallback split-pane behavior. The PR description includes before/after videos for the user-facing launch behavior.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found 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

@moirahuang moirahuang left a comment

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 looks good! Mind adding a recording of the multi pane case to the description? Then I'll merge it

@AndreKalberer

Copy link
Copy Markdown
Contributor Author

@moirahuang added the multi-pane recording to the PR description.

@moirahuang
moirahuang merged commit 482f63a into warpdotdev:master Jul 8, 2026
35 checks passed
zhangyu1818 pushed a commit to zhangyu1818/warply that referenced this pull request Jul 11, 2026
Port upstream commit 482f63a. Launch configuration tabs can include a
top-level commands: block. Previously, when opening a launch config
through warp://launch/<name>, Warp preserved the tab layout/cwd but
dropped those tab-level commands because only pane-level commands were
applied to the pane layout.

This normalizes tab-level commands into the startup pane before opening
the tab. For split layouts, commands are applied to the focused pane,
falling back to the first pane if no pane is focused.

- Add commands: Vec<CommandTemplate> field to TabTemplate
- Add TabTemplate::layout_with_tab_commands() method
- Add PaneTemplateType::add_commands_to_startup_pane() and
  is_focused_pane() helpers
- Update workspace/view.rs to call layout_with_tab_commands()
- Set commands: Vec::new() in TryFrom<TabSnapshot> and mock/test literals

Closes warpdotdev#9007.
NourEldinShobier pushed a commit to NourEldinShobier/MyWarp that referenced this pull request Nov 16, 2026
Launch configuration tabs can include a top-level `commands:` block.
When opening a launch config through `warp://launch/<name>`, Warp
preserved the tab layout/cwd but dropped those tab-level commands
because only pane-level commands were applied to the pane layout.

This normalizes tab-level commands into the startup pane before opening
the tab. For split layouts, commands are applied to the focused pane,
falling back to the first pane if no pane is focused.

CHANGELOG-BUG-FIX: Fixed launch configuration tab-level commands not
running when opened through `warp://launch/<name>`.

(cherry picked from commit 482f63a)
(cherry picked from commit 0826467)
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.

commands / exec entries in Launch Configurations do not execute when triggered via warp://launch/<name>

2 participants