Skip to content

Add Copy action to locked initial cloud-mode queued prompt#13595

Merged
harryalbert merged 4 commits into
masterfrom
factory/copy-locked-initial-cloud-mode-prompt
Jul 11, 2026
Merged

Add Copy action to locked initial cloud-mode queued prompt#13595
harryalbert merged 4 commits into
masterfrom
factory/copy-locked-initial-cloud-mode-prompt

Conversation

@warp-dev-github-integration

@warp-dev-github-integration warp-dev-github-integration Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

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:

  • Only the locked initial cloud-mode prompt row is affected.
  • Local queued prompts and normal editable queued prompts are unchanged and keep their existing Delete action and behavior.
  • The trailing action count is unchanged (Send / Edit / Copy vs. Send / Edit / Delete), so the row's reserved action footprint and layout are unaffected.

Reported in the factory-client Slack thread.

Linked Issue

N/A — reported via the factory-client bug-triage Slack channel.

Testing

  • Added a unit test (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/format clean; cargo clippy -p warp --lib and cargo clippy -p warp --tests both pass with -D warnings.
  • Manual UI verification with the built dogfood app (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

  • Warp Agent Mode - This PR was created via Warp's AI 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.

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>
oz-agent added 2 commits July 11, 2026 00:55
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>
.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> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 harryalbert enabled auto-merge (squash) July 11, 2026 03:49
@harryalbert harryalbert merged commit 9e10550 into master Jul 11, 2026
27 checks passed
@harryalbert harryalbert deleted the factory/copy-locked-initial-cloud-mode-prompt branch July 11, 2026 04:05
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