Commit Graph
291 Commits
Author SHA1 Message Date
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
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
FredApps aee46a2fc6 Merge remote-tracking branch 'origin/main' into fix/10164-final-prune-u2 2026-11-06 17:28:48 +01:00
FredApps c8e4376ec6 Merge pull request #11513 from wanikhawar/claude/investigate-issue-e27e90
Windows: count scratch room when opening large files; refusal names the build's limit
2026-11-06 17:26:22 +01:00
Khawar Zamman Wani 146d49f5a2 PSD write recipes: keep every exported candidate and pin the base file (#11607)
* PSD write recipes: keep every exported candidate and pin the base file

A case that failed after export dropped out of manifest.json, losing the
file a reference-editor check most needs. The CLI also reopened the corpus
path after the hash was taken.

- Keep the candidate and its hash once export succeeds.
- Run the CLI on a copy of the hashed bytes, so it never opens the corpus.
- Compare numbers by value, so 17 equals 17.0.
- tracking-split also checks runs 0 and 2 and all three run lengths.

Part of #6130.

* PSD write recipes: compare large integers exactly, reject case-only id clashes

Converting to f64 made 9007199254740993 equal 9007199254740992. Ids that
differ only by letter case name one output directory on a case-insensitive
filesystem, so they are now rejected as duplicates.

* PSD write recipes: test that the CLI receives the hashed bytes

* PSD write recipes: reject the contour library commands

Their path param can read or write any file, including the pinned base and
the corpus, and they edit no document.
2026-11-06 17:23:40 +01:00
Codex 1bb9f354a9 Reconcile Classic Actions library commands with integration batch 18 2026-11-06 05:36:53 -08:00
Khawar Zamman Wani 1ce1bced95 PSD admission: a little free memory no longer refuses every file
With 1 GiB or less of free RAM, or 512 MiB or less of commit headroom, the
hard limit was exactly 0, so even a small file was refused with a message that
didn't say memory was low.

The reserve now shrinks with the measurement: up to a quarter of free RAM opens
automatically, the rest goes to approval, and an approved import always leaves
at least 256 MiB free. Limits are unchanged for automatic opening above 4/3 GiB
free and for approval from 4 GiB free. A refusal set by measured memory now
gives the free amount and says to close other apps and try again, and the
approval prompt warns when little memory would be left.

An unreadable cgroup still measures Some(0) and stays refused.
2026-11-06 17:03:50 +05:30
Khawar Zamman Wani 349a03b6b1 Refusal text states the lower limit, links the download and shows readable sizes
The 32-bit message ended mid-phrase. It now says the cap applies or less if
less memory is free, and separates the cause from the next step. Windows
scratch tests check the returned numbers belong to the temp directory's volume.
2026-11-06 14:01:03 +05:30
Khawar Zamman Wani 1eb3218a4b Merge remote-tracking branch 'origin/main' into claude/investigate-issue-e27e90 2026-11-06 12:37:29 +05:30
Khawar Zamman Wani 7c2127b6bc PNG import in steps: stream the rows into tiles, turn upright in bands
PngImport decoded the whole image and then copied it into a second, tile surface (about
+400 MB for a 100 MP RGBA8 file, enough to kill a browser tab). A PNG whose rows come in
final order now streams: PngDecodeRows::step_stream hands each group of rows on, they
become tiles at once (the PngStream the one-shot streamed import also uses) and are
dropped, then the prune scan runs in batches. decode_rows is the same step_stream driven
to the end, so there is one path. Interlaced, animated and early-eXIf-oriented files are
decoded whole as before; a late eXIf sends a streamed import back to a whole decode.

The turn upright of an EXIF orientation 2-8 was one whole-buffer pass in the poll of the
last rows; OrientSteps (photocraft-codecs) does it in bands of 64 rows through the same
band writer as Image::oriented, and PngImport runs it as a stage of its own.

Memory-budget errors keep their type and text: the stream is checked as the one-shot
streamed import is, and, like the whole-image path, a layer under 32 MiB is not.
Docs for the stepped place updated.
2026-11-06 09:13:41 +05:30
Khawar Zamman Wani 123b2032c4 Web build: Place runs a slice per frame, so a large PNG no longer freezes the page (#10164, rebased onto main)
The remaining commits of the stack, applied on top of the squash-merged #10147:

- PNG decodes in resumable steps of rows (PngDecodeRows, shared with decode_rows)
- PNG imports as a document in resumable steps (io PngImport, text metadata and
  document build in bounded steps)
- Jobs can run a slice at a time where there are no threads (StepWork,
  cooperative sessions, Session::poll_jobs)
- Place decodes, flattens and resizes in slices (PlaceSteps), reading a path
  and keeping the frame, memory gate and typed memory-budget errors main has
- The web build places dropped and picked files a slice per frame, with a
  bounded place inbox
- A measurement of the stepped place; docs for jobs without threads
2026-11-06 08:51:17 +05:30
David Mann 66c328dc2b Merge commit '9bef3b2dc8b84c1b6cefc8ce0dc2b01d089cd9e8' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-06 02:29:28 +01:00