Skip to content

Integration batch integration-photocraft-20261204-229 - #20651

Open
autocraft-bot[bot] wants to merge 42 commits into
mainfrom
integration-photocraft-20261204-229
Open

autocraft-bot[bot] wants to merge 42 commits into
mainfrom
integration-photocraft-20261204-229

Conversation

@autocraft-bot

@autocraft-bot autocraft-bot Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Automated message. Not a maintainer decision.

Builds on photocraft#20650; lands after it.

Lands 1 approved pull request together. Each one is merged with its own commits.

dholzric and others added 30 commits December 2, 2026 20:32
The options bar's "Choose an object" button becomes a real toggle (#17619):
off by default, kept in the tool options, not reset by Reset Tool. While it
is on the canvas shows Object Selection's pointer, hovering tints the object
the non-AI finder finds on the composite, and a click writes that object
into the mask - a new adjustment layer of the dropdown's kind directly above
the active layer, or 255/0 (Add/Subtract) in the mask of an active
adjustment-brush layer. Opacity and Flow do not scale it, and the button
turns itself off after an object was applied. The same behaviour runs
headless through a new "point" parameter of paint.adjustmentBrush.

Tests: crates/engine-paint/src/cmd/adjustment_brush_choose_object_tests.rs
(red 9 failed / 16 passed before the command change). Gates run: engine-paint
adjustment_brush filter, fmt, clippy, wasm, xtask layers and panel-commands.
…fixture

The fixture leaves the "Scene" layer active, so the test that checks where the
new adjustment layer lands took Scene as the Background and put the layer on
top of the stack. It now names the layer that is not "Scene"; the engine-paint
adjustment_brush filter runs 25 passed, 0 failed.
The button is a toggle stored in the tool options (#17619): off by default,
kept by Reset Tool and by a new document, a one-shot that turns itself off
when an object was applied. While it is on, the canvas shows Object Selection's
pointer, hovering tints the object the finder finds on the composite - the
finder is shared with Object Selection, only the tool gate and the sampling
rule differ - and the click sends paint.adjustmentBrush with the new "point"
parameter instead of a stroke.

Tests: crates/ui-egui/src/adjustment_brush_choose_object_tests.rs, driven
through the bar's Harness, the canvas's tool_event and the finder's update.
They cannot compile on main, where the button is inert and the state does not
exist. ui-egui filters: adjustment_brush 19 passed, object_finder 5 passed.
Clippy -D warnings reported the unused IconButton left behind when the Choose an object button became a ToggleButton (#17619). clippy for photocraft-ui-egui and photocraft-engine-paint with --all-targets now finishes clean, as do xtask layers and xtask panel-commands.
Part 1 is made: the live History Brush stroke now scatters in Dissolve mode the same way the command does. `heal.rs` has a new shared `history_brush_scatters(mode, params, doc_mode)`, true for Dissolve, pixels targeted, and an Indexed or Bitmap document. `history_brush` now calls it. `LiveRetouch::composite` in `clone.rs` calls it with the pre-stroke document's mode. When it is true, the live stroke calls `restore_coverage_dissolve` with `self.brush.seed`. Otherwise it still calls `restore_coverage`. I added the test `live_stroke_matches_the_direct_command` in `history_brush_dissolve_tests.rs`. It runs a two-point Dissolve stroke on Indexed and Bitmap documents and checks that the live pixels equal the direct command's pixels. It then offers the live stroke and checks that the committed result has `fromLive: true` and also equals the direct result. The 39 `history_brush` tests in `photocraft-engine-paint` pass, including the new one. I did not run that crate's full suite. Clippy with `-D warnings` is clean for the crate. The `cargo fmt --check` that ran before clippy in the same command passed. A final re-run timed out, and I made no edits after the passing one. I did not confirm that the new test fails without the fix.
…p a selection

Two review findings on the "point" path (#17619):

- The history state was chosen from the active layer before the finder ran, so a click that found
  no object recorded "New Adjustment Layer" while a pixel layer was active. The reference
  application records "Adjustment Brush" for that click, so the lookup now happens before the state
  is opened and the label follows what actually happened.
- A live selection became the new layer's mask and was dropped, copied from the stroke path. That
  case was never measured, and merging it in silently changes what the user sees on the canvas; the
  point path now leaves the selection where it is and paints only the object. The stroke path is
  unchanged.

a_point_outside_the_document_finds_no_object and the new
a_live_selection_stays_where_it_is_on_the_point_path were red first (2 failed / 24 passed); the
engine-paint adjustment_brush filter now runs 26 passed, 0 failed.
Two review gaps on #17619, both about behaviour the branch already has:

- the toggle on asks the tool host for Object Selection's pointer (the crosshair with the small
  dotted square), and off keeps the brush tip. Driven through the real canvas harness. Without the
  cursor branch in brush_cursor.rs this test fails (1 failed), so the assertion is load-bearing;
  the file was restored to the branch version straight after that probe run.
- turning the button on costs no history state, and Escape does not turn it off.
Clippy -D warnings reported the two needless borrows the state-label rework left behind in the
"point" path (#17619). engine-paint adjustment_brush filter: 26 passed, 0 failed; clippy for
photocraft-engine-paint and photocraft-ui-egui with --all-targets finishes clean, as do the wasm
check, xtask layers and xtask panel-commands.
Resolve recorded geometry at playback and preserve the source descriptor. Export native recordings with the original optical center and their supplied output fields. Refs #18088.
Inherit the active document at creation and attachment, and remember the last Snap change for launches with no open documents. Refs #19809.
Part 1: in `crates/ui-egui/src/app/commands.rs`, `sync_document_snap` and `document_snap` now set `inherited` to the current `self.ui.extras.snap` instead of `snap.last_toggle` when no document is active. A direct write to `extras.snap` before the first sync is therefore kept for newly seen documents. With no active document, sync already sets `extras.snap` to `last_toggle`, so that case behaves as before. `cargo fmt --check` and `cargo clippy --offline -p photocraft-ui-egui --all-targets` are clean. The tests with "snap" in their name passed (87 passed, 0 failed); I did not run the full suite.
…16856)

Pins craft-libs at storytold/craft-libs#5302, whose snap geometry draws
a moved layer's centre guide to another layer's centre from one centre
to the other instead of across both layers. Edge guides and the canvas
centre line keep their spans. Tests drive the Move tool on the epic's
test document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The centre guide now ends at the moved box's centre where it lands when
both axes snap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…16856)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-centre-line

# Conflicts:
#	crates/ui-egui/src/canvas/snap_ui.rs
The craft-libs pin now rejects a bare ampersand in strict reads with a
generic syntax error, before the settings check could name it. Run that
check as a lenient read, as it behaved before the pin move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Perspective Crop whose quad touches or equals the canvas edge lost colour
and opacity there when it reduced the image: warp's Bicubic pre-reduction
called resize_surface without a canvas, so samples past the layer edge counted
as transparent, and the Background's lost alpha then turned into the lighter
backdrop grey. Image Size already avoids this with resize_surface_in_canvas.

Pass the document's canvas into warp for the crop's pixel layers and let the
pre-reduction repeat the canvas edge. Masks, channels and every other warp
entry point keep today's behaviour.

Fixes #18072
…t count

warp takes one more argument now, which is over clippy's limit: allow it the
way the other multi-mode warp helpers in algo do, and drop the unused layer
index from the new test helper.
A layer whose pixels reach past the canvas repeated its own off-canvas edge in
the Bicubic pre-reduction, because the resize edge is the layer's bounds UNION
the canvas. Only a layer lying inside (or flush with) the canvas now gets it; a
larger layer keeps today's fade at its own edge, measured 142 / 189 / 152 / 156
alpha at the outer corners and rows of a -64..320 layer cropped to 64 x 64.

Adds tests for the mask path (warped without the canvas, its outer value stays
1.0), for Bilinear and Nearest (no pre-reduction, outer pixels unchanged), for a
diamond quad on the canvas mid-edges and a rotated quad wholly off the canvas,
and checks the right column of the quad touching three canvas edges.
davidmann4 and others added 12 commits December 4, 2026 21:40
The merge train could not rebuild the lockfile for this repin itself.
bca4156b is on craft-libs main (storytold/craft-libs#5302's successor
merges, incl. the equal-spacing smart guides); only the rev values and
Cargo.lock change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the rev values and Cargo.lock's craft-libs sources change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/engine-paint/src/cmd/adjustment_brush_cmds.rs
#	crates/ui-egui/src/tools/tool_reset.rs
The finder's idle path asked whether Object Selection is the active tool,
so switching to any other tool dropped a Manual Refresh analysis. It now
follows Object Selection's own setting and only drops the Adjustment
Brush's finder. Also make the soft-dab guard require an in-between mask
value, so a hard-edged stroke fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A finder started for the Adjustment Brush counted as fresh after a direct
switch to Object Selection, so Manual Refresh showed objects without its
own Refresh. The freshness test and the Manual gate now check the
finder's origin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
With AutoCraft's conflict resolution f6028dc.

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
With AutoCraft's conflict resolution 6106869.

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
With AutoCraft's conflict resolution 500fba8.

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants