Main reverted the #9455 merge, so a plain merge would drop the band-by-band
develop; keep this PR's demosaic.rs, develop.rs and development_limits.rs and
take all other upstream changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Main reverted the earlier #9455 merge, which also removed the AHD changes
that came in with it; keep this PR's AHD code and add clampf plus the
NaN-plane test from main.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keep the AHD scratch/band changes; take clampf and the NaN-plane test from main
(main reverted the earlier #9455 merge, so the AHD changes stay on this branch).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore: resolve SonarCloud maintainability issues
* fix: format imports and fix effect_entry argument type
* fix: restore test closure and wildcard import that broke compilation
* refactor: split composite_to_surface to reduce cognitive complexity
P25 broke at 299 ms once on the contended runner (2026-10-18). It now uses
the p95 metric with the same 200 ms budget; with n <= 20 the p95 rank equals
the max, so on the runner (n = 8) this has no effect until reps >= 21.
P16 stays unenforced: the new --from enforce report over the 2026-10-18..25
nightlies lists it as flaky (p95 103.7 ms on 2026-10-18).
The 2026-10-05 baseline was recorded at load 224.9 on 14 cores; the scorecard now
says so without changing a number, shows the baseline's run count, and replaces
the claim that the nightly checks regressions with the machine class it actually
runs on.
--update-baseline refuses a contended run (1-minute load at the start above
settings.max_load_per_core per core) unless --allow-contended, which labels it.
--update-baseline --from builds the baseline from several saved results.json
files: the median p50 per scenario and the highest as its noise ceiling, which
regressions are now judged against. It also reports which budgets could be
enforced and which enforced ones are flaky. The single-run path is the N = 1
case of the same function.
a2ab774eb raised the limit for the hover preview test only; on the PR's CI
options_bar_menu_arrows_walk_on_while_recording_recent_fonts then failed the
same way ("Harness::run exceeded max_steps (4). It would have settled after
6 steps", repaints from font_preview.rs:152). Every font picker harness that
opens the menu now allows SETTLE_STEPS (16) frames; Harness::run still fails
if the menu never settles.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The bands were split into four groups per worker, clamped to the number
of bands. A 24 MP raw has 126 bands, so with 32 workers every group held
one band and every band allocated and zeroed a fresh 16-plane scratch,
which cost more than the reuse saved. The bands are now split into one
group per worker, so the scratch is allocated once per worker whatever
the thread count. Pixels are unchanged.
Adds a test that runs 35 bands in groups of 9 on a 4-thread pool and
compares the result with the reference bit for bit, so the band index of
later groups and a scratch reused for several bands are checked.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each AHD worker allocated scratch for a full 38-row band while
develop's memory check budgets h.min(32) + 6 rows, so short images
allocated more than was approved: a 262144 x 1 strip was budgeted
~106 MB and allocated ~580 MB (5.4x). The scratch is now sized from
the same row count as the budget, and the budget also counts the two
u32 vertical-sum rows, so budget == allocation (~109 MB there).
Pixels are unchanged.
Tests: ahd_scratch_fits_its_budget (budget equals the real scratch for
h = 1..5000), ahd_matches_reference_with_reused_scratch (1100 rows,
jobs 1 and 2, all four phases: one scratch serves many bands).
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 630e32c4238df452d9d5e70357bdb968045ab8c3)
Review feedback on #7809: the macOS default set moves to an explicit
opt-in shortcut set (separate change). This change keeps only the
native-menu fixes: the menu bar reads key ownership from dispatch, so a
saved key on a command with no menu item, or an alternate key, takes
⌘H, ⌘M or ⌘, from the system item. Defaults stay Photoshop's on every
platform (⌘K Settings, ⌘H Extras, ⌘M Curves, ⌘, Hide Layers).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UfJUts45srnaLXxZffF12A
Opening the menu on the current family (#9197) paints rows whose font
samples load over a few frames; on CI's font set that takes 6 steps,
past egui_kittest's default of 4. Raise max_steps as other harnesses do.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Picks up the startup prompt without the glyphs a font may lack (storytold/craft-libs#343, #344): the close mark is painted and the version pill is ASCII, so apps that panic on a missing glyph no longer take the prompt down.
Part of tracking issue storytold/craft-libs#319
`main` returns `eframe::run_native`'s error, and a desktop launch has no console —
release builds are GUI-subsystem on Windows, a Dock launch has no terminal on
macOS — so the error went nowhere and PhotoCraft "just closed" (#7643).
The error is now logged, and when nothing else can see it it is also shown in one
native `rfd::MessageDialog` with the renderer that was tried, the GPU-startup
fallback reason, the version and the log file to attach. A terminal launch keeps
printing to standard error, a `--control` launch keeps its exit status and a
headless Linux launch (no DISPLAY, no WAYLAND_DISPLAY) keeps the error on stderr,
so none of them gets a modal dialog.
`AppLogger` remembers the file `attach_dir` opened (`path()`): the logger only
held the `File`, and the dialog has to name the file a reporter should attach.
uncached_refresh_counts_every_pixel_for_the_current_state counts an 18 MP
document pixel by pixel (the proxy only starts above 16 Mi pixels). In a
debug build on fork CI's loaded Linux runner that took over the 5 s
settle() allowed ("the histogram never settled"); locally it takes well
under a second. settle() returns as soon as the histogram lands, so the
longer limit only matters on a slow machine.
Co-authored-by: mathildalabs <347373177+mathildalabs@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
brush-parity.md, gaps.md and ui-parity.md had 2026-10-25 revision rows
under a 2026-10-23/24 "Last updated" header; the headers now carry the
latest row. gaps.md (24 of 171), ui-parity.md and target-app-parity.md
(46 of 149) quoted stale counts of preferences that do nothing; they now
quote the scorecard's 12 of 178. target-app-parity.md still listed the
Camera Raw Calibration panel as missing, which landed on 2026-10-13
(#5128); the row now names per-camera colour for non-DNG cameras, as
gaps.md G14 does.
Found by CodeRabbit on #9386.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With a text edit and no selected range, styles_at read the paragraph at
byte 0, so the alignment and direction buttons showed the first
paragraph wherever the caret was: in "First\rSecond" with the second
paragraph right-aligned, a caret in "Second" lit Left. A collapsed caret
now picks the paragraph it is in, as Photoshop's options bar and
Paragraph panel do.
Found by CodeRabbit on #9386.
Co-authored-by: Hector Villarreal <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tone histogram cache tag gave HistSource::UpTo(layer) kind 6, which
#3297 also gave the filter-mask Curves target, so both sources of one
layer had the same tag and the cache could hand one's histogram out as
the other's. UpTo now has kind 7, and a test checks every source of a
layer has its own tag.
Found by CodeRabbit on #9386.
Co-authored-by: mathildalabs <347373177+mathildalabs@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An Alt-press with the Mixer Brush loaded paint and returned, but left
no state for the press: if Alt was let go before egui recognised the
drag, the drag's start reached the tool as a plain press and painted a
Mixer stroke from the sampled point (Alt-press, release Alt, move 20 px,
release: one edit). The press now stays a sample press until it is
released, as #7802 made it for the Brush's Alt eyedropper.
Found by CodeRabbit on #9386.
Co-authored-by: durtyrobbin <76844303+durtyrobbin@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tests' setup returned None, without a message, when the device
request or the pipeline build failed, so every test passed early: with
a type error appended to camera_raw.wgsl all 13 tests still passed on a
machine with a GPU. A pipeline that doesn't build on a supported adapter
now fails the tests, a missing device skips with a message (and fails
with WGPU_BACKEND set, as in parity.rs), and a naga validation of the
shader fails on runners without a GPU too.
Found by CodeRabbit on #9386.
Co-authored-by: p0rps <134095787+fjamesprice@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Clone strokes painted every dab where its points lay, up to 1e7 px off
the canvas: on the layer itself without "newLayer", and on the work
surface with it, so each far dab allocated up to 4096x4096 px of tiles.
A stroke with points [[100,100],[-30,100],[9e6,9e6]] on a 200x200
canvas painted 3 dabs and left pixels left of the canvas. The dabs are
now cut to the canvas before any read or write.
Found by CodeRabbit on #9386.
Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A decode kept the first MAX_EXTRA_SAMPLES (16) extra samples and dropped
the rest without a warning, though files with up to 64 samples a pixel
open: an RGB TIFF with 20 extra samples opened with 16 and no notice, and
a save then lost the other 4. The decode now adds ExtraSamplesOverLimit
with the count left out.
Found by CodeRabbit on #9386.
Co-authored-by: Jason DeBoever <615848+jasallen@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The PR's test compares the rendered scorecard with the tree, where the
corpus.rs doc comments and the sha256 manifests agree, so it still passes
with the PR's code reverted. The manifest loop is now pinned_file_counts,
and a synthetic root whose doc comment says 999 files and whose manifest
lists 3 must give 3 (an unpinned corpus keeps its doc comment count). It
fails with the loop skipped.
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>