Review on #7809 asked for coverage of imported .kys bindings. The set moves
Cmd+M to Levels and gives Fill Cmd+, as its second key; the menu bar shows
Cmd+M on Levels only, Minimize keeps Ctrl+Cmd+M, Settings yields Cmd+, and
the clash is reported. Fails without app_layout's dispatch ownership pass.
Co-Authored-By: andeecollard <6765611+andeecollard@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cause: is_hard_rect read selection coverage over the selection's own content bounds in one buffer. After a transform those bounds can reach far past the canvas, while the patch-size guard only measures the on-canvas part, so a huge mostly-off-canvas selection could stall or exhaust memory.
Fix: is_hard_rect now calls is_hard_rect_within with MAX_PIXELS (the patch's own cap); bounds over the cap are not a hard rectangle and the selection stays in place. Otherwise coverage is scanned in 64-row bands, stopping at the first pixel below 1.0.
Verified: new test covers a limit below and at the pixel count and a hole in the third band; patch (25) and retouch (126) lib tests pass, clippy -D warnings and fmt clean.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
Move the craft-libs crates pinned at c5a1cbfb (craft-ui, craft-print,
craft-pdf, craft-docpath, craft-jpeg, craft-update and the hayro patches)
to a craft-libs branch that merges storytold/craft-libs#687 and #696.
craft-pcraft-format stays at b8f7d93b.
- At the first frame, the result window shows what the last self-update
came to: the version it installed, or why it could not be installed.
A new `Services::last_update` reads the outcome records once; a manual
check made before that frame leaves them for the next start.
- A manual check that finds a release while an update installs or waits
for the app to close, or while the launcher keeps this version, shows
Installing, Ready (with Restart to Update) or the launcher's choice.
- Closing the result window clears the updater's status and the last
update's outcome. The window comes back after the startup prompt
closes while that outcome is still unread.
- The update helper starts when the app drops the updater at exit.
The engine turned every "mode": "clear" stroke on the Background into
Normal, so a held ~ painted the foreground there instead of erasing to
the background colour as on main. The options bar already turns a chosen
Clear off at the press, so the engine conversion was not needed: drop it
and keep the one check in clear_off_on_background.
A Background with locked pixels refuses the stroke, so a chosen Clear now
stays chosen there. The "Tool state machine" doc line is back on
tool_event.
Co-Authored-By: DuBearte <DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit found two more gaps on the PR's latest head:
- Tab into a length field while a mouse button was held did not select its
text, so typing appended ("2 mm5"). field_tab now marks the field it hands
focus to, and the dialog selects that field whatever the mouse does.
- A unitless length set over automation ("5") was remembered as typed, so a
later ruler unit change reread it in the new unit. Confirm now remembers
each length as the pixels it applied; reopening shows them in the new unit.
Also adds a test that Enter straight after a bare number applies it in the
unit the field showed.
Co-Authored-By: safvanedge <safvanedge@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured in the reference application:
- A group writes its box (the canvas) and z-index, then the rule of each
layer in it, top first, with no blank line between rules. A group's end
takes a place in the stack, so z-index counts it.
- A Solid Color fill layer without a shape greys Copy CSS out; so does a
selection with no layer that has CSS.
- Point type is placed by its line box: left is the pixel left less the
ink's offset from the origin; top centres the line box on the pixels, or
on half the cap height above the baseline when the text has a
descender. Left and top are cut after three decimals, not rounded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arming a cross-document transfer from an Option-drag of an existing float
rolls back the drop-and-copy, which raises the document revision. The float
was restored with its old revision, so floating() treated it as stale and
the earlier move was lost. Restore it over the current revision, with a
regression test.
Co-Authored-By: tomgardenart <tomgardenart@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cause: the menu bar, the command labels and the selection tools' canvas menu spelled the two commands "Layer via Copy" and "Layer via Cut", while the reference application (and PhotoCraft's own History names and ATN event table) use a capital V.
Fix: renamed the labels in crates/ui-egui/src/menu_catalog.rs, the two spec! labels in crates/engine/src/cmd/edit_cmds.rs, and the rows in crates/ui-egui/src/canvas/canvas_tool_menu.rs with its test assertions. In the 33 locale files crates/ui-egui/src/i18n/*.tsv that carry the keys, only the key column of those two rows changed (66 rows), so every translation is kept and no language falls back to English. New tests are in crates/ui-egui/src/layer_via_label_tests.rs, registered with one mod line in lib.rs like the other *_tests.rs files.
Verified: the 5 new tests pass; canvas_tool_menu 51 passed; engine edit_cmds 112 passed; i18n 66 passed and 8 live_tests failed with the known local font panic in epaint fonts.rs (font-dependent, green on CI); cargo xtask parity left docs/parity-checklist.md unchanged; clippy -D warnings and fmt are clean. TSV check against HEAD: 34 files, same row count in each, exactly 66 rows differ (2 per file in 33 files, Hindi has none), only the key column of those rows differs, the translation column is byte-identical, no old key remains, and no CR bytes in any touched file.
Not changed: the translations' text, the History names and the ATN event table (already the capital V), docs/ui-parity.md and the other parity docs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
Since the embedded-LUT params were added, the generated Color Lookup dialog
filled `fileName` with 0 (the dialog has no kind for `text?`), `data` with ""
and `lutFormat` with "cube". Every OK failed, and a .3dl or .look file from
the LUT folder (#9754) would have been parsed as .cube. `fileName` is now
plain text, `lutFormat` gets an `auto` default (detect from the file), and
an empty `data` / `fileName` counts as not given, like an empty `file`.
Also puts the Lens Blur test's doc comment back on its test (a merge had
moved it onto the LUT folder test).
Co-Authored-By: Luis-0508 <43929895+Luis-0508@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in retouch_cmds/patch.rs with #12255 (one History name, "Patch Selection", for every mode): kept the Destination branch that moves a hard rectangular selection with the patch and gave it HISTORY_NAME, and restored Plan's destination flag, which #12255 had removed as unused. patch tests 24 passed (including #12255's history-name test), clippy and fmt clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and resolved
Cause: is_hard_rect required the selection's bounds to equal plan.area, which is clipped to the canvas. A hard rectangle reaching past the canvas (e.g. moved there with select.transformSelection, which keeps the off-canvas pixels) has bounds larger than the area, so the pixels were patched but the selection was left behind.
Fix: treat the selection as a hard rectangle when nothing is selected outside its own bounds and every pixel inside those bounds is fully selected, then translate the whole selection by the drag offset. Feathered, non-rectangular and holed selections still stay in place.
Verified: new test destination_moves_a_hard_rectangle_that_extends_past_the_canvas failed before the change (selection stayed at -20,100..40,140 while the pixels changed) and passes after, including one-undo restore of pixels and selection. cargo test -p photocraft-engine --lib patch (19 passed) and retouch (120 passed), clippy -D warnings and fmt clean.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
The field consumes the arrow keys it steps with, so the step check now reads them
before the field. New tests: arrow steps stop at +-180 without the alert, a
click-away commits a typed 400 with one alert, a non-number keeps the angle, and
the Magic Eraser check finds any field named Angle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the sample match uses the measured increase-plus-decrease distance (#11901).
Protect Foreground Color keeps today's largest per-channel difference, as #11903
asks for its unmeasured cases. The tolerance doc describes the new distance and
the graded falloff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>