Skip to content

Rewind does not tell the user an attachment could not be restored #1075

Description

@Juliusolsson05

Follow-up from #929 / PR #1073.

What lands in #1073

The main process now produces a structured loss report for every attachment on a rewound prompt — restored, unavailable (external-reference / unreadable), or unsupported — and it crosses IPC as RewindSessionResult.promptAttachments, with the base64 stripped (the restored images already cross in promptImages).

The picker uses it: an attachment-only prompt is labelled [Image prompt], [Attachment not supported: spec.pdf] or [Attachment unavailable: shot.png] instead of vanishing from the list.

What does not

Nothing surfaces it after the rewind happens. src/renderer/src/workspace/hook/actions/provider.ts reads promptImages and ignores promptAttachments entirely, so:

  • Rewinding to a Codex/OpenCode/Grok image prompt prefills the composer with nothing at all — those providers declare supportsImageAttachments: false, so even a perfectly restored image is dropped on the way in. The picker row said [Image prompt]; the composer is empty and says nothing about why.
  • Rewinding to a Claude prompt whose attachment was a reference or an unsupported document loses it silently the same way.

Review of #1073 found this and it is correct: the row is a truthful description of the turn, but the user acts on it and then gets no explanation.

What to do

Read result.promptAttachments in the rewind action and tell the user what did not come back — a toast, or an inline note on the prefilled composer. The report is designed for exactly this and carries status, reason, mediaType and name.

Worth deciding at the same time: whether a provider that cannot carry images should offer an image-only prompt as a rewind target at all, or offer it with the loss stated up front.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions