Commit 69b6343
Add tab context metadata copy actions (#10120)
## 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>1 parent 27d8ef6 commit 69b6343
6 files changed
Lines changed: 533 additions & 7 deletions
File tree
- app/src
- crates/integration
- src
- bin
- test
- tests/integration
- specs/tab-context-copy-metadata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
289 | 397 | | |
290 | 398 | | |
291 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
0 commit comments