A preview job still running when the document changed stored its base
selection back, and the next preview reused it for the new pixels.
BaseCache now records its revision and compute reuses it only on a match.
Also describe TOOL-214-1 as the full-window workspace.
An agent's ui.menu.invoke reached the main window's menus while a full-window workspace was
open: window.document.N switched documents and the workspace closed, dropping its work.
Photoshop makes these dialogs modal.
menus::modal_allows now refuses other menu commands while one is open (distort_ui::
modal_workspace), so ui.menu.invoke and the macOS menu bar wait for OK or Cancel. The
control channel's Camera Raw continuation is generalised: the open workspace's own
{"ui": {...}} requests still pass, unless another dialog, a discard prompt or a crop is
pending. The menus' cache key includes the open workspace, so opening or cancelling one
without input rebuilds them. engine.execute (MCP run_command) is not a menu click and is
not gated.
Puppet Warp, Perspective Warp and Vanishing Point are on-canvas modes here, with the
in-window menus live, so they stay out.
The workspace kept the document's index and the layer, but OK ran select.refineEdge on
whatever was active. A document switch and OK queued on the control channel with no frame
between them applied the first document's edits to the second, and selecting another layer
in the same document sent a layer-mask OK to that layer.
The workspace now stores its DocId. OK, control requests, the preview and pointer events
check that the active document and layer are the ones it opened on; when they are not, the
workspace closes with the reason in the status bar and nothing is edited. distort_ui's
cancel_stale drops it like Liquify and Puppet, and the pointer route has the same on_doc
guard (review by FredApps and aiongg on #8896).
CodeRabbit found that with `smooth` off, wheel_nav::read_with read the
trackpad-gesture state but never recorded it, and its snap, zoom and
not-hovered paths returned before even reading it. Outside the main window,
where `unsmooth` doesn't run, a gesture's begin was never noted. So a gesture
begun with ⇧ held turned into a vertical pan once ⇧ was let go, where egui
keeps it sideways.
- this_frames_scroll now records the state it computes, and read_with calls
it up front with its other per-frame tracking, then reuses the result.
- The state is kept per window (keyed by viewport id). The main window and a
second document window have input of their own, and must not overwrite
each other's gestures.
- The canvas test without `unsmooth` gains a phased Start/Move/End case: begun
with ⇧ and released mid-gesture, the canvas pans 24 points sideways and not
at all vertically. It fails without the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* security(engine): bound script, batch, adjustment, import and export work from file input
Scripts calling scripts share depth and step budgets; batch inside a played action charges the playback tree; destructive adjustments and mask adjustments visit stored tiles when the content bounds are a huge sparse grid; Copy Layers checks group depth; aux flattening and brush import refuse oversized canvases; video footage frames are budgeted, Render Video names frames after the leaf of the document name and reads no linked files for restricted sessions; ATN names are clipped; profile paths are read as regular files only; prefs.set no longer treats colorSettingsX as colorSettings.
* style(engine): rustfmt
* engine: address review - refuse unbounded sparse adjustments, carry batch playback charges, charge played steps to scripts, clip ATN targets, stricter colorSettings paths, cap image-sequence frames
Brings in 412 commits from main (cf9ff2a2). Two conflicts:
- crates/ui-egui/src/lib.rs: main added updates_ui::tick right after
prefs_ui::tick, where this branch calls wheel_nav::unsmooth. Both stay,
main's first; the update tick reads no input.
- Cargo.lock: main's, with cargo adding back this branch's one line (the
desktop app's direct windows dependency).
docs/scorecard.md is regenerated; it differs from main only in UI-217-10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo clippy --all-targets on Windows (and the same would hit macOS) found the constant
dead: the functions that use it outside tests are Linux-only, and the test exercising
parse_nvidia_smi was written against the literal 0x10de instead of the constant, so
nothing referenced it under cfg(test) on a non-Linux target.
video_memory() on Linux only ever read amdgpu's sysfs mem_info_vram_total file. NVIDIA's
proprietary driver never writes it, so every NVIDIA Linux user still had the document's
pixels charged against the GPU memory budget that #5973 stopped charging discrete cards
for elsewhere - P60/P61 (opacity/hide among 150 full-canvas layers) measured 1.5 s against
a 30 ms budget here, same as before that fix.
detect_video_memory now falls back to nvidia-smi's own CSV report when the vendor id is
NVIDIA's and the sysfs file is absent: parsed by a pure, unit-tested function against this
machine's real nvidia-smi output; an absent or failing nvidia-smi degrades to the old
(correct, if pessimistic) behaviour, never a panic or a hang.
* security(io): charge sparse layers, shape caches and shared decodes
ORA and PSD export refuse dense boxes past a cap; PSD import and ABR mapping decode shared masks/tips once; Affinity and SVG shape caches are charged to the import budget; SVG embedded JPEG size is probed; Krita tiles are charged for the backing tiles they land in.
* fix(io): clippy range pattern; align the sparse Krita test tiles to the backing grid
* io: address review - offset-aware KRA tile budget, saturating stroke reach, OpenRaster entry limit, PSD retained-surface budget, halved PSD gather cap
On Windows the recovery sidecar was written through store::write_atomic, which replaces the
old file with ReplaceFileW: it moves the old sidecar to a backup name first and only then moves
the new one in. A recovery listing in between saw the bundle without its sidecar and listed the
entry twice, or not at all (so a recovery prompt could miss a document). The flaky
autosave::recovered_entries_survive_a_second_crash_until_saved_or_closed on Windows CI was this.
The sidecar now goes through one AtomicFs on every platform whose replace is a plain rename
(one step); Unix keeps its 0600 temp file, Windows still refuses a read-only sidecar up front.
Recovery data is private to the app, so ReplaceFileW's ACL/stream preservation isn't needed.
Test: a_listing_during_an_autosave_sees_the_entry_exactly_once lists the recovery folder while
an autosaver rewrites the entry 200 times. With the old code it failed 3 of 3 runs on Windows
(two entries, once none); with the fix it passes 3 of 3.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The CMYK proptests failed on main now and then (the_split_route_agrees_with_the_exact_path
after #8663). Three gaps, each found by the proptests at 5000 cases:
- cmyk.rs: a clipped Dissolve layer blended like Normal; it now shows each pixel fully or not
at all by the compositor's noise, as the RGB compositor does since #3052.
- cmyk.rs: a Dissolve adjustment layer mixed by its opacity; opacity and mask are now the chance
a pixel takes the adjustment, as on the RGB compositor (#3050).
- native.rs: the display/Flatten ink route didn't round to the document's levels after an
adjustment layer, where the RGB compositor and cmyk.rs do; coverage in a pass-through group
then differed by up to half a level.
The test reference model had the same two Dissolve gaps (ref_clip passed no position, so
Dissolve fell back to Normal), which is why random_documents_match_the_reference never caught
the first one. Three named regression tests cover the minimal cases.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main now links each crate's integration tests into one tests/it binary;
the two new test files of this PR join it as modules.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>