mirror of
https://github.com/warpdotdev/warp.git
synced 2026-05-06 23:32:51 +08:00
## 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`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). ## Screenshots / Videos - Loom demo: https://www.loom.com/share/b57f7bfebea44a15b2703140db88c758 ## 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 - [x] 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>