Conflicts resolved as unions of both sides: codecs re-exports (PngRows + TiffBands), smart_cmds source imports
(main's source_surface_from_buffer and cache API with #8571's svg_source_image_in/convert_svg_source; main's
duplicate rendering import dropped), io flat.rs test modules (#8536's banded TIFF tests and main's PNG ones),
menus/invoke.rs (#8571's smart SVG intercept and main's layer.selectUnderCursor), state.rs (#8311's
type_box_overflow and main's type_insertion_style), the canvas_geom test keeps the is_finite guard, docs
status lines keep both change lists, i18n catalogs keep both sides' rows (hi.tsv: main's wording where both
added the same string).
Conflicts: svg.rs (main's bufread inflate and shared render helper, kept
with the PR's bounded raster path), psd_import.rs (the PR's vector
preview moved into main's smart_content), menus/invoke.rs (the SVG
intercept moved into main's split invoke_unguarded), rendering.rs and
the ui-egui import lists (main's explicit imports), Cargo.lock, docs
status lines (unions).
Their params doc mentions path.toSelection, so the automation filesystem-path
classifier test flagged them; they take a document path name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Reconcile captured Pen and Freeform targets with current resumed-subpath, Type Path, Path Operation and draft recovery behavior. Valid source-owned tab switches commit to captured original target; invalid snapshots cancel with a diagnostic; refused commits retain draft and suppress automatic retries. Preserve current Saved(index) API and hidden-work-path protections, register all new ownership/gesture tests and add original-target tab-switch/deleted-target cases. Includes verified compile/API corrections from prior checkpoints.
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Add bounded deterministic suggestions via current error/session/control modules while preserving authorization/modal checks. Register hints and all original tests; fix scrollbar choice import and updated PSD image fixture field found by 100-head check.
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Apply modal ownership gate to both control entry points while retaining current Camera Raw and full-window workspace continuations, authorization, and direct engine dispatch. Fix Windows case-variant fixture to use supported document suffix; add explicit existing unrelated-file refusal assertion.
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Integrated bounded atomic CSH set parsing, unique shape/group naming and native Shapes panel import with inline-data authorization guards; preserved duplicate-name, inner-hole, malformed-second-record and preferences-reload regressions. Combined independent catalog additions and retained current parity metadata.
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Register bounded Actions JSON module in current command tree; preserve all ambient path restrictions and inline-data allowances with regressions.
Conflicts with main's batch #9880:
- psd file.rs / layer.rs: #5287 (PSB by encoded size, RLE tables widened on
promotion) against #6583's lazy reader. Main's new widening and length code
read `.data`, which #6583 leaves empty while the bytes stay in the source;
it now goes through `encoded()` / `encoded_len()` (also the auto-merged
lines in `rle_widening`, `encoded_len` and `LayerRecord::write`), and the
lazy reader sets `write_as_psb: false`. New test
`a_lazy_psd_promotes_to_the_same_psb_as_an_eager_one`: a lazily read PSD
writes the same PSB bytes as an eager one; it fails with a `.data` read.
- direct_select.rs / vector_ui.rs: #9321's Type Path and #6353's hidden
Work Path both kept.
- io tests main.rs: both modules. scorecard.md regenerated (12 of 181);
ui-parity.md and gaps.md follow it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged at the fix-up commit before its main merge (362947695d); the
conflicts with the batch are resolved here: psd_import.rs keeps both
sides' tests, tiff_layers.rs takes ImageData::new.
Preserve CSH import behavior, inline-data authorization policy, localization and regression tests while retaining upstream module extraction.
Local verification: formatting and independent static review passed. Parser/engine/automation/UI runtime, broader Clippy, WASM and visual gates remain incomplete locally because of resource limits. Hosted CI must establish remaining gates; this commit does not claim the PR is ready to merge.
Resolve conflicts with the engine's cmd/ module move and the per-crate
integration test binaries. Run a selected VectorCraft.app bundle directly
(identified by bundle id) and reject nested gzip in bounded SVG parsing.
Opening a 2.14 GB PSD (2000×2000, 109 layers, 821 MB of embedded smart objects) peaked at
7.28 GB and took 6.8 s; it now peaks at 3.00 GB and takes 3.6 s (macOS peak memory footprint,
`cargo run --release -p photocraft-io --example psd_open_mem`).
- photocraft-psd: `PsdFile::from_source` parses from a `ReadAt` source (`FileSource`: pread /
seek_read in bounded reads). Channel data and the merged image become `Stored` ranges read
when decoded; the model equals `from_bytes`'s and writes back the same bytes (tests compare
the two on every generated file, including Lr16/Lr32 layer blocks and truncated files).
- `ChannelData::row_decoder` decodes any band of rows: RLE via its row table (a stored channel
reads only the band's bytes), raw by offset, ZIP inflated once.
- photocraft-io: `import_file` opens a path; PSD/PSB through `from_source`, other formats read
whole. Layers decode in bands of whole tile rows (~32 MB) into tiles: no whole-layer plane or
interleaved buffer. Global blocks move into the document instead of being copied; finding an
embedded smart object no longer copies every file in `lnk2`.
- photocraft-raster: `Surface::share_uniform_tiles` + `TileInterner`; the PSD import shares
single-value tiles (backgrounds, fill caches, masks) across layers.
- The background open job and the CLI/MCP (`automation::files::open`) use `import_file`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged with our fix-up pr-3297-fixup (1de1e9eb58) on top of the author's head 053e1e0d03.
Conflicts resolved: channel_cmds.rs routed() keeps the PR's PAINT_IDS list plus the batch's
paint.artHistoryBrush; paint_cmds.rs Paint Bucket params keep the batch's "mode" and the PR's
"filterMask" target; docs/scorecard.md takes the batch's numbers with FILE-215-3 done.
* #3763: test that automation refuses edit.installedProfiles
edit.installedProfiles scans the OS and user ICC folders but takes no path
parameter, so the automation policy let it through until it was listed as an
ambient-path command. The test checks every authorize entry point and the
sandboxed Headless session refuse it; without the policy line the first
assertion fails (authorize_engine_command allowed it).
* #4134: test that Liquify undo/redo and brush keys work with a numeric field focused
Ctrl+Z was ignored in Liquify while a slider's text edit had focus, and the
bracket keys could not step a 2 px brush down to 1 px. The tests focus a real
text edit and press Cmd+Z / Cmd+Shift+Z and the bracket keys. Without the fix
Cmd+Z leaves the stroke in place and '[' gives 1.8 instead of 1.0.
* #119: test that Layers panel thumbnails are released with their layer or document
Thumbnail textures of deleted layers and closed documents were kept for the
session. The test deletes a layer and then closes the document and checks the
thumbnail cache. Without prune_thumbs the deleted layer's thumbnail is still
cached.
* #2241: test that Quick Mask and Screen Mode follow the two-column toolbar
The two buttons stayed stacked when the toolbar was widened to two columns.
The test checks they are stacked in one column and share a row once the header
chevron switches to two columns, in three themes. Without the layout the
second assertion fails (the buttons sit on different rows).
* #3425: test that the options bar draws a single full-width border
The options bar drew its own top and bottom separator on top of the panel's
border, doubling the lines. The test renders the bar in three themes and counts
full-width separator-coloured horizontal lines. Without the fix there are three.
* #4139: test that the Free Transform rotate zone draws the turn arrow
The rotate zone hides the OS pointer, so the canvas must draw the curved arrow
itself where the box has no preview overlay. The test hovers just outside a
corner of a box without a preview and checks the pointer is hidden and the
arrow arc is painted. Without the canvas draw call no arrow is painted.
* #4630: test that the scrollbar thumb stays visible under the pointer
The stock thin scroll bar fades its handle to the track's opacity while the
pointer is on it, so the thumb vanished. The test checks every theme's floating
scroll style keeps the handle opaque and more opaque than the track. Without
the override both are 0.6.
* #2209: test that Make/Reset Default buttons wrap with long labels
In languages with long labels (Russian) the two buttons overflowed the page
column in a non-wrapping row. The test draws the page in Russian and checks the
second button wraps to its own right-aligned row. Without main-axis wrap both
sit on one row and run left over the effect list.
* #3425: require exactly one options-bar border
The test allowed zero borders, so it would pass if the options bar lost its border altogether. It now requires exactly one, the panel's, in every theme; with the options bar's own separators restored it still fails (three lines).
an_ambient_map_or_lut_never_renders_unfiltered_pixels_into_the_stack_cache
compares the process-wide stack_cache_bytes() before and after a denied
render. In the shared tests/it binary other tests render smart objects in
parallel and change that counter, so the test failed about 1 run in 20.
It now runs in its own process, like engine smart_filter_stages and
mask_cache_purge; the fixture moves to tests/support and is shared by
both binaries.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
An existing FIFO at the write target reached holds_image (and the Unix
xattr copy), whose read-only open blocks until a writer appears, stalling
every request behind the Headless lock. Check the target's type first,
following links, and refuse directories, FIFOs, sockets and devices.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged with our fix-up d5139d177 (pr-1199-fixup), which merged main as of 8f09d122d.
Conflicts with main since then and with batch 8:
- photocraft-cli: main split the CLI into clap modules (#7071); the model wiring
(local_headless, configure_cli_models, batch's shared backend, droplet) is re-applied there.
- Cargo.lock regenerated: crates/ml pins ureq =3.4.2, so the app's ureq goes 3.5.0 -> 3.4.2.
- cutout_cmds: main's subject area (#8235) kept for the classical path beside the model path.
- file_cmds batch: main's per-input closure takes `s` later, so the backend and
integrations prefs are read before the closure instead of inside it.
- prefs_ui: model-choice filter with #4573's pref_choice_label; Integrations stays visible
(#4097) with the model choices only where models run; the translation-coverage test main
deleted (c3aa3f9e5) stays deleted; old section_fields test calls take PreferenceFieldOptions.
- Semantic clashes git did not flag: #4097's Integrations test literals in
apps/photocraft take ..Default::default() for the new model fields; main's and #4573's
section_fields test calls pass PreferenceFieldOptions.
- engine lib.rs, prefs.rs, smartselect tests, snapshot example, jobs_ui_tests, people.toml,
docs and i18n catalogs merged as unions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`doc.save {"path": "src/main.rs", "format": "png"}` and `doc.render
{"path": "Cargo.toml"}` renamed image bytes over whatever file was there.
`AuthorizedWorkspace::write` now replaces an existing file only when its
extension is a format PhotoCraft writes or its bytes are an image; new
files of any name are still created. docs/mcp.md says what a granted root
allows and recommends a dedicated output folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The automation device-name check was narrower than cap-std's own
Windows check (COM0/LPT0, COM¹-³/LPT¹-³, spaces before the extension).
write() renames through a Win32 path and skips cap-std's check, so a
file such as COM¹.png or "NUL .png" could be written but not read
back, and export_sequence left an empty folder behind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit (discussion_r4370498176, two findings):
- copy_metadata copied the ACL before the creation time; an ACL that
denies its owner write access, copied onto the temporary file first,
made the creation-time step fail to open it. The time goes first now.
- AuthorizedWorkspace::write (the automation save path) copied only the
extended attributes, so an automation save reset Finder's Created date.
It now also copies the creation time through the same capability-checked
handles, with the new descriptor-based meta::copy_created_file.
Tests: keeps_the_creation_time_under_a_deny_write_acl,
write_keeps_the_replaced_files_creation_time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An untagged document (a new one in the default working space, or a file
opened without a profile) is treated as sRGB (sGray for grayscale), but
Export As, Save As and Save for Web wrote no profile for it, so viewers
had to guess. Photoshop embeds sRGB IEC61966-2.1 for both a new and a
"Don't Color Manage" document when the profile is embedded.
A flat export to a format that carries profiles now tags an untagged
image with the profile assumed for its mode; the codec still leaves it
out when embedding is off, and formats without profiles are unchanged.
Save for Web does the same when Embed Color Profile is on.
Tests that relied on untagged exports carrying no profile (an EXIF
ColorSpace round trip, the Export As proxy-estimate premise, an Affinity
preview fixture, a WebP lossy check) now say so explicitly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>