Commit Graph
528 Commits
Author SHA1 Message Date
FredApps 17db1ba448 Merge remote-tracking branch 'upstream/main' into inbox-15255 2026-11-23 10:57:42 +01:00
aiongg 7ea8b7c8a9 Engine split step 6: trait imports where only CI's builds use them (Linux print, app tests, GPU trials) 2026-11-23 03:56:31 +00:00
aiongg 3cbd7b155a Engine split step 6: slot_access.py and its rewrite (slot fields to accessors, trait imports, doc links)
scripts/engine_split/slot_access.py rewrites the slot fields to their accessors
(Tracked presets deref through one more *), adds the trait imports, turns
s.presets_changed() into presets::presets_changed(s) and points Session::method doc
links at the trait methods. Its fix mode applies what cargo check reports; branch
mode serves open branches and lists their edits to the moved methods. The
definition-span helpers session_state.py uses move to rust_source.py so both
scripts share them (session_state.py's output is unchanged).

This commit is split plus the fix rounds against cargo check of engine-core,
engine, ui-egui and automation (lib and tests). Part of #15710.
2026-11-23 03:28:27 +00:00
FredApps 01bce7a310 Merge branch 'main' into feat/param-schema-dispatch
Keep the parameter-schema dispatch, including Clean Brush refusing
unknown keys and the batch test that does not pass steps to Image
Processor. Take main's engine-core split and its new session helper.
2026-11-23 05:55:52 +07:00
Terra854andFredApps 6133bc3e4c io: use the shared PSD signature check (#16314)
Co-authored-by: FredApps <[email protected]>
2026-11-23 04:25:19 +07:00
FredApps 257fc03887 Merge branch 'main' into feat/param-schema-dispatch
Keep main's command registry split, and carry the parameter-schema docs
and composed-layer option placement from this branch into the new table
modules.
2026-11-22 22:26:32 +07:00
David Mann e3b3c39c3f Merge PR #15818: fix(automation): reject malformed RPC close parameters
Conflict: both sides added a test at the end of crates/automation/src/rpc/tests.rs; kept both.
2026-11-22 00:29:43 +01:00
David Mann fd28fa6808 Merge PR #15842: fix(automation): reject malformed doc.render requests 2026-11-22 00:28:15 +01:00
David Mann 36acabbc3b Merge PR #15824: fix(automation): preserve native filenames in saved manifests 2026-11-22 00:27:40 +01:00
David Mann 4566fab901 Merge PR #15672: fix(automation): validate RPC save parameter types 2026-11-22 00:27:21 +01:00
David Mann 2a84c7fb3a Merge PR #15150: docs(automation): describe agent bridge challenge authentication 2026-11-22 00:25:53 +01:00
David Mann 90738d154f Merge PR #15129: fix(automation): ignore relative XDG config directories 2026-11-22 00:25:24 +01:00
David Mann a4f378966c Merge PR #16171: Open Recent lists an automation open where the file is on disk (#16098)
# Conflicts:
#	crates/ui-egui/src/control/tests.rs
2026-11-21 17:25:58 +01:00
aiongg 292cdc6dc5 Menu model derived from MenuFacts: the facts the rows show, through their revisions or as small plain values; state_hash, had_input and the hash-keyed MenuModel go; the native menus re-sync on the bar's revision and the keymap. PresetState.rev gives way to the Tracked revision, saves that rename a document move documents_generation, and the default proof setup shares the built-in profile 2026-11-21 14:07:15 +00:00
David MannandClaude Opus 5.5 779b20eeb0 Open Recent lists an automation open where the file is on disk (#16098)
app.open is requested by a path relative to the automation read root. It went
into Open Recent as is, where it names nothing: Home drew a blank card and
clicking it failed. The workspace now reports the file's location below the
root that holds it, and app.open (also the directory .pcraft path) lists that.
The document's save-back path stays root-relative; without a location the open
is not listed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-21 12:50:56 +01:00
David MannandClaude Opus 5.5 acc82659ea automation: default agent folder and the agent_folders MCP tool (#15974)
With Preferences > AI Integrations' folders empty, agents had no file
access, and the launcher starts `mcp` with no root flags.

- An empty folder setting named by no flag uses the shared default agent
  folder Documents/ArtCraft/Agents/PhotoCraft (craft-libs#2550), in the
  open window (agent link, --control) and in the live headless session.
- agent_folders tells the agent which folders it may use: the headless
  session's roots, or the open window's saved folders with the default.
- Pin craft-libs to bafb452 + the craft-libs#2550 commit until it reaches
  next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 15:23:05 +01:00
FredAppsandFredApps abad0deaea Hold the normalized layer selection across engine reads (#15907)
* Hold ordered layer selection across reads

* Migrate UI and automation to the borrowed document selection

* Fix held selection migration diagnostics

* Preserve held selection for unchanged active layer

* Keep owned selection snapshots in engine tests

* Allow consuming a document state without cloning

* Preserve document ownership on close and capture export selection

* Migrate engine integration tests to held selection

* Keep isolate-layer test selection snapshot

* Read the active layer before editing the gradient test document

* Remove redundant selection slice borrows

---------

Co-authored-by: FredApps <[email protected]>
2026-11-20 18:11:54 +07:00
aiongg 6cef4c278a Merge pull request #15813 from aiongg/perf-15709b
Key document queries on revisions instead of per-frame walks (#15709)
2026-11-19 18:16:39 -05:00
Mex 84c9cbb3a0 test(automation): cover malformed doc.render requests
Check rejection for invalid parameter containers and path types. Verify that omitted and null paths still return an inline PNG.
2026-11-19 22:35:41 +01:00
Mex 5490e9c3f9 fix(automation): reject invalid doc.render parameters before rendering
Validate the parameter object and optional output path before rendering. Keep the existing behavior for an omitted or null path and string output paths.
2026-11-19 22:35:02 +01:00
aiongg abedab1e4d Cache History rows, artboard pages and the snap moving set on revisions
History gets a generation that every change takes a fresh number from, and
the snapshot list one through DocState::snapshots_mut, so the History rows
rebuild only when either moves. Artboard pages and the layers a Move drag
takes along are computed once per document revision; set_active_layer moves
the revision like the other layer selection changes, through one
bump_selection_revision. The view-only revision steps of history options,
the channel eyes and Isolate Layers go through bump_view_revision; Isolate
Layers still marks the document modified.

DocQueries drops every entry when the open document set changes, and counts
what it computes, which the idle trial asserts stays unchanged. Fill layers'
thumbnails key on impl Hash for Fill. A new trial checks the Layers rows'
revision follows a rename and both disclosure toggles.
2026-11-19 20:51:32 +00:00
Mex 6acc50db72 test(automation): preserve Unix backslashes in native save names
Check the raw manifest and reopened .pcraft filename after a native filesystem save, and verify the source document name is unchanged.
2026-11-19 21:37:15 +01:00
Mex 8909d97314 fix(automation): preserve native filenames in saved manifests
Derive the .pcraft snapshot name from the native Path leaf so Unix backslashes remain filename characters. Preserve portable byte-name handling. Fixes #15820.
2026-11-19 21:35:54 +01:00
Mex 3bab5b5ae0 test(automation): preserve documents after malformed close requests
Check arrays, booleans, numbers and strings leave the session unchanged. Verify missing/null/default and explicit index requests close the intended document.
2026-11-19 21:19:50 +01:00
Mex 79ce13a573 fix(automation): reject malformed RPC close parameters
Reject non-object doc.close params before they can become an implicit close of the active document. Preserve null/default and valid index handling. Fixes #15815.
2026-11-19 21:17:52 +01:00
David Mann 810f4cb7eb Merge origin/main into automation/shared-live-client
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/engine/Cargo.toml
2026-11-19 17:40:46 +01:00
David MannandClaude Opus 5.5 32b6d22b2a automation: the MCP CLI uses the shared live client (#15762)
photocraft-cli mcp resolved each tool call with its own copy of the
"find the open window" client. craft-libs now ships that client for
every app (craft_control::agents::Live, re-exported as
craft::automation::agents::Live by craft-libs#2391), so live.rs keeps
only PhotoCraft's parts: reading its saved preferences, its bridge
client and its headless session. The app's AgentSwitch::watch takes a
plain closure now instead of craft_host::Wake.

The craft-libs pin is craft-libs#2391's head for now; it moves to the
merge commit on next once that lands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 15:52:51 +01:00
FredApps 236bc84a5e Give scratch tests a deterministic volume capacity 2026-11-19 08:01:25 +01:00
Mex 8c106a42c7 test(automation): preserve saved files after malformed RPC saves
Check path/format types and non-object params against an edited .pcraft document; preserve stored bytes and document state on refusal, with valid implicit and explicit save controls.
2026-11-18 23:13:19 +01:00
Mex 687ded0284 fix(automation): reject malformed RPC save parameters
Reject non-object params and wrong-type path/format values before they can become an implicit save to the stored layered file. Preserve missing/null behavior. Fixes #15670.
2026-11-18 23:11:26 +01:00
aiongg bd3712d114 Lint: each shared test fixture loads once per test binary, and xtask names its step list type 2026-11-18 21:20:35 +00:00
aiongg 36aa7a8f69 Merge remote-tracking branch 'origin/gpu-test-group' into ci-fixes
# Conflicts:
#	.config/nextest.toml
#	crates/ui-egui/tests/it/main.rs
2026-11-18 20:11:50 +00:00
Mex b025af907c Merge branch 'main' into patch-30 2026-11-18 21:06:48 +01:00
aiongg 5456a5a812 Tests: the nextest gpu group holds only the tests that build a GPU device
The gpu group (at most 4 at a time) was chosen by name: every ui-egui
integration test and every test whose path contained canvas, gpu, mip or
type_tool. On main's gate that put about 680 ui-egui tests that never
open a device on four slots.

The group is now photocraft-gpu plus every test in a module named
`gpu_tests` or `<name>_gpu_tests`:

- ui-egui integration tests that draw on a device move to
  tests/it/gpu_tests/; mixed files and unit tests keep their GPU tests in
  a nested `gpu_tests` module or a `*_gpu_tests` file.
- photocraft-automation's GPU backend tests are `gpu_backend::gpu_tests`.
- batch_export_options checks menus and exported bytes, so it runs on the
  CPU canvas instead of a GPU harness.

No test assertion changes. The Windows priority list follows the moved
test names.
2026-11-18 19:57:56 +00:00
aiongg 877e23f543 Tests: one shared lock per process-wide global in each merged test binary
The scratch pool and spill configuration, simulated free memory and the global caches are locked from tests/it/main.rs instead of a mutex per file.
2026-11-18 19:19:35 +00:00
aiongg 0081fd10e1 Tests: merge single-file integration test binaries into one binary per crate
Each crate's top-level tests/*.rs files become modules of tests/it/main.rs, and a new xtask check (test-binaries) refuses a new single-file test binary.
2026-11-18 19:11:27 +00:00
FredApps 6bbe4cc1df fix(cli): retain typed errors through launch option validation 2026-11-18 07:04:49 -05:00
FredApps 8d6a867925 Merge pull request #9607 from dotCooCoo/fix/rpc-deadline-test-no-clone
Tests: the control-channel TCP tests read and write through the stream, not a clone
2026-11-18 16:38:52 +07:00
FredApps 7c5d0bc6ea Merge pull request #9750 from 1Git2Clone/ci/ast-grep-cli
ci(cli): check the command-line code with ast-grep rules (RFC-0012)
2026-11-18 16:28:06 +07:00
FredApps 4adb424ba4 fix(automation): treat vectorMask.currentPath as a document path
Windows unit failed registry_filesystem_path_params_are_classified
because this branch's params note says "the path inverted". That is a
document vector path (name is work or a saved path), same as the other
vector-mask commands already excluded from the host-filesystem policy
check.

Signed-off-by: FredApps <[email protected]>
2026-11-18 13:57:34 +07:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
dotCooCoo c5f0fa3932 Merge main into fix/rpc-deadline-test-no-clone 2026-11-15 19:50:25 -08:00
David Mann 0362120fc4 Merge pull request #11674 from yoriswind/codex/actions-library-commands-10706
Add Clear All, Reset, and Replace Actions to the Classic panel
2026-11-15 16:53:01 +01:00
David Mann 1195788a62 Merge pull request #14015 from NaufalDzz/fix/issue-13959
Layers to Files: a layer skipped by Visible Layers Only keeps its number (#13959)
2026-11-15 15:48:44 +01:00
Mex 94140691b7 docs(automation): describe agent bridge challenge authentication
Replace the obsolete PID-check and token-transmission description with the current challenge-proof flow. No runtime code changes.
2026-11-15 15:27:06 +01:00
Mex 223e60df6a fix(automation): ignore relative XDG config directories
Ignore invalid relative XDG_CONFIG_HOME values instead of creating settings under the launch directory. Keep rooted Unix paths and the explicit PhotoCraft override, with focused regression coverage.
2026-11-15 14:19:32 +01:00
yoriswind dc69bb6e1e Merge current main to repair inherited Classic CI failures
Retain the Classic Actions feature unchanged and incorporate official main fixes for workspace write policy, Format persistence, RAW fixtures and SVG resource accounting. No manual merge resolution.
2026-11-15 05:04:53 -08:00
dotCooCoo bc3fe25835 Merge main into fix/rpc-deadline-test-no-clone 2026-11-14 20:09:14 -08:00
Dylan M. Taylor fd105cccc4 Pin hardlink write-over behavior in the workspace (#14833)
* io: assert the embedded-SVG depth boundary is blank

The deepest-chain test treated any Ok raster as an accepted chain. At MAX_EMBEDDED_SVG_DEPTH + 1 the bounded non-strict path intentionally omits the image and returns a transparent canvas, so the test asserted the opposite of the documented behavior. Check that the over-limit image is blank instead.

* automation: pin hardlink write-over behavior

A hardlink inside a granted root shares the inode of its other name, so reads can see that content. Document that a write-over atomically replaces the directory entry inside the root and leaves the other name untouched, with a Unix regression test.
2026-11-14 17:31:37 -05:00
RickiNano 9d80876f70 automation: write guard counts only codecs this build writes
`written_kind` and `holds_image` accepted any format the codec registry
knows, so an existing PCX, XPM, DICOM or HEIF file (by name), or any file
starting with an XPM header, could be replaced although PhotoCraft only
reads those formats. Require the codec's write capability in both.
2026-11-14 09:19:52 +01:00