Skip to content

Add tab context metadata copy actions#10120

Merged
zachlloyd merged 4 commits intomasterfrom
zach/tab-context-copy-metadata
May 6, 2026
Merged

Add tab context metadata copy actions#10120
zachlloyd merged 4 commits intomasterfrom
zach/tab-context-copy-metadata

Conversation

@zachlloyd
Copy link
Copy Markdown
Contributor

@zachlloyd zachlloyd commented May 5, 2026

Description

Adds copy actions to the attached tab context menu so users can copy tab/session metadata directly from the same UI surface where that metadata is shown.

The menu now includes copy actions for available, non-empty metadata when it makes sense for the current tab layout:

  • Horizontal tabs show Copy tab title only, matching the metadata visible in the horizontal tab strip.
  • Vertical tabs grouped by tabs show copy actions for the tab title plus available focused-session metadata such as branch, working directory, and pull request link.
  • Vertical tabs grouped by panes show copy actions sourced from the active pane, including Copy pane title instead of Copy tab title.

All new copy actions use sentence casing, and unavailable metadata is omitted from the menu rather than shown disabled.

Linked Issue

  • 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 (especially for user-visible or UI changes).

Screenshots / Videos

Testing

Added integration coverage for the main layout variants:

  • test_tab_context_menu_copies_metadata covers horizontal tabs. It verifies that only the tab title copy action is present, and that selecting it copies the tab title.
  • test_vertical_tab_context_menu_copies_metadata covers vertical tabs grouped by tabs. It verifies that the context menu can copy the branch, tab title, and working directory for the tab/focused session.
  • test_vertical_pane_context_menu_copies_metadata covers vertical tabs grouped by panes. It creates a split pane with different metadata and verifies that the menu copies the active pane branch, pane title, and working directory.

Validation run:

  • ./script/run (bundled and launched WarpLocal.app)
  • ./script/run (bundled and launched WarpLocal.app)
  • PATH=/tmp/warp-corepack-bin:$PATH /Users/zach/Projects/warp_3/target/debug/integration test_tab_context_menu_copies_metadata
  • PATH=/tmp/warp-corepack-bin:$PATH /Users/zach/Projects/warp_3/target/debug/integration test_vertical_tab_context_menu_copies_metadata
  • PATH=/tmp/warp-corepack-bin:$PATH /Users/zach/Projects/warp_3/target/debug/integration test_vertical_pane_context_menu_copies_metadata
  • cargo fmt --manifest-path /Users/zach/Projects/warp_3/Cargo.toml --all --check
  • PATH=/tmp/warp-corepack-bin:$PATH cargo nextest run --manifest-path /Users/zach/Projects/warp_3/Cargo.toml --no-fail-fast --workspace test_tab_context_menu_copies_metadata test_vertical_tab_context_menu_copies_metadata test_vertical_pane_context_menu_copies_metadata
  • PATH=/tmp/warp-corepack-bin:$PATH cargo clippy --manifest-path /Users/zach/Projects/warp_3/Cargo.toml --workspace --all-targets --all-features --tests -- -D warnings

Note: initial nextest/clippy attempts without temporary Corepack shims failed in command-signatures-v2 because the global Yarn version is 1.22.22 while that crate requires Corepack/Yarn 4.0.1. Rerunning with temporary Corepack shims passed.

Agent Mode

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

CHANGELOG-IMPROVEMENT: Added tab context menu actions to copy visible tab and pane metadata when available.

Co-Authored-By: Oz oz-agent@warp.dev

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 5, 2026
zachlloyd and others added 2 commits May 4, 2026 20:14
Co-Authored-By: Oz <oz-agent@warp.dev>
Adjust copy metadata menu items to reflect horizontal tabs, vertical tab grouping, and vertical pane grouping. Add integration coverage for pane-grouped vertical tabs and update the specs.

Co-Authored-By: Oz <oz-agent@warp.dev>
@zachlloyd zachlloyd requested a review from zachbai May 5, 2026 22:27
@zachlloyd zachlloyd marked this pull request as ready for review May 5, 2026 22:28
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 5, 2026

@zachlloyd

I'm starting a first review of this pull request.

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

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

Adds layout-aware copy actions for tab and vertical-tabs context menus, with integration coverage for horizontal tab, vertical tab, and vertical pane modes.

Concerns

  • Pane-mode row context menus copy metadata from the focused pane rather than the clicked pane, so right-clicking a non-focused pane row can copy the wrong title, branch, and working directory.

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/tab.rs Outdated
Use the clicked pane row as the metadata source when vertical tabs are grouped by panes, falling back to the focused pane only when there is no valid clicked-pane target. Update the integration coverage to right-click a non-focused pane row so the regression fails before the fix and passes after.

Co-Authored-By: Oz <oz-agent@warp.dev>
@zachlloyd zachlloyd enabled auto-merge (squash) May 5, 2026 23:59
@zachlloyd zachlloyd merged commit 69b6343 into master May 6, 2026
26 checks passed
@zachlloyd zachlloyd deleted the zach/tab-context-copy-metadata branch May 6, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants