Skip to content

fix(website): render later canvases on the page after worker failure - #5257

Merged
thymikee merged 2 commits into
mainfrom
fix/dither-worker-load-failure
Nov 30, 2026
Merged

thymikee merged 2 commits into
mainfrom
fix/dither-worker-load-failure

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

The homepage registers four canvases at load and starts each when it approaches the viewport. An asynchronous module-worker load error can arrive between those callbacks. Record the failure in the shared host so subsequent mounts use the existing page renderer.

Before / after

Before, scrolling to another scene after the worker failed transferred its canvas to the failed worker. After, that scene keeps its canvas and draws on the page. Canvases transferred before the error still belong to the worker.

Validation

CI pending at 6f4dd775c55255d04cf7cf8a6ae840a82106a703. Focused regressions cover later mounts after a startup failure and after a running worker reports an error. Validation is CI-only. On the prior head, all three native builds succeeded before post-job cleanup failed. That job was retried once.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.73 MB 6.73 MB 0 B
Package (unpacked) 6.73 MB 6.73 MB 0 B
Package (download) 2.05 MB 2.05 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.5 ms 25.4 ms -1.1 ms
CLI --help 58.7 ms 54.3 ms -4.4 ms

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@thymikee

Copy link
Copy Markdown
Member Author

The code at 6f4dd77 is ready, with no blocking problems.

Not blocking: these can be taken or left: because .github/workflows/ci.yml ignores website/** on pull_request, a later website-only change to dither-host.ts or dither.worker.ts would skip dither-host.test.ts in PR CI, so a follow-up could run that test from the website workflow or narrow the path filter; a runtime worker error after ready no longer logs dither: the worker failed., so one permanent logging listener could stay while only worker = null is gated on a not-yet-ready flag; and the comment at website/src/components/site/dither-host.ts:35 could say later canvases draw on the page after a startup failure, with the homepage canvas count in the PR body corrected from four to five.

The earlier thread no longer applies: the error listener is removed on ready, so a runtime error no longer disables the worker.

Not verified here: no local tests or browser run were performed, the order of the ready message and a later error event was inferred from posting order, and execution of dither-host.test.ts was not confirmed in CI logs (this relies on the vitest.config.ts include and the passing Coverage job).

Coverage, Lint/Typecheck, Integration, smoke and Body rules checks pass.

One other check is still pending, and it does not exercise any route changed here.

Nothing from this review needs to change before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 30, 2026
@thymikee
thymikee merged commit c93327d into main Nov 30, 2026
27 of 30 checks passed
@thymikee
thymikee deleted the fix/dither-worker-load-failure branch November 30, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant