Skip to content

fix(app): restore queued attachments to the composer when editing - #49081

Merged
Hona merged 1 commit into
anomalyco:v2from
Hona:queue-edit-attachments
Sep 15, 2026
Merged

Hona merged 1 commit into
anomalyco:v2from
Hona:queue-edit-attachments

Conversation

@Hona

@Hona Hona commented Sep 15, 2026

Copy link
Copy Markdown
Member

Clicking a queued follow-up to edit it only restored the text. Its attachments stayed hidden in the inbox payload and were silently re-attached on confirm, so they could not be seen, removed, or extended. An attachment-only entry opened an empty composer and confirming it just cancelled the edit.

Before After
flowchart LR
  subgraph edit
    A[inbox payload.files] -->|inline, no mention| B[composer image parts]
    A -->|mention or file:// context| C[kept in payload]
  end
  subgraph confirm
    B --> D[request.files]
    C --> D
    D --> E[replacement prompt]
  end
Loading
  • edit() hydrates inline attachments into ImageAttachmentParts via createLegacyBlobReference, the same shape extractPromptFromMessage uses for delivered messages, so the composer chips render with their remove buttons.
  • editedPromptInput() now takes attachments from the composer and only carries over stored file mentions and file:// context files, which the composer cannot represent.
  • The pristine check compares the composer's attachment set against the original so a confirm with only attachment changes is admitted instead of cancelled.
  • Follow-up to fix(app): drop 'Plus' prefix from queued attachment label #49080.

@Hona
Hona requested a review from Brendonovich as a code owner September 15, 2026 00:20
Copilot AI lite review requested due to automatic review settings September 15, 2026 00:20

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hona
Hona force-pushed the queue-edit-attachments branch from 6d36c77 to c28dd4c Compare September 15, 2026 00:36
@Hona
Hona enabled auto-merge (squash) September 15, 2026 00:43
@Hona
Hona merged commit 98f2a87 into anomalyco:v2 Sep 15, 2026
8 checks passed
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants