Commit Graph
301 Commits
Author SHA1 Message Date
David Mann b2db24400e Merge main at b1cfff9d3 into integration batch 10
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).
2026-10-30 14:28:02 +01:00
FredApps 255ecc81d0 Remove 21 requested PR contributions from the 108-PR integration
Retain 87 PRs. Reconcile overlapping integration fixes and update testing scope.
Removed: #7153 #7742 #5493 #9282 #3455 #9172 #3139 #3967 #4783 #5453 #8347 #1991 #3345 #4042 #4305 #4883 #4890 #5090 #6621 #5870 #5939.

Combined CI pending for this source; historical portable artifact is not applicable.
2026-10-29 18:49:17 +01:00
David Mann d7ca7a0cf3 Merge PR #8571: Edit embedded vectors with original-format save-back through VectorCraft 2026-10-29 18:15:47 +01:00
David Mann afacb057f7 Merge origin/main into pr-8571-fixup
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).
2026-10-29 16:38:24 +01:00
David MannandClaude Opus 5.5 72a7caf04a Integration: path.addToSelection/subtractFromSelection name document paths, not files (#8015)
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>
2026-10-29 16:14:58 +01:00
FredApps c3d1e816c9 Reconcile integrated UI ownership, gestures and text regressions 2026-10-29 09:56:08 +01:00
FredApps 4f23f459ba Merge approved PhotoCraft PR #3464: fix(vector): target selected saved paths and own Pen gestures
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.
2026-10-29 06:33:02 +01:00
FredApps c9430c92e3 Merge approved PhotoCraft PR #3748: control: suggest near matches for unknown command ids and methods (#3674)
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.
2026-10-29 06:14:31 +01:00
FredApps 3c79ed4430 Merge approved PhotoCraft PR #4993: Prevent control-channel engine commands from editing behind modal dialogs
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.
2026-10-29 06:07:59 +01:00
FredApps c81347aaa8 Merge approved PhotoCraft PR #5493: Import Photoshop custom shape sets into the Shapes panel
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.
2026-10-29 05:47:45 +01:00
FredApps 6d1f4a47fd Merge approved PhotoCraft PR #9401: fix(format): a save on macOS keeps the file's creation time (#9388)
Preserve both independent additions and moved regression modules without changing production merge semantics.
2026-10-29 04:41:19 +01:00
FredApps 45e790c216 Merge approved PhotoCraft PR #1991: feat(actions): import and export reusable Actions JSON files
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.
2026-10-29 04:11:37 +01:00
FredApps bf33e45694 Merge approved PhotoCraft PR #9342: fix(io, engine): Embed Color Profile writes sRGB for an untagged document (#9325)
Preserve current module structure and port the approved source/test changes to unique current locations.
2026-10-29 03:51:21 +01:00
FredApps 86fcbf26ee Merge approved PhotoCraft PR #7648: Pen: Path Operations menu, as in Photoshop (#1397) 2026-10-29 03:29:31 +01:00
FredApps c50539ea84 Merge approved PhotoCraft PR #6510: Automation: resolve configured root aliases for absolute paths (#6426) 2026-10-29 03:29:25 +01:00
Khawar Zamman Wani 8b835a103c Merge origin/main into pen-path-operations 2026-10-28 09:22:55 +05:30
Dylan M. Taylor ddaf299335 Refactor automation for strict Clippy checks 2026-10-27 23:47:06 +00:00
David MannandClaude Opus 5.5 5ccb6fb723 Merge main
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>
2026-10-27 19:49:42 +01:00
aiongg c1f3219dfb Merge #9445: Automation: refuse to replace a non-image file in the write root (#9439) 2026-10-27 17:44:26 +00:00
David Mann 3a689f217c Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/file_cmds.rs
#	crates/engine/src/retouch_cmds.rs
#	crates/engine/src/vector_cmds.rs
#	crates/io/src/psd_export.rs
#	crates/io/src/psd_import.rs
#	crates/io/src/smart_map.rs
#	crates/psd/src/layer.rs
#	crates/raster/src/lib.rs
#	crates/ui-egui/src/camera_raw_ui.rs
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/filter_dialog.rs
#	crates/ui-egui/src/gpu_canvas.rs
#	crates/ui-egui/src/panels.rs
#	crates/ui-egui/src/retouch_ui.rs
#	crates/ui-egui/src/transform_tool.rs
#	crates/ui-egui/src/vector_ui.rs
#	docs/gaps.md
2026-10-27 14:26:26 +01:00
David Mann dc45a83c88 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/automation/src/rpc.rs
#	crates/automation/src/workspace.rs
2026-10-27 14:20:28 +01:00
David Mann ac071b7cac Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/automation/src/workspace.rs
2026-10-27 14:19:02 +01:00
David Mann c14a707d2a Merge PR #6583: PSD/PSB open without reading the whole file: channel data read as decoded, in bands into tiles (#5106)
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.
2026-10-27 13:50:37 +01:00
jonathanwxh-cell f97eb2849a Merge upstream main and resolve custom shape import conflicts
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.
2026-10-27 19:47:58 +08:00
Don Omondi 285770532b Merge main into embedded vector save-back
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.
2026-10-27 11:59:56 +03:00
PerchAnton 8bb0a5e674 Merge main and preserve automation root alias tests in extracted module 2026-10-27 10:27:26 +02:00
Khawar Zamman Wani f15c93ce73 Merge origin/main into pen-path-operations 2026-10-27 09:49:45 +05:30
aiongg f07a484fb7 test(automation): read UI_SET_FIELDS from control/params.rs
The ui-egui control.rs split moved the UI_SET_FIELDS declaration to control/params.rs; the MCP test reads it from source by path.
2026-10-26 22:54:54 +00:00
aiongg ed0d14d272 refactor(automation): move rpc.rs tests to rpc/tests.rs 2026-10-26 22:30:13 +00:00
aiongg 13ae69db56 refactor(automation): move workspace.rs tests to workspace/tests.rs 2026-10-26 22:30:13 +00:00
Don Omondi c129dd50e0 Merge main and preserve original-format embedded vector save-back 2026-10-27 00:45:48 +03:00
jonathanwxh-cell 059940c993 Merge upstream main into the CSH shape import branch
Keep the custom-shape translations and the CSH import notes with main's newer format and gap status.
2026-10-26 09:50:13 +00:00
Khawar Zamman Wani 07549fd6a6 Merge origin/main into pen-path-operations 2026-10-26 10:20:27 +05:30
aiongg cece50d513 Merge pull request #9386 from davidmann4/integration-batch-8
Integration batch 8: 37 reviewed community PRs on main
2026-10-25 20:04:41 -04:00
skylar taylor-barrick 718950cab6 chore(deps): refresh safe dependency bumps (#9558)
serde_json 1.0.154, proptest 1.12, criterion 0.8, crc32fast 1.5.3, rmcp 3.6,
tokio 1.54.1, base64 0.23 (direct deps), schemars 1.2.3, wat 1.262, libc 0.2.191,
objc2 =0.6.5, arboard 3.7, open 5.4.5, muda =0.21.2, winresource 0.1.34.
2026-10-25 19:30:07 -04:00
Phil TrinhandClaude Opus 5.5 4915f0970e PSD/PSB open without reading the whole file: channel data read as it is decoded, in bands straight into tiles (#5106)
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>
2026-10-26 02:37:20 +08:00
Khawar Zamman Wani 18b32f1202 Merge origin/main into pen-path-operations 2026-10-25 21:25:26 +05:30
David MannandClaude Opus 5.5 14693eb085 Integration: merge main 528491f9a, resolve conflicts
- crates/engine/src/edit_cmds.rs: copy_mask keeps #3297's filter-mask target and takes main's
  clipboard `source` (#8945).
- crates/cms/src/lutfile.rs: #9183's shaper doc comment next to main's UTF-16 decode_text (#9129).
- contributors/people.toml, docs: unions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:26:06 +01:00
David Mann ff479a2c01 Merge PR #9139: Rebuild the Histogram panel
# Conflicts:
#	crates/ui-egui/src/control.rs
#	docs/scorecard.md
#	docs/ui-parity.md
2026-10-25 16:11:31 +01:00
David Mann 7b79f70787 Merge PR #3297: Smart Filters: paint the filter mask directly, with undo (#3290)
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.
2026-10-25 15:42:51 +01:00
skylar taylor-barrick 72e11802d4 Regression tests for eight fixes merged without one (#8690)
* #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).
2026-10-25 10:19:36 -04:00
David Mann bb39b4a8dd Revert "Merge PR #1199: Add optional local models for subject matting and object selection"
This reverts commit 5f2a7b9903, reversing
changes made to 9ef4c0a487.
2026-10-25 15:19:27 +01:00
David MannandClaude Opus 5.5 8eef287408 Tests: the smart filter stack-cache test runs in its own binary (#9376) (#9377)
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>
2026-10-25 10:18:43 -04:00
David MannandClaude Opus 5.5 52359ada45 Address CodeRabbit review: refuse a non-regular write target before opening it
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>
2026-10-25 14:55:57 +01:00
David MannandClaude Opus 5.5 5f2a7b9903 Merge PR #1199: Add optional local models for subject matting and object selection
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>
2026-10-25 14:23:25 +01:00
David MannandClaude Opus 5.5 fa4269af98 Automation: refuse to replace a non-image file in the write root (#9439)
`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>
2026-10-25 14:09:13 +01:00
David MannandClaude Opus 5.5 b53f2dcac7 Automation: refuse every Windows device name in request paths (#9424)
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>
2026-10-25 13:26:53 +01:00
Hector VillarrealandClaude Opus 5.5 f241bba1ad Saves keep the creation time under a deny-write ACL and through automation
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>
2026-10-25 04:43:52 -06:00
Hector VillarrealandClaude Opus 5.5 6f1164e034 fix(io, engine): Embed Color Profile writes sRGB for an untagged document (#9325)
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>
2026-10-24 22:40:40 -06:00
PerchAnton d744f155a0 fix: integrate current main for PR #6510 2026-10-25 06:18:56 +02:00