Commit Graph
301 Commits
Author SHA1 Message Date
aiongg 3e05a3747b Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	.github/workflows/ci.yml
2026-11-22 15:29:46 +00:00
aiongg 44ac69dede Merge upstream/main into ci-pin-toolchain; gate runs when platforms fails, cold cache clear keeps newer entries, panic_hunt timeout 2026-11-22 05:59:39 +00:00
David Mann 6be13ed47a Merge PR #15216: docs: use the full shortcut snapshot test path 2026-11-22 00:27:00 +01:00
David MannandClaude Opus 5.5 97b587ad57 Batch: PHOTOCRAFT_NO_PRINT docs say an empty value counts as unset (#16024 review)
printing_disabled() ignores an empty PHOTOCRAFT_NO_PRINT, so the docs'
"anything but 0" was wrong for the empty value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 19:01:43 +01:00
David Mann 8e739f462e Merge PR #16024: engine: file.print.page asks no printer driver while printing is disabled 2026-11-21 19:01:43 +01:00
FredAppsandClaude Opus 5.5 f996f2fc93 engine: file.print.page asks no printer driver while printing is disabled
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 <noreply@anthropic.com>
2026-11-20 22:29:14 +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 <noreply@anthropic.com>
2026-11-20 15:23:05 +01:00
aiongg 5351576daf tests: the corpus tests take a fixed sample per directory; the nightly run sweeps every file
The real-file corpus tests the Linux gate runs took up to 394 s each (the psd-tools mutation
sweep), 780 test-s together. Each now walks a fixed sample chosen for coverage (photocraft-testkit
`corpus`: every colour mode and depth, PSD and PSB, the block kinds outside the large files, each
oracle kind, smart objects, vector blocks, type) and stays under a second. PHOTOCRAFT_FULL_SWEEP=1,
the switch the testkit sweeps already read, takes every file; the nightly run sets it.

- Oracles keep floors for the sample next to the full floors.
- The mutation sweep cuts and corrupts each sampled file 12 times instead of 31.
- The layered TIFF test takes the psd-tools sample.
- The smart-object test imports only files with a placed-layer block (full sweep: 32 s to 5 s).
- The blend-mode tests import once and render only the compared cells.
- The 16.8 MP spot-channel file runs in full sweeps only; the generated files check the same reading.
- The #1606 special-shapes test is the affinity table's row for that file plus its warning check.

Part of #15711
2026-11-20 07:23:46 +00:00
aiongg 5612b2dfd4 ci: pin the toolchain in rust-toolchain.toml
The file is the one source: the jobs install what it names through
craft-common-actions' rust-channel action, and the nightly run opens a pull
request that changes only the file when a newer stable exists.

Part of #15711
2026-11-20 04:14:10 +00:00
aiongg c9746558d7 ci: build the tests once per OS, keep compiled workspace crates, balance the shards
- Both gate calls build the tests once into a nextest archive (cargo xtask ci archive); the
  shards run it, and the build job runs the doctests after the upload.
- The Linux gate keeps the compiled workspace crates in a rolling cache entry
  (cache-workspace-crates). A nightly cold build is its safety net; gate-cache-prune keeps the
  newest entry. test (without heif) restores that entry.
- The shards split the tests with nextest's slice partition, which spreads the slow modules:
  on one main run's times the non-GPU shards go from 728/493/523 s (hash) to about 602/506/625 s.

Fixes #15702
2026-11-19 08:06:05 +00:00
aiongg ec40c48cc2 ci: build the tests once per OS and run the shards from a nextest archive 2026-11-19 06:34:17 +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
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 eee31b0d11 CI: shards build their own tests instead of running from an archive
The gate's archive of ~98 test binaries would be 10-18 GB compressed, so
every shard restores the dependency cache, builds the tests and runs its
partition (scripts/ci-test-shard.sh). `cargo xtask ci tests` runs the test
steps on $NEXTEST_PARTITION, `ci build` builds exactly what a shard builds
(main's cache warm-up), and `ci doctest` runs in one shard. The `ci archive`
part, the archive's xtask binary and the extraction are gone.

The Linux GPU shard keeps the gpu group alone on lavapipe; shards 2-4 split
the rest. Windows uses six shards: ~55 min of tests on one runner, and its
slowest test alone takes ~9.6 min, so a seventh would not shorten the
slowest shard.
2026-11-18 19:09:59 +00:00
aiongg 0e3523cdcd CI: shard the Linux and Windows tests, lint leg, xtask environment fix, rust-cache v2.9.3
- xtask starts every cargo without the variables `cargo run` sets for xtask
  (CARGO_MANIFEST_DIR, CARGO_PKG_*, ...), so a build script that declares
  `rerun-if-env-changed` for them (ring) no longer reruns, with the whole
  craft facade above it, between builds inside and outside xtask.
- `cargo xtask ci` splits into the gate's parts without a second step list:
  `lint` (fmt, egui-fork, clippy, layers, panel-commands, scorecard, wasm,
  i18n report), `archive` (test build into the nextest archive, doctests),
  `tests --from <dir>` (test and panic_hunt from the extracted archive, on
  $NEXTEST_PARTITION; --gpu / --no-gpu select by the gpu test group) and
  `build` (cache warm-up). Plain `cargo xtask ci` still runs every step.
  PHOTOCRAFT_CI_EXCLUDE leaves packages out of the test build and doctests.
- The `ci` nextest profile's archive carries the xtask binary, so a shard
  builds nothing (scripts/ci-test-shard.sh).
- Linux gate: lint leg, one build, four shards. Shard 1 runs the gpu group
  alone on lavapipe and checks its output (scripts/ci-gpu-lavapipe.py now
  wraps that run); the second GPU run and its rebuild are gone.
- Windows unit, integration, clippy and warm legs move onto the shared gate
  (Windows runner, lint leg for Clippy, four shards), keeping the PR
  selection from the platforms job, rust-lld, /OPT:NOICF, /DEBUG:NONE and
  the D:\t target dir.
- The slowest-tests-first priorities apply on Linux too.
- Swatinem/rust-cache v2.9.3 by commit for this repository's own cache
  steps, with fresh keys; cache-version v2 for the gate and docs entries.
  `test (without heif)` restores the gate's entry through the shared action.
  Dispatch-only jobs no longer save caches no pull request reads; the quick
  perf suite restores perf-nightly's entry.
- windows_delay_loads reads the app from NEXTEST_BIN_EXE_photocraft, as the
  other app tests do, since archives relocate binaries.
2026-11-18 19:04:43 +00: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
Mex fd62490d0d docs: use the full shortcut snapshot test path
Include the enclosing prefs module in the exact libtest filter so the documented command selects the GPU snapshot test.
2026-11-15 21:08:00 +01:00
yoriswind 2b3aa8de44 Merge main into Classic Actions library commands 2026-11-13 21:27:41 -08:00
Dylan M. Taylor 040962a5b4 Merge photo-cms-port: use craft-cms and remove crates/cms (#13393) 2026-11-14 00:02:22 +00:00
David MannandClaude Opus 5.5 dbd2cd1628 fix(mcp): plain mcp stays headless without the AI-MCP flag; integrations read leniently
- Without the AI-MCP flag plain `photocraft-cli mcp` is headless as before: a
  Control Port saved before the agents switch no longer makes it look for the
  app, start it or apply When PhotoCraft Is Closed. Test in
  mcp_without_consent_works_headless (fails without the gate).
- `prefs::read_integrations_section` (migrate + lenient read) is shared by the
  app's launch read and `photocraft-cli mcp`: one bad value resets only itself,
  so a saved "error" closed-app choice no longer falls back to Launch in the CLI.
  Replaces the app's hand-written per-field reader. Test in
  integrations_come_from_the_saved_preferences_or_default (fails without it).
- docs/development.md: the headless client examples pass --headless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:36:22 +01:00
David MannandClaude Opus 5.5 fcbc0a69f8 docs: tests and agents run mcp --headless
Plain `photocraft-cli mcp` now works in the open window while the ArtCraft
Launcher's agents switch is on, and may start PhotoCraft, also on a
developer's machine. AGENTS.md says scripts, tests and agent sessions pass
`--headless` (and tests give the CLI their own settings, launcher and flags
folders); the headless examples in docs/development.md, docs/mcp.md,
docs/control-protocol.md, the book and the README use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:55:27 +01:00
David MannandClaude Opus 5.5 fd626999fc One switch for agents, in the ArtCraft Launcher; plain mcp works in the open app
As agreed in craft-ai-integrations#195: one switch for every Craft app, in
the launcher; only the launcher writes MCP client configurations; plain
`<app>-cli mcp` works in the open app.

- Consent: with the AI-MCP flag, the launcher's switch alone decides,
  read through `craft-ai-agents` (craft-ai-integrations#197), the crate the
  launcher writes the app list with and the gateway reads it with. The
  "Let AI agents connect" box is gone; without the flag everything is as on
  main (a saved Control Port keeps its connection).
- `photocraft-cli mcp`: works in the open window while agents may use it
  (what `--live` did), and headless otherwise, exactly as before (only the
  roots given to it; the app is never started). `--headless` forces that;
  `--bridge` / PHOTOCRAFT_CONTROL_PORT as before. `--live` and `mcp install`
  are gone. Several read roots work again, invalid roots stop the start, and
  `--gpu` applies to the headless session.
- Client setup is the launcher's: the client code (Claude Desktop, Claude
  Code, Cursor, JSON), Copy Configuration, its service and its docs are
  removed (about 740 lines net).
- CLI tests run with their own settings, launcher and flags folders: plain
  `mcp` would otherwise find (or start) the developer's own PhotoCraft.
- Docs, book, README, scorecard row, packaging comments follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:41:14 +01:00
yoriswind 7ddbfaa474 Merge current main into Classic Actions commands
Resolve public occurrence identity and main playback budgets, nested Batch context and Pen history together. Migrate the deleted local parser to main shared API while preserving public legacy-suffix refusal. No unpublished behavior fixes or local gate runs.
2026-11-12 11:39:06 -08:00
David Mann 09ad48fcee Keep the page named AI Integrations, not MCP
The Integrations page holds more than the agent connection: open PRs add the
AI services for Generative Fill and other AI features to it (#10903, #12391,
#7007). The menu item stays "AI Integrations…" and the page "Integrations", as
on main; messages and docs say Edit › Preferences › AI Integrations.
2026-11-12 15:38:51 +01:00
David Mann a16144256f Merge main into integration-mcp
# Conflicts:
#	docs/scorecard.md
2026-11-12 13:51:25 +01:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
David MannandClaude Opus 5.5 cd41d63394 Batch: Preferences page is "MCP"; Copy Prompt for an Agent
The page only holds the MCP connection, so Edit › Preferences › AI Integrations… is now
Edit › Preferences › MCP… (command id and the `integrations` preference keys unchanged).

Copy Prompt for an Agent puts a text on the clipboard that an agent with a terminal
(Claude Code, Codex, Cursor's agent) pastes to register `photocraft-cli mcp --live` itself
and check the connection; Claude Desktop has no terminal and keeps Add to Claude Desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 02:56:45 +01:00
7444ab6c03 Merge PR #5525: AI Integrations: connect Claude Desktop, Claude Code and Cursor to PhotoCraft without a terminal
Ported onto current main and #11363:
- The dialog moved into prefs/prefs_ui/agents.rs (prefs_ui.rs was split on main); the port
  field is labelled for the accessibility check.
- One agent connection: Preferences start and stop it live (agent_link service); only
  --control opens a port at launch. #11363's token reuse, folder rules (absolute paths,
  warnings) and readRoot/writeRoot names are kept; a saved controlPort from before loads
  with connectAgents on.
- agent_link.rs: #11363's connection file code plus #5525's client install code.
- CLI: mcp --live, --when-closed and mcp install --client on main's clap parser.
- control_server: listen()/Listening on top of main's challenge authentication.
- app_dirs: main's resolver moved to photocraft-automation so the CLI finds the same folder.
- Interface catalogs moved to craft-i18n on main; the PR's rows are not carried over.

Co-Authored-By: Furoxfufu <Furoxfufu@users.noreply.github.com>
Co-Authored-By: ingling <ingling@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 02:26:09 +01:00
Dylan M. Taylor 2b75a0092d Use craft-cms from craft-libs; remove crates/cms
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.

craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.

The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
2026-11-11 19:41:51 +00:00
yoriswind 4f771973cb Merge readonly dialog guards and verify Batch control protection 2026-11-10 23:45:14 -08:00
Tanish Manku e301a1d835 Merge pull request #11106 from pkubaj/main
Enable winit's font-free Adwaita decorations on FreeBSD
2026-11-11 00:27:28 -07:00
Tanish Manku e12da4d048 Merge pull request #10720 from dark13b/fix/issue-10492
Drops: route by a pure function, say when a folder is dropped, log how far a drag got (#10492)
2026-11-11 00:23:15 -07:00
yoriswind 3652985b4e Merge automation action gates with Classic identities and current shortcut test API 2026-11-10 23:13:37 -08:00
skylar taylor-barrick 1f77e59589 Merge origin/main (2772ac1e7) into craft-i18n cutover
Keep all 34 catalog deletions; sync crop options and fill rasterization text via craft-i18n 4a642c06dbcb8172f307f827c1167cd5dd8ac341. Adapt the fill prompt catalog test to embedded catalogs and preserve both parity-document updates.
2026-11-10 20:16:09 -06:00
yoriswind d70af7a6f9 Merge current main into Classic review repair 2026-11-10 15:59:40 -08:00
ec97a146f5 Support ordered automation read roots with safe save provenance (#3023)
* fix(cli): reject repeated automation read roots

* feat(automation): add ordered read roots with isolated saves

Stage source and regression tests for GGEO-AI02 validation before updating PR #3023. Repeated reads accumulate; writes remain single-root and implicit saves retain their selected capability provenance.

* style: format multi-root automation extension

* test: use fixed pixel chunks in read-root regression

* docs: reconcile control protocol with upstream TGA options

* docs: state multi-root capabilities directly in API summaries

* test: construct regression actions through upstream defaults

* Clarify headless and desktop directory automation reads

* Format the shared root parser and relocated service regressions

* test: adapt automation import callback to ImportOptions

* test: expect read-root diagnostic for denied smart-object input

* test: reject repeated write roots while allowing ordered read roots

* test: assert explicit empty-root parser diagnostic

* test: exercise leaf-link save using a supported image filename

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
2026-11-10 14:28:12 +01:00
Hasan-Zayni 3f5728c804 Merge main into drop routing 2026-11-08 22:29:10 +03:00
Martin BallandClaude Opus 5.5 9dd39df78d feat(i18n): look up translations through the craft-i18n crate
The i18n module becomes a thin Lang wrapper over craft_i18n::I18n and the
catalogs embedded from craft-i18n. Plurals use trn_plain and PhotoCraft
keeps its own fmt; @id rows come only from PhotoCraft's own rows that keep
the label's shape. Detection, PHOTOCRAFT_LOCALE, tag bounds and the 35
offered languages are unchanged.

Serbian: sr, sr-RS, sr-Cyrl-RS and sr-ME reach sr-latn, the only Serbian
catalog, and a saved interface.language "sr" migrates to "sr-latn".

The menu completeness test becomes a report that never fails, and
`cargo xtask i18n-coverage` is replaced by `cargo xtask i18n-report`, which
reads CRAFT_I18N_DIR through the crate. Docs describe the new system.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:16:46 +00:00
yoriswind fd8b0868dc Reconcile Classic Actions with current main 2026-11-08 04:24:24 -08:00
Piotr KubajandClaude Fable 5.1 d01e585cfc Enable winit's font-free Adwaita decorations on FreeBSD
The System Title Bar preference hands the frame to winit. On Wayland
compositors without server-side decorations (GNOME) winit draws the
decorations itself: the font-free Adwaita controls when its
wayland-csd-adwaita-notitle feature is on, sctk's plain fallback frame
otherwise. The winit dependency that turns the feature on sits in the
Linux-only block of the app manifest, so the FreeBSD build gets winit
through eframe alone and ends up with the fallback frame. The default
integrated title bar is not affected.

Add the same winit line for FreeBSD with just the decoration feature (the
x11 one serves the Xwayland pen path, which is Linux-only). sctk-adwaita and
its dependencies are already in Cargo.lock through winit, so the lockfile
does not change and sctk-adwaita is the only crate that joins the FreeBSD
dependency graph; the Linux, Windows and macOS graphs are unchanged. Name
FreeBSD in the NOTICE attribution and the development notes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-08 11:25:09 +01:00
517d0a9eea Merge origin/main into #9887 (Indexed Color Matte)
Keeps main's Fade preview path in filter_preview.rs and passes the PR's
tool colours to the non-Fade preview; catalogs keep both sides' rows.

Co-Authored-By: Firstbober <firstbober@tutanota.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 03:23:31 +01:00
David Mann 017c4aab9e Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-06 22:57:46 +01:00
Firstbober 7f96ce5343 Preserve Indexed profiles and preview current tool colors 2026-11-06 19:26:52 +01:00
Firstbober 2fbec8b533 fix: preserve document colours for indexed mattes 2026-11-06 19:14:59 +01:00
Firstbober b57ec9f729 fix: preserve indexed matte when picker is canceled 2026-11-06 19:14:59 +01:00
Firstbober 3a7a0aaa1e feat: add Indexed Color matte control 2026-11-06 19:14:58 +01:00
2ff8f419cb ci: run the GPU tests on lavapipe on Linux and fail if they skip (#7975)
The Linux runner has no GPU, so the GPU tests ran on Mesa llvmpipe over
GL, which can't render Rgba32Float: 57 GPU checks (50 GPU parity, 3
canvas, 2 adjustment preview parity, 2 effect-map recovery) returned
early and passed without comparing anything. A new step after Test
installs mesa-vulkan-drivers and runs the nextest `gpu` group on
lavapipe (Vulkan), reusing Test's build, and fails unless the parity
tests report the Vulkan backend and no test printed a skip.

No code change: photocraft's tests take whatever adapter wgpu returns,
software adapters included. Follows the CI half of lightcraft#1148.

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 18:44:13 +01:00
FredApps d2ce418bb3 Merge pull request #11641 from wanikhawar/claude/agitated-jones-8e1a8e
A little free memory no longer refuses every PSD; the refusal says what to do
2026-11-06 18:36:17 +01:00
FredApps d41e29a24f fix(ui): identify the active scratch directory in warnings 2026-11-06 17:51:33 +01:00
FredApps 8d2ee0787f Merge scratch query updates into memory admission policy 2026-11-06 17:29:23 +01:00