Skip to content

[Bug]: A stale tab can erase finalized stashed images #36573

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open two tabs sharing the same T3 Code origin and storage.
  2. In tab A, stash a prompt with an image while its image encoding is pending.
  3. Load the stash store in tab B before A finishes encoding. B treats the pending image as orphaned in its in-memory copy.
  4. Let tab A finish encoding and persist the image attachment.
  5. Stash unrelated text in tab B, then reload tab A and restore the image prompt.

Expected behavior

The original prompt retains its finalized image attachment after another tab changes the stash.

Actual behavior

Tab B replaces the saved entry with its stale in-memory copy, removing the finalized image bytes from storage. Reloading loses the attachment.

Impact

Minor bug or occasional failure

Version or commit

pingdotgg/main @ 96051c6

Environment

Web tabs sharing localStorage. Provider independent.

Logs or stack traces

The deterministic store repro extends the existing “keeps an entry another tab” test. After tab A finalizes and tab B stashes unrelated text, persisted attachments are [] instead of the finalized image.
Command: pnpm exec vp test run apps/web/src/promptStashStore.test.ts -t 'keeps an entry another tab'.

Screenshots, recordings, or supporting files

Found by the bughunt and independently confirmed by Claude Opus 5.5 on the commit above; reproduced again by the fix lead. The fix PR carries the regression test.

Workaround

Avoid using the stash from another tab while an image is encoding.

Activity

  1. added
    vouch:trusted
    on Nov 14, 2026
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

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions