The pin went inside duplicate(), which is where main's #14680 fix also ends
the function: two different insertions at one base position conflict, so the
PR would not have been mergeable and CI would have had no merge commit to
test. image.duplicate now runs a wrapper that pins the copy's source, so the
branch text inside that hunk is main's byte for byte and a later merge of
main stays clean (throwaway merge against upstream/main: no conflicts).
CI was red on main's duplicate_history suite at this head: the suite came in
with #14680 (8303d38c60), passes on main, and fails only together with this
branch's open-snapshot default. #12845 makes the open snapshot the History
Brush's default source, so Image > Duplicate reported its copy's source as
the snapshot the copy was made from ({"snapshot":0,"label":"oracle copy"})
although the copy's History panel holds one "Duplicate Image" state: the
suite wants {"state":0,"label":"Duplicate Image"}. The duplicate command now
names that state as the copy's source instead of falling through to the
ambient default, so documents that were created or opened keep the
open-snapshot default (#12845's measured rows: history_brush_default_source
7/7, engine paint_in_history_brush_default_source 8/8, engine-core lib 3369
passed / 0 failed).
To show the interaction red without merging main, main's
image_cmds/duplicate_history_tests.rs is copied in byte for byte (blob
ebd56be16e) and registered with the same #[path] mod line at the same place,
so a later merge of main cannot conflict on it. Main's #14680 block around
the pin is also taken verbatim from main, so the early-copied suite runs
green here (red: 4 failed / 2 passed with the copied suite alone; green: 6 passed after the pin).
Both recovery checks compared the canvas after the History Brush click against
a pixel the canvas already held: a paint command that returned Ok without
touching pixels passed them, and the deleted-snapshot check looked only at the
red channel. Turn the canvas blue after capturing the snapshot, assert the
canvas changed, and compare all four channels with the captured pixel, so the
assertions fail when the brush paints nothing.
The round-one review found that the new default reaches one more report than the local gates covered:
apps/photocraft-cli/tests/it/orientation.rs compares the whole info JSON of a .pcraft with the same
file re-saved, ignoring the path and the names it knows vary. historySource now names the open
snapshot, which carries the document's own name, so the two documents differed. The test's own
ignore-list grows by that name; the command's report is unchanged, and it still has to match
shape for shape.
Same review: the Art History Brush and Fill > History share the document's one source, so the new
default is pinned for them too where the open snapshot and row 0 hold different pixels; a snapshot
taken with replaceExisting under the document's own name drops the open snapshot (ids are never
reused), which takes the default source with it; the panel's source column gets its first click
test; and a source set on the row that is current when a play folds its steps is pinned through the
play. The fill-keys help line and module header still promised the oldest state held, and two test
comments said the same; they name the open snapshot now.
While a state source is set the history keeps the answer: a source state deleted or discarded leaves no source (#2966), Clear History holds it back until its undo, and an action folding its steps renames the row (#3536). Reading the recorded id first and the history's own row second follows all three, instead of only the two the panel does directly.
The History Brush, Fill > History and the Art History Brush restore from one
per-document source. With none set in the History panel the engine asked the
history for it, and the history answers row 0: the oldest state still held.
Once the history is full row 0 is a recent step, so a click painted that step
instead of the image the document opened with.
The default now resolves to the open snapshot, the first History panel
snapshot (the document as opened, named after it), which the states' trimming
never removes. The engine records its id per document, together with the id of
a state chosen with history.setSource - the history reports row 0 both for a
chosen row 0 and for nothing chosen, and it must not be edited here. Deleting
that snapshot leaves the default empty, as for any deleted source; with
History Options > Automatically Create First Snapshot off the default keeps
today's behaviour, the oldest state held.
The GPU picture snaps its origin to whole device pixels so texels stay
crisp, but the canvas draws the checkerboard under it and the edge
around it at the exact, unsnapped place. Where the two differ (an edge
on a half pixel, or the far edge of a width that is not whole pixels)
a 1-pixel line of checkerboard showed along the image, or the picture
reached past the edge.
The texels keep the snapped origin; only the document's outer edge
moves (at most half a pixel) to the exact place, in the vertex stage,
and viewport pages no longer cut that half pixel at the document edge.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Appearance page's Size pick was dropped: appearance_row copied back
only the mode and the theme slots, so the row showed Compact again on the
next frame. PhotoCraft also kept no size, sent none to the suite and never
gave the root a density.
Add interface.density (compact/comfortable), drawn by the Appearance page,
kept in step with the suite's shared size like the mode and themes, and
set as the root's density each frame.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main moved the canvas layer picker into canvas_tool_menu's MenuKind::Layers and the control
channel's pointer onto the tool host (#15449), so the PR's egui LayerMenu and dispatch.rs edits
no longer apply. Re-applied on main's code: is_gesture answers for the Frame tool, open()
nests a frame's image under its frame for the Frame tool (MenuKind::Layers gains depth and
isolate), entries() indents those rows and ends them with a separator and Isolate Layers, and
choose() runs select.isolateLayers from it. The pasteboard fallback off the image is main's
context_popup already. Tests rewritten on main's helpers.
Co-Authored-By: hectorviov <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The review on #12091 measured this tool's menu with an active selection in the
reference application: no Distort and no Perspective, and Delete and Fill
Selection after the three fill rows - the table #12577, #12866 and #12042 already
measured for the Type, Red Eye and Object Selection tools. `rows` now gives the
Vertical Type Mask tool that table instead of `SELECTION_MENU`; the generic layer
menu for the case without a selection, the other tools' routes and every
enablement rule stay as they were. `SELECTION_MENU` itself is untouched: the
marquee, the wand and the other selection tools keep it.
Tests: `with_a_selection_the_right_click_opens_the_measured_selection_menu` and
`the_selection_menu_is_the_table_the_measured_tools_share` - the rows and the
`ui.inspect` list are `MEASURED_SELECTION_MENU`, row for row the same as the Type
tool's selection menu in the same document, and Distort and Perspective are pinned
as rows of the marquee's menu only. Both run red at 8367ed381e first (2 failed,
6 passed), green with the switch (8 passed).
A Burn press on a hidden layer, a layer with Lock All or Lock Image Pixels, or a group
only said why in the status bar (or with a shared group text). The reference application
opens a modal alert with OK for each and changes nothing.
Adds the Burn tool to brush_refusal's tool_name table and counts Lock Image Pixels as
locked for it. Lock position still burns.
The question Edit > Assign Profile asks on a document with layers now
shows the framework prompt's warning icon beside its text. The other
questions keep their look.
Fixes#16683
Layer > New showed both entries, one of them greyed. The menu rows now keep
"Layer from Background..." while the document has a Background (or none is
open) and "Background from Layer" while it has none, in the same slot. The
menu bar, Help search and ui.menu.list all read these rows; the Keyboard
Shortcuts dialog keeps both commands so either can take a shortcut.
Fixes#16761
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2).
Merged under Skylar's explicit Exec 430 override. Moves every nightly pin from craft-common-actions be00e5cc to 8389cad8 (#375), which carries the Windows ctime rule that stops the signer refusing a just-written JSON.
A right-click on the canvas with the Vertical Type Mask tool, while no mask is
being edited, opened nothing: `canvas_tool_menu::applies` did not list that tool,
so once the type layer hit test (which leaves the Type Mask tools out on purpose,
to them existing type is pixels) missed, the router's last step
`applies(tool).then_some(MenuKind::Tool)` had nothing to route to. The reference
application opens the selection menu there, or the generic layer menu when nothing
is selected.
`applies` now takes `Tool::VerticalTypeMask`, and `rows` gives it one branch:
`SELECTION_MENU` while the document has an active selection, `COUNT_MENU` - the
layer menu #12042 added for the Horizontal Type tool - while it has none. No new
row table and no menu-local rule: the rows are the ones those tools show today,
enablement stays `menus::is_enabled` and a row runs through `menus::invoke`, so
which entries are greyed (not measured for this tool) keeps the shared rule. A
running mask edit still reaches its own edit menu first, and off the image the
pasteboard menu still comes first; the Vertical Type and Horizontal Type Mask
tools, not measured, stay on their no-menu path. The right-click itself starts no
mask, changes no layer and journals nothing.
Tests: `crates/ui-egui/src/canvas/canvas_tool_menu/vertical_mask_idle_menu_tests.rs`
(8 tests, the file #12091 names). The one assertion in
`type_off_text_tests::unmeasured_type_tools_keep_opening_nothing` pinned this tool
opening nothing, the behaviour #12091 replaces; it now covers only the two tools
that stay unmeasured.
Merged under Skylar's explicit override (Nightly 792) after green CI, CodeRabbit on this head with no open threads, and an independent adversarial review with no blockers.
craft-libs 5c30761a (next, with craft-libs#3599): a settings change
(agents off and on, another port) reads the agent token file again
instead of reusing a token from an earlier failed start.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#17012 added setup_window's fourth argument; this test, merged separately, still
passed three, so the ui-egui library tests did not compile on main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moves every craft-libs rev to the tip of next, which carries
storytold/craft-libs#3581 (PreferencesLayout::Classic), and the egui patch to the
rev craft::egui_fork::REV names there (b9770908e0).
Co-Authored-By: Claude Opus 5.5 <[email protected]>