* automation: cap workspace and trusted-local reads at 2 GiB
* automation: format the read-cap changes
* automation: drop unneeded mut from capped reads
* automation: cover trusted read size and file-kind checks
Every resource rebuilt a vector of all existing names and scanned it linearly, making duplicate-heavy packages quadratic on open. Track used names in a HashSet and add a duplicate-name regression test.
* Refuse oversized .mcraft archives
The archive reader had no entry-count, per-entry or aggregate decompression
limit: every member was read to its end and retained, so a small zip bomb
could exhaust memory on Open. Members are now limited to 100 000 entries,
256 MiB each and 1 GiB together, and a member is read at most one byte past
its allowance before the archive is refused.
* formats: drop the unused mut on the capped zip entry
Clears all 69 open SonarCloud issues.
- `packaging/{linux,macos,freebsd,web}/*.sh`: `[[ ]]` in place of `[ ]` for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses `-a`/`-o`, escaped parentheses or an unquoted pattern on the right of `=`. `bash -n` passes on each.
- `packaging/web/package.sh`: the wasm size override is read as base 10 (`$((10#…))`), since `-gt` inside `[[` evaluates its operands arithmetically (a leading zero would read as octal). Same as photocraft.
- `crates/ui-egui/src/property/input.rs`: the reversed-limits slider test passes its limits through variables, as imported limits arrive, instead of a literal `3.0..=2.0` (rust:S7432). Same range, same test.
Compile and tests are left to CI.
Retain sampler insertion, graph items, annotation editing, metadata and menu fixes. Integrate function search and quick-insert toolbars, deduplicate categorized search results, and apply current search text before selection.
The toolbar's New graph, Open package, Save and Export buttons stayed
enabled behind a dialog and did nothing when clicked. They now follow
the same rule as the menu items.
Node search takes no keys, focus or outside clicks while input is
blocked and does not open behind a blocker. The add-node menu's letter
filter does not change while blocked. Sample tiles are disabled behind
a dialog. A file dialog keeps its commands enabled only when nothing
else blocks input. The control protocol notes that the installed-update
notice does not block.
Delete edited the package behind the Save, Discard, Cancel prompt, and
floating OS windows stayed live behind every dialog, because no single
function said whether input was blocked.
Modality::capture answers it from the app's dialogs, the unsaved prompt,
native file dialogs, the update prompt and result window, and egui's
modal layer. Shortcuts, Graph, Function and FX-Map keys, the node search
and add menus, file drops, floating OS windows, Home's actions and menu
items all read it. Home and the Shortcuts list do not block.
Behind a file dialog, the commands that show one still run, so File >
Open brings a hidden macOS Open panel forward.
ui.menu.invoke now returns an error behind a dialog instead of ok,
ui.menu.list reports those items as disabled, and package_save without a
path in bridge mode returns the same error. command.run is unchanged.
Floating panels drawn inside the main window, as on the web build, still
take clicks behind a dialog until the dialogs use egui's modal layer.
Bump craft-ui to craft-libs 1b34eba and add craft-keymap, craft-dialogs,
craft-quit, craft-menu (macOS) and craft-window.
File dialogs no longer block the event loop. Shortcuts dispatch through
craft-keymap and match exactly their modifiers. On macOS, Quit asks about
unsaved work and the app quits through the platform. On a Wayland desktop
that leaves the frame to the app, the menu bar is the title bar.
Pressing an unconnected input and dragging now pulls a wire out of it,
and dropping it on another node's output connects the two, in the
material graph and in the function graph editor. Dropped anywhere else,
nothing changes. #53 added this to the material graph, but it was lost
when the canvas was rebuilt as the graph/ module.
Fixes#13
Add Help > Check for updates... (ui.help.checkForUpdates), a check at
startup, the update prompt and result dialog from craft-update, and the
Windows update helper entry point.
A copy of the app downloaded directly was never told about a new version.
Runs driven by --control or MATERIALCRAFT_NO_PREFS skip the startup check.
Shortcuts wait while the prompt or a modal result dialog is open. The
update code builds on desktop only; the web build is unchanged.
A moving frame was one ray per pixel at half size, so edges showed as visible
stair-steps until the full-quality frame landed. It now uses 2x2 rays and picks the
largest of four levels (half size 1 ray, half size 2x2, three-quarter 2x2, full 2x2)
whose last frame took under 32 ms, dropping a level when a frame goes over. The lowest
level is the previous frame, so a slow machine does no worse than before.