Include prompts in terminal block copy#10181
Conversation
|
I'm starting a first review of this pull request. I reviewed this pull request and requested human review from: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR changes the block copy path to serialize the full block via the block model's grid ordering, so prompts, commands, right prompts, and output are copied consistently with block selection behavior.
Concerns
- No blocking correctness, security, or error-handling concerns found in the annotated 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
c4e13eb to
a23865f
Compare
lucieleblanc
left a comment
There was a problem hiding this comment.
Hi @gabrimatic, thank you for the PR!
The "copy" action hasn't included the shell prompt or right prompt since March 2022; this isn't a regression. That said, we did recently migrate settings to a file, which may have inadvertently switched your shell prompt back from a custom PS1 to Warp's built-in prompt. Could switching back to PS1 be what you're looking for?
Otherwise, I'd prefer to gate this change on the user's prompt selection; if the user is using a custom PS1, including their prompt in the "copy" action seems reasonable. Otherwise, if they're using the built-in prompt, we should preserve the existing behavior and only include the command + output in the "copy" action.
Please do include a screen recording to demonstrate you've tested this feature locally!
|
Hi @lucieleblanc, thanks for the review. I updated this to gate the behavior on the block prompt mode:
I also added focused coverage for both prompt modes and re-ran:
I still need to add the short local screen recording you asked for; I will follow up with that separately. |
|
@lucieleblanc follow-up from the local built app at I verified the copy behavior in both prompt modes. The clipboard contents were: Built-in Warp prompt: Shell prompt / PS1: I also checked the prompt-switch path: after switching to PS1, the next PS1-captured block includes the shell prompt as expected, while an already-started block keeps the previous block prompt mode. That matches this patch using each block's I am not calling this ready for re-review yet because the requested screen recording is still not attached. I will add that separately once I can capture it cleanly. |
|
@lucieleblanc I pushed one more commit (
I ran:
This is in addition to the focused model tests. The requested screen recording is still pending, so I am leaving the PR marked as not ready for re-review until that is attached. |
|
@lucieleblanc I added the requested visual evidence to the PR body. Warp prompt (
PS1 prompt (
These were captured from the Linux/Xvfb renderer-recorded integration run at
Ready for re-review. |
d3dd1ef to
14227a0
Compare
|
/oz-review |
|
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: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates the block context-menu Copy action so custom PS1 blocks copy prompt, command, right prompt, and output in the block model's grid order while preserving the existing command-plus-output behavior for Warp's built-in prompt. The added unit and integration coverage exercises both prompt modes through the model helper and UI copy flow.
Concerns
- None.
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
|
Hi @gabrimatic — a reviewer requested changes on this PR and it hasn't had activity from you in 25 days. When you get a chance, please push updates or reply to the review so a reviewer can take another look. Without activity, this PR will be automatically closed after 30 days of inactivity. |
|
Hi @gabrimatic — final reminder: a reviewer requested changes on this PR and it has been inactive for 26 days. It will be automatically closed in about 4 day(s) unless you push updates or reply. Maintainers can apply the |
14227a0 to
9fdc68a
Compare
Description
Linked Issue
ready-to-implement.Screenshots / Videos
Linux/Xvfb renderer recordings from the integration copy flow:
Warp prompt (

HonorPS1=false):Short video: pr10181-warp-prompt-copy.mp4
PS1 prompt (

HonorPS1=true):Short video: pr10181-ps1-copy.mp4
Testing
cargo fmt --checkgit diff --checkcargo nextest run -p warp test_command_and_output_to_stringWARP_SHELL_PATH=/bin/zsh cargo run -p integration -- test_copy_block_command_and_output_honor_ps1_disabledWARP_SHELL_PATH=/bin/zsh cargo run -p integration -- test_copy_block_command_and_output_honor_ps1_enabledWARP_SHELL_PATH=/bin/zsh cargo test -p integration test_copy_block_command_and_output -- --nocaptureWARP_INTEGRATION_TEST_VIDEO=1 WGPU_BACKEND=vulkan WARPUI_USE_REAL_DISPLAY_IN_INTEGRATION_TESTS=1 WARP_SHELL_PATH=/bin/zsh cargo test -p integration test_copy_block_command_and_output -- --nocapture --test-threads=1