Repository navigation
Conversation
Canvas and Decal asked the web picker for image extensions, which went to the general files panel and returned no file. Route PNG/JPEG requests to a browser file input, read the image into the virtual filesystem and hand its path to the insertion continuation.
raykholo
marked this pull request as ready for review
October 21, 2026 07:28
Contributor
Author
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.
Fixes #4048
Canvas and Decal requested image extensions, but the web picker sent those requests to the general files panel and immediately returned no file. The image insertion tool never received a path.
Route PNG/JPEG requests to a browser file input with the requested image filter. Read the selected image into the virtual filesystem and return its upload path to the existing insertion continuation. Cancellation returns no path, read errors appear in the existing status message, and the canvas byte limit is checked before reading.
Design opening keeps its existing picker and file-handle behavior. The default design filters in
disk.rsandfiles.rsare untouched, avoiding the.zipfilter changes in #4020.Two regression tests in the existing disk test module cover PNG/JPEG routing and keeping design/model filters out of the image picker. The image-routing test failed before enabling the fix; all 11 disk tests pass afterward.
Validation
cargo fmt --all --checkcargo +stable test --profile ci -p solidcraft-web --bin solidcraft-web -- disk::tests: 11 passed.cargo +stable clippy -p solidcraft-web --all-targets -- -D warnings: passed.cargo +stable clippy -p solidcraft-web --target wasm32-unknown-unknown --all-targets --no-deps -- -D warnings -A clippy::useless_conversion: passed. Unmodified wasm clippy reports existingdrop_non_dropincrates/io/src/safe_write.rs:162anduseless_conversioninapps/solidcraft-web/src/install.rs:26,28.trunk build --release, headless Chromium on Linux x86_64, driven with real pointer input; the image is a generated 64×64 gradient PNG):.png,.jpg,.jpeg. After choosing the PNG the Canvas tool starts; clicking the XY plane addsCanvas1to the design and opens Edit Canvas.Decal1.showOpenFilePicker(design picker with file handles) and does not open the image chooser.main, clicking Canvas or Decal opens no file chooser: the Files in this browser panel appears and the tool never starts.Before (
main): clicking Insert ▸ Canvas shows the Files panel; no image can be chosen.After: the chosen PNG placed as a canvas on the XY plane.
After: the chosen PNG placed as a decal on a box face.