Skip to content

fix(image): discard stale async decode results - #33

Closed
joaner wants to merge 1 commit into
mainfrom
cursor/bugfix-image-worker-epoch-4859
Closed

fix(image): discard stale async decode results#33
joaner wants to merge 1 commit into
mainfrom
cursor/bugfix-image-worker-epoch-4859

Conversation

@joaner

@joaner joaner commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Guard asynchronous image decode and bitmap-cache results with the worker runtime epoch. Results that finish after reset/dispose are closed and discarded instead of being rendered or cached.

Motivation / related issue

A JPEG, PNG, compressed-depth, or bitmap conversion started before a seek or topic switch can complete after the worker is reset. It could previously repaint or cache a stale frame.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing behavior to change)
  • Documentation update
  • Refactor / internal cleanup (no behavior change)

Checklist

  • npm run lint passes with no errors
  • npm test passes (649 tests)
  • npm run build and npm run build:lib succeed
  • New behavior is covered by tests
  • Documentation updated (README, API.md, EMBEDDING.md) if the public API changed — N/A, no public API change
  • Breaking change: all affected call sites updated and migration path described in PR description — N/A

Additional verification: npm run typecheck and Playwright H.264/compressed-depth image tests.

API compatibility

N/A

Screenshots / recordings

N/A — no visual UI change.

Open in Web Open in Cursor 

Co-authored-by: joaner <joaner@users.noreply.github.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
rosview 121c979 Commit Preview URL

Branch Preview URL
Jul 26 2026, 02:33 PM

@joaner joaner closed this Jul 26, 2026
@joaner
joaner deleted the cursor/bugfix-image-worker-epoch-4859 branch July 26, 2026 14:49
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