Repository navigation
fix(wasm): repair default gfx renderer, kill manifest 404s, fail browser test on console errors - #3686
Merged
Conversation
The default renderer path (shared @fastled/gfx adapter, used whenever no
gfx= URL override is given) expected strips shaped {x, y}, but the
engine wire format nests coordinates as {map: {x, y}, diameter} (see
js_bindings.cpp.hpp and the legacy graphics_manager.ts). Every strip
was dropped, so the worker threw a screenmap no-coordinate-strips
error on every frame and the default renderer never drew.
Also tolerate the startup races the fix exposed: keep the previous
screenmap when an empty update arrives, skip frames that precede the
screenmap instead of erroring each one, and drop zero-byte startup
frames the core would reject.
Co-Authored-By: Claude Fable 5 <[email protected]>
generate_manifest() swept every .json under the sketch dir into files.json, so clangd/editor artifacts (.vscode/settings.json, compile_commands.json) written by fastled --write-clangd were listed as sketch data; the frontend fetched them at runtime and logged 404 console errors. Prune hidden dirs/files and compile_commands.json. Co-Authored-By: Claude Fable 5 <[email protected]>
…renderer ci/wasm_test.py captured browser console errors but only printed them, and it forced gfx=0 so CI always exercised the legacy renderer instead of the one users get by default. Rendering alone is no longer success: any console error or uncaught page exception fails the run (opt out with --allow-console-errors), and the default run now uses no gfx override. Either change alone would have caught the broken default renderer, the per-frame worker screenmap errors, and the manifest 404s that shipped with the gfx-core refactor. Co-Authored-By: Claude Fable 5 <[email protected]>
The unconditional data: and Group-found logs printed one line per UI element on every load, drowning real diagnostics (and one garbled copy of them was mistaken for an error during triage). Co-Authored-By: Claude Fable 5 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughWASM build manifests now filter hidden and tooling files. Browser tests make graphics selection optional and classify fatal console errors. Graphics handling normalizes screenmaps and ignores empty startup data, while UI diagnostics are gated by debug mode. ChangesWASM tooling and runtime handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant wasm_test.py
participant Browser
participant FastLED_WASM
participant Console
wasm_test.py->>Browser: Navigate using optional gfx parameter
Browser->>FastLED_WASM: Initialize and render
FastLED_WASM->>Console: Emit console errors
wasm_test.py->>Console: Collect and classify errors
wasm_test.py->>Browser: Fail if fatal errors are not allowed
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #3683: the WASM app had runtime console errors that no gate caught, and the default browser renderer was broken outright by the gfx-core refactor.
Bugs fixed
graphics_manager_gfx.ts): the shared@fastled/gfxadapter — the default whenever nogfx=URL override is present — expected strips shaped{x, y}, but the engine wire format nests coordinates as{map: {x, y}, diameter}(seejs_bindings.cpp.hppand the legacygraphics_manager.ts). Every strip was dropped, the worker threwscreenmap: no coordinate strips foundper frame, and rendering fell through to a fallback. Also hardened the startup races the fix exposed: empty screenmap updates no longer clobber a good one, frames arriving before the screenmap are skipped instead of throwing per frame, and zero-byte startup frames are dropped instead of tripping the core's frame-size check.ci/wasm_build.py):generate_manifest()swept every.jsonin the sketch dir intofiles.json, so clangd artifacts (.vscode/settings.json,compile_commands.json) written byfastled --write-clangdgot listed as sketch data — the frontend fetched them and logged two 404 console errors on every load. Hidden dirs/files andcompile_commands.jsonare now pruned.ui_manager.ts): the unconditional per-elementdata:/Group … found, for item …logs (one of which, garbled, was mistaken for an error during triage) are now debug-gated.Why no test caught this
ci/wasm_test.py(Playwright) had two blind spots:?gfx=0, so CI only ever exercised the legacy renderer, never the default one users get.The gate (friction-free error catching)
ci/wasm_test.pynow fails on any browser console error or uncaught page exception (opt out with--allow-console-errors) and defaults to nogfxoverride, exercising the real default renderer. Either change alone would have caught everything above.Validation
uv run ci/wasm_test.py hydropack/wasm/Blink— all pass strict mode on the default renderer, zero console errors.fastledCLI server (fastled examples/hydropack --no-https): 3 consecutive Playwright sweeps, zero console errors / page errors / 4xx-5xx.bash lint— clean.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements