Skip to content

fix(scenes): draw a preloading scene after a paused seek lands in it - #62

Merged
karngyan merged 1 commit into
mainfrom
fix/preload-redraw-after-seek
Oct 11, 2026
Merged

karngyan merged 1 commit into
mainfrom
fix/preload-redraw-after-seek

Conversation

@karngyan

Copy link
Copy Markdown
Collaborator

Closes #47.

When Stage draws scene 1 it preloads scene 2 with no onDone. A paused seek into scene 2 while that preload is in flight called ensureLoaded(id, bump), which returned at pending.has(id) and dropped the callback. Paused, nothing else re-renders the stage, so it stayed empty (most often on ?t= deep links).

pending is now a map of waiters per id: a caller asking for a scene already in flight joins the waiters, and every waiter runs when the load resolves.

  • Regression test: a seek into a scene still preloading draws it once the load lands (fails on main, passes here)
  • Full suite 268/268, tsc and eslint clean
  • Patch changeset included

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

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
kino 5a7a816 Commit Preview URL

Branch Preview URL
Oct 11 2026, 05:36 PM

@karngyan
karngyan merged commit fc39e80 into main Oct 11, 2026
5 checks passed
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.

fix: draw the scene when a preloaded scene finishes loading after a seek

1 participant