The load-only cases of a_damaged_remembered_value_resets_only_itself
built a second, restarted app to read the repaired file. They now use
one app: check what it loaded, tick (the repair writes the file), then
reread the file through a settings store and require it to load
without section errors and to equal what the app holds. A repair that
drops other keys still fails. The cases that set state keep the
restart.
input/hold_keys/tests.rs
The four cases share one app, so the first case's 200 % was the zoom the next three started from: their "200% from {before}" assert could pass on a view that was already there, and a row that closed the menu without applying the command would not have been caught. Each case now puts the shared view at 100 % before it opens the menu, and the case asserts that the zoom it starts from is not 200 %, so the row's own action is the only thing that can move the view - for Brush, RectMarquee and Pen as well as Move.
The assert alone is not a red test on the parent commit: with only the assert added and the 100 % start left out, the case fails at "Brush: the case starts away from 200 %", which is the inherited zoom. With both, all four tools' rows do apply 200 %, so this pins the routes rather than fixing a wrong one.
The loop body moves into tone_filter_case. Colour component view 2 keeps all six mode x kind pairs because its forbidden channel name depends on the mode; every other view runs once. target_context returns early for any Smart Filter, so every view reaches the same guard.
Co-Authored-By: Claude <[email protected]>
A dropped pencil or block flag goes from the plain and the switched
stroke alike, so the pixel comparisons can't see it; assert the
emitted flags, as #16041's mutation list asks.
The test built two whole apps for each of 14 system-tag cases (28 apps).
Which language a tag picks is plain logic (`system::resolve` ->
`lang_from_tag`), so every case now checks `Lang::from_pref("auto")` under
its tags without a harness, including no tags and unsupported tags falling
back to English. Drawing only differs by script, so one Latin (fr-CA), one
CJK (ja-JP) and one Cyrillic (ru-RU) case still build the app, keep the
stored preference at "auto" and find the translated File title in the menu.
Part of #15376. Fixes#16039.
A theme or language row is a fired command (app.theme, app.language) with the
choice in its parameters. The drain's dispatch refused both ids (no enable rule,
so the engine's rule answered: not available) and passed invoke empty
parameters. Both rows are enabled with or without a document, and dispatch
passes the fired command's parameters to invoke.
Trials run the whole app with and without a document: a theme fired as the
macOS menu fires it, a theme clicked in Window > Appearance, and a language
row.
pencil_tests::a_tool_key_mid_stroke_paints_what_the_stroke_paints_without_it
crossed 4 modes with 5 brush changes (56 apps). The brush is captured
once at the press whatever the mode, so History Brush keeps all 5 cases
and each Erase to History mode one: Brush and Pencil with the sampled
tip, Block with smoothing. 8 cases, 24 apps.
The fired sweeps hand the command to run_fired themselves, so no test pressed the
Shift+<letter> chords: with the binding for Shift+V dropped at
shortcut_dispatch::command_rows the branch stayed green where main fails three.
New every_group_letter_shift_chord_reaches_its_group_step asserts the keymap
chord of every tools.nextInGroup row over tool_shortcuts::group_letters() on one
settled app - one lookup per letter, no frames - the Space anchor row included:
its default text `Shift+ ` parses to no chord, so it pins that nothing binds it.
Proven red by the temporary Shift+V neuter, green after restoring it.
Also in this review round: correct the bare_app comment claiming the menu
shortcut test presses these rows (menu_rows lists no tools.nextInGroup id);
collapse the byte-identical press and press_in_one_frame in the dispatch tests
into one press; split the guide rows by takes_guide || locked instead of tool
name, count all 21 rows through the three apps, and guard the keeps app idle
(no open text edit) before each row.
craft-layers keys tree ids by their Hash (craft-libs#2774), so photocraft-doc depends on craft-tracked and craft-ui-macros instead of craft's ui feature, and the layering check passes.
`reset_tip_tests::each_tool_resets_and_first_uses_its_own_tip` started 80 apps:
five per painting tool, for two menu commands (`tool.reset`, `tool.resetAll`)
and a brush swap that read the state a case had just set. The two commands pick
their rule from `fresh_brush` for the tool in front of them, so one app serves
all sixteen tools; only the first-use case keeps an app of its own, because a
tool that has been picked before is no longer seeing its brush for the first
time. Same five scenarios and same sixteen tools: 6.9 s -> 1.0 s on this box.
`shortcut_dispatch::tests::press` ran three frames after a press; the runtime
takes the key in the first and the app runs the command it fired in the second,
which is what `press_in_one_frame` and `quick_shift_press` in this crate already
do, so the third frame only drew the app again. `delete_key_targets` shares one
app per focus place across its two keys (the delete is undone, the dry-run log
is drained, and the mask case puts its selection back), and
`keys_run_their_commands` reuses the app whose presses were dry runs.
`guide_cursor_tests` built a whole app for each of its 21 rows and dragged
through four intermediate points; `hold_keys::tests` built one app per tool in
five loops and pressed a stand-in for every tool that shares one family's
decision. Both loops re-entered the same production line dozens of times while
paying for the app's settle frames each round.
- guide cursor: the rows whose press the Move tool takes, and the two locked-
guide rows, share one app; a row that moved the guide puts it back with the
ruler's own command (`view.moveGuide`). The tools that keep the command for
themselves share a second app, Type last and Crop on its own, because their
drag leaves an open text edit or a pending crop that would decide the next
row. The drag keeps two points instead of four: the guide follows the pointer.
- hold keys: one app per loop (`space_right_click...`, `command_or_alt_space...`,
`cmd_alt_drag...`, `tilde_erases...`, `space_repositions...`), a fresh layer or
an explicit deselect where a case would otherwise see the last one's pixels.
- the command-as-Move rule is now also asserted as data for every tool
(`the_command_stand_in_rule_is_the_table`), so the drags can press one tool
per decision: the vertical type tool, both path tools and the rectangle shape
share `is_type` and the `Family::Vector` line with the tools that stayed.
Shift+letter was pressed for every member of every lettered tool group, twice
over: 64 tools times two or three whole-app frames, three times (the next tool,
the wrap, and entering the group from another tool) = 257 frames of the whole
app for a decision `pick_tool` makes in one line from the toolbar table.
The per-tool assertions now fire `tools.nextInGroup.<letter>`, the command the
keymap fires on a Shift+letter press, through `shortcut_dispatch::run_fired` -
the same entry a press reaches, with no frame. One press per kind of group stays
a real key through the app, and `every_displayed_shortcut_runs_its_menu_item`
already presses every `tools.nextInGroup` row's key.
Same assertions, same tool-by-tool coverage: the three sweeps cost 22.0 s on
this box before and 0.4 s now; the new press test for the representatives adds
1.1 s.
The dock keeps an Arc<Workspace> and a Tracked spec model, the toolbar rail
takes Tracked slots, the Layers panel holds its rows as plain data in a
Tracked, and the menu bar is a Tracked model keyed for the native menu's
sync. PhotoCraft states the Creative component set. Export As lists its
resample methods, and layer.exportAs describes them, in the engine's order.
Part of #15476
The 300 x 260 trim put the far mask patch at (230,190,300,260), which touches
all four tiles of the mask's 2 x 2 resident span: no tile stayed absent, so the
branch #2422 is about (cells.rs: a missing tile in a new resident texture gets
the mask default pixel) was unreachable and the check passed with that line
neutered. The far patch now starts on the 256 px boundary, (256,256,300,260),
so tiles (1,0) and (0,1) stay absent; with cells.rs:431 neutered the test fails
again at this geometry ("mask default 1: max diff 246.16/255 at (282,208)",
inside the absent tile column). The document stays 300 x 260.
Comment truths: the disjoint-damages note called the second stroke series'
rectangles "all new" - they are new damage rectangles, not new cached pixels
(the chunk they land in is already resident), which is what whole-chunk
admission is about; the incremental-updates note called the painted area "one
256 px tile" in a document that spans a 2 x 2 tile grid.
The 77 GPU parity tests render the CPU reference and both compositors per
check; several tests then rendered the same document again for a ramp or a
Stats field, and several documents were far larger than the branches they
drive. `diff_rect_full` keeps one pass's pixels and stats so no test renders
a document it just compared a second time; the oversized documents shrink to
the smallest size that still crosses the 256 px tiles and pages they are
about, and the gated Inner Shadow rows compare over the shape instead of the
whole 400 x 300 canvas.
No branch is dropped: every assertion, tolerance and check count stays, the
big-document tests keep their measured documents, and the issue's two
mutation checks plus a tile-share mutation still fail against this harness.
SonarCloud's new-code coverage was 50%: CI sets PHOTOCRAFT_NO_PRINT for
every test, so nothing ran the line after the new off switch. The
command now passes printing_disabled() to page_of_printer, and
disabled_printing_never_spools also asks it with printing on: off
Windows the GDI route answers Unsupported without asking a driver, so
the refusal is the route's, not the switch's.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
craft-libs next's hayro resolves degenerate subpaths before stroking
(ISO 32000-2 8.5.3.2: only round caps paint them), so for butt caps the
zero-length subpath no longer reaches the importer and the page stays
editable. The test now checks that: no warning, one shape with only the
visible line, its dashes kept. The guard in push_shape stays for paths
that still carry such a subpath.
next now has storytold/craft-libs#2550 (the default agent folder and the
agent_folders answer), #2612 (snap targets reach past their spans), #2631
(scroll bar arrows take no keyboard focus) and #2634 (Enter in the hex
field confirms).
- next vendors vello_common and vello_cpu for hayro; the patch section
follows it.
- craft_pdf::raster::Options gained max_coverage; the PDF importer keeps
craft-pdf's default (None).
- storytold/craft-libs#2363 gates a component's story-suite registration
on its crate's own `suite` feature and emits it ungated without one,
which needs craft's test kit in every build. ui-egui declares `suite`
(off): PhotoCraft runs no craft story suite.
The panic hunt turns printing off so no command reaches a printer, but
file.print.page still asked the Windows driver for the default printer's
page. On a Windows runner that call hung while holding SPOOLER, so
file.printers, file.printOneCopy and file.package timed out behind it
and main went red (run 44791314463). It now refuses, after checking its
own parameters, when disable_printing or PHOTOCRAFT_NO_PRINT is set.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With document_chrome the accessible scroll bar is the track, one step
arrow (the bar's thickness) below the view's top. The two chrome settle
trials measure replaying that the memoized title bar and dock groups only
do once PhotoCraft's state is tracked (#15709).
craft-libs next merged storytold/craft-libs#2533: memoized views replace
the settling regions. The app follows it:
- the shell slots, the dock chrome, the panels and the tool rail no
longer take content versions (the framework memoizes them), so the
region versions and their trial go, with the keys that only fed them;
- Tool is MemoProps, as the tool rail's props;
- the menu bar's English-name hook is a capture-free function, reading
the names the bar's model published;
- request_own_repaint is request_repaint;
- the drag trials count replayed memoized views.
Snap targets reach past their spans (reach_past_spans), as layer edges do
in the reference application; this needs storytold/craft-libs#2612.
- Home screen: the rail's navigation (Home selected, Learn), the
community links as its footer and the PhotoCraft title (home_layout).
- Document scroll bars: document_chrome (wider bars, arrows, corner).
- Save for Web: a typed width and height reach the export, replacing
the percent; the ignored-slices notice shows, translatable.
- Stroke's Width declares px; New Layer's Opacity shares the Mode row.
Each with a test that fails without the change.
* Use the document mutator in the damage-history fixture
* Compile the archive driver without framework-only lint dependencies
* Cover dormant Move selection and transform cases
* Check resized pixels when transform click commits
---------
Co-authored-by: FredApps <[email protected]>
* Use the document mutator in the damage-history fixture
* Compile the archive driver without framework-only lint dependencies
---------
Co-authored-by: FredApps <[email protected]>
Moves every craft-libs dependency to storytold/craft-libs next 62189858a
and egui to the fork rev that next pins (6525c879). This brings
craft-libs#2424 (Home screen rail and empty-state card) and the Home
screen spacing fix.
Call sites follow the new craft-libs API: Picked gained Failed and
Downloaded (a failed save keeps its message, a browser download counts
as nothing chosen, as the app writes its own saves), SettingsDocument's
apply is the PreferencesDraft trait method, and the control channel's
document map takes the page index (one page per document).
Same fix as craft-libs#2557 for the window side: with a flag or the
person's own folder covering every direction, the default was created
and never used.
Co-Authored-By: Claude Opus 5.5 <[email protected]>