Skip to content

store prompt attachments on queued prompt model, store on prompt queue, attach on submit#11901

Merged
harryalbert merged 7 commits into
masterfrom
harry/app-4617-store-message-attachments-in-queued-prompts-clearing
Jun 9, 2026
Merged

store prompt attachments on queued prompt model, store on prompt queue, attach on submit#11901
harryalbert merged 7 commits into
masterfrom
harry/app-4617-store-message-attachments-in-queued-prompts-clearing

Conversation

@harryalbert

@harryalbert harryalbert commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Before this PR, if you queued a prompt with an image attached, the image would stay attached in the input and not get associated with the prompt/cleared until send time. This isn't great, and is especially untenable if we want to allow users to queue multiple prompts, each with their own attachments.

This PR fixes it so that the queued prompt singleton stores prompt attachments along with the prompt text such that, when the prompt is queued, we can clear the attachments from the input and, when the prompt is sent, we can send the attachments with the prompt.

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

https://www.loom.com/share/814a8562374a456ead64f409321f1a0b

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

harryalbert commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

@harryalbert harryalbert marked this pull request as ready for review May 29, 2026 20:48
@harryalbert harryalbert requested a review from zachbai May 29, 2026 20:48
@oz-for-oss

oz-for-oss Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

@harryalbert

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

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.

Overview

This PR moves image/file attachments from live input staging onto queued prompt rows, threads queued row ids through local/slash/skill send paths, and adds tests/specs for the new behavior. The direct local send paths generally resolve row-owned attachments before removal, and I did not find security issues in the changed code.

Concerns

  • Queued shared-session viewer prompts can lose their row and attachments if the asynchronous upload path fails before emitting SendAgentPrompt; the row is removed immediately after starting dispatch.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/terminal/view.rs
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from 2537a8a to 4b7511a Compare June 1, 2026 17:23
@harryalbert harryalbert force-pushed the harry/app-4594-replace-queued-prompt-block-with-new-queued-ui-for-compact branch 2 times, most recently from 460dc2c to 9d6afd8 Compare June 1, 2026 20:50
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from 4b7511a to 3b91b0b Compare June 1, 2026 20:50
@harryalbert harryalbert force-pushed the harry/app-4594-replace-queued-prompt-block-with-new-queued-ui-for-compact branch from 9d6afd8 to f56e305 Compare June 1, 2026 20:53
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch 2 times, most recently from 697087a to f6ca26b Compare June 1, 2026 21:15
@harryalbert harryalbert force-pushed the harry/app-4594-replace-queued-prompt-block-with-new-queued-ui-for-compact branch from f56e305 to c560930 Compare June 1, 2026 21:15
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from f6ca26b to 25a4850 Compare June 1, 2026 21:49
Base automatically changed from harry/app-4594-replace-queued-prompt-block-with-new-queued-ui-for-compact to master June 1, 2026 22:05
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch 2 times, most recently from 382f07f to 5802a52 Compare June 2, 2026 14:06
@harryalbert harryalbert requested a review from moirahuang June 3, 2026 17:18
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from 5802a52 to 1b257a7 Compare June 5, 2026 16:39
Comment thread app/src/ai/blocklist/controller/input_context.rs Outdated
Comment thread app/src/ai/blocklist/queued_query.rs Outdated
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from 1b257a7 to f69a2fd Compare June 8, 2026 20:56
@harryalbert harryalbert force-pushed the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch from f69a2fd to bf0c7a0 Compare June 9, 2026 13:49
@harryalbert harryalbert merged commit 19018bf into master Jun 9, 2026
26 checks passed
@harryalbert harryalbert deleted the harry/app-4617-store-message-attachments-in-queued-prompts-clearing branch June 9, 2026 15:34
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