You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feature: SVG rendering support in wasm module. - #1052
Added support for loading SVG icon resources for use in the application.
The application now refreshes its display when SVG content is ready.
Bug Fixes
Updated the sample and smoke test flows to load the bank icon before checking model rendering. If loading the icon fails in the sample, the error is displayed and the load action still proceeds.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
No actionable comments were generated in the recent review.
Walkthrough
The Wasm integration adds SVG-ready callback wiring and a helper that loads SVG resources into the virtual filesystem. The test page and smoke test load the bank icon before using it.
The Mansoura subproject reference changes. JSMinsky exposes setSVGReadyCallback, and newMinsky registers a redraw callback or warns if the callback is unavailable.
Icon resource loading and test setup wasm/minsky.js, wasm/test.html, wasm/test/smoke.js
loadIconResource fetches an SVG, writes its bytes to the Wasm filesystem, and calls the supplied backend method with the path. The test page loads the bank icon before clicking Load and adds version queries to script and runtime URLs. The smoke test sets the bank icon path as the Godley icon resource.
sequenceDiagram
participant Browser
participant minsky.js
participant SVG_URL
participant Wasm_filesystem
participant Minsky_backend
Browser->>minsky.js: Call loadIconResource(method, url, name)
minsky.js->>SVG_URL: Fetch url
SVG_URL-->>minsky.js: Return response bytes and status
minsky.js->>Wasm_filesystem: Write bytes to resource path
minsky.js->>Minsky_backend: Call method with resource path
Loading
Merge Risk: Minimal · up to d665c
This change adds SVG icon loading to the Wasm module and redraws once icons are ready. No concrete defects were found, and the change is low risk to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feature: SVG rendering support in wasm module." is a short, specific single sentence. The changeset adds SVG handling to the wasm module: a new setSVGReadyCallback method on JSMinsky, a loa…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feature: SVG rendering support in wasm module." is a short, specific single sentence. The changeset adds SVG handling to the wasm module: a new setSVGReadyCallback method on JSMinsky, a loadIconResource helper in minsky.js that writes SVG bytes into the virtual filesystem, and a bank.svg icon load in the test page and smoke test. The title names the main theme, though the changes are narrower than a general SVG rendering feature (they focus on icon resource loading and a ready callback). The title is therefore related to the change, and the scope is slightly broad.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clang (23.1.4)
wasm/jsminsky.cc
Clang-Tidy produced no recognizable diagnostics; analysis is incomplete
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.
Reviewing files that changed from the base of the PR and between defc30f and d665c4f.
Files selected for processing: 5
mansoura
wasm/jsminsky.cc
wasm/minsky.js
wasm/test.html
wasm/test/smoke.js
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
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
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.
This change is
Summary by CodeRabbit