Add Copy action to locked initial cloud-mode queued prompt#13595
Merged
harryalbert merged 4 commits intoJul 11, 2026
Conversation
While a cloud agent environment is being created, the initial cloud-mode prompt is locked (it cannot be edited or deleted), yet the queued-prompt row still showed Edit and Delete actions. Deleting the locked row would discard the user's original prompt with no way to recover it if setup fails. For this specific locked row only, replace the Delete action with a Copy action that writes the full, original prompt text (including long or multiline content, read straight from the model rather than the truncated preview) to the clipboard. Send-now and Edit remain (disabled, with their existing tooltips). Local queued prompts and normal editable queued prompts are unchanged and keep their Delete action. The trailing action count is unchanged, so the row's reserved action footprint and layout are unaffected. Co-Authored-By: Oz <oz-agent@warp.dev>
Address review feedback: drop redundant/verbose comments added for the Copy action and let the code speak for itself, keeping only the few notes that explain non-obvious intent (e.g. the trailing-action-count invariant). No behavior change. Co-Authored-By: Oz <oz-agent@warp.dev>
Address further review feedback: drop the copy_button field doc, the has_copy_button_for_test accessor doc, the render-row Copy/Delete comment, and the test's long-prompt comment. No behavior change. Co-Authored-By: Oz <oz-agent@warp.dev>
harryalbert
reviewed
Jul 11, 2026
| .map(|state| state.send_now_button.as_ref(ctx).is_disabled()) | ||
| } | ||
|
|
||
| pub(super) fn has_copy_button_for_test(&self, query_id: QueuedQueryId) -> Option<bool> { |
Contributor
There was a problem hiding this comment.
can we get rid of this fn? it's an odd accessor and I don't love for_test fns. would prefer a more e2e test that doesn't rely on this
Contributor
Author
There was a problem hiding this comment.
Done — removed the has_copy_button_for_test accessor and reworked the test to be end-to-end: it now dispatches the real CopyRow action the Copy button fires on the locked initial cloud-mode prompt and asserts the full, untruncated prompt lands on the clipboard (and the row stays queued). No for_test peeking at internal button state. (cc7855a)
Address review feedback: remove the has_copy_button_for_test accessor and rework the test to exercise the real Copy action end-to-end — dispatch the same CopyRow action the Copy button fires on the locked initial cloud-mode prompt and assert the full, untruncated prompt lands on the clipboard and the row stays queued. Test-only change; no production behavior change. Co-Authored-By: Oz <oz-agent@warp.dev>
harryalbert
approved these changes
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While a cloud agent environment is being created, the initial cloud-mode prompt in the queued-prompts panel is locked — it can't be edited or deleted (tooltip: "The first cloud-mode prompt cannot be changed."). But the row still showed Edit and Delete actions, and deleting the locked row discarded the user's original prompt with no way to recover it if environment setup fails.
For this specific locked row only, this PR replaces the Delete action with a Copy action that writes the full, original prompt (including long or multiline content — read straight from the model, not the truncated single-line preview) to the clipboard. Send-now and Edit remain in place (disabled, with their existing tooltips).
The change is narrowly scoped:
Reported in the factory-client Slack thread.
Linked Issue
N/A — reported via the factory-client bug-triage Slack channel.
Testing
locked_initial_cloud_mode_prompt_shows_copy_action_that_copies_full_prompt) that asserts the locked initial cloud-mode row exposes a Copy action (and ordinary rows do not), and that clicking Copy writes the full prompt — verified with a long, multiline prompt — to the clipboard verbatim, leaving the row in the queue../script/formatclean;cargo clippy -p warp --libandcargo clippy -p warp --testsboth pass with-D warnings.cargo run --bin warp -- --api-key …): reached the cloud-mode "Creating Environment / Setting up environment" state with a locked queued prompt. On hover the row shows exactly three actions — up-arrow (Send now, disabled: "Prompts cannot be sent until environment setup is complete."), pencil (Edit, disabled: "The first cloud-mode prompt cannot be changed."), and the new Copy icon (tooltip "Copy"); the trash/Delete icon is gone. Clicking Copy and pasting reproduced the exact original prompt text (hello world from the copy test). A screenshot of the updated locked row is attached in the Slack thread.Screenshots / Videos
See the screenshot posted in the linked Slack thread (updated locked row showing Send / Edit / Copy).
Agent Mode
Conversation: https://staging.warp.dev/conversation/a4c032bd-4b58-4cef-9515-48a39781426d
Run: https://oz.staging.warp.dev/runs/019f4e23-07ab-7d81-b52a-2c2121c243fb
This PR was generated with Oz.