Commit Graph
593 Commits
Author SHA1 Message Date
autocraft-bot[bot] e13bf04166 Merge pull request #15290 2026-12-01 15:26:27 +00:00
David MannandClaude Opus 5.5 a8f0143b0e fix(automation): keep crops past the canvas working in gated sessions
The canvas-bounds check in `image.crop` and `document.pixel` ran whenever
an automation gate was installed, also on the desktop control channel and
for actions an agent wrote. It refused Reveal All, whose frame is always
larger than the canvas, and every crop that extends the canvas. Remove it.

Headless MCP no longer offers the `ui_*` tools: update the CLI test and the
control protocol doc, and keep the bridge-only hint in the instructions
for sessions that still list them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 16:08:08 +01:00
David MannandClaude Opus 5.5 dfb6eea5db Merge origin/main into fix/layers-to-files-adjustment-13966
Layers to Files moved to engine-core and now walks groups. The adjustment
rule moves into plan_layer_exports: PNG and JPEG export a top-level,
unmasked adjustment like an empty layer; one inside a group (not
measured) keeps the skip, pinned by a new test. PNG names now use dashes
for spaces, so the PNG test expects doc_0000_Levels-1.png.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 14:17:43 +01:00
Dan 59abe3368b Test Quick Export through the menu and clarify filename collisions 2026-11-29 10:14:33 +00:00
David MannandClaude Opus 5.5 2c52a8eba6 Merge storytold/photocraft main (d3b040392) into fix/layers-to-files-groups
The engine moved to crates/engine-core, so the group walk is ported onto
its export.rs and kept together with main's later Layers to Files changes
(Include ICC Profile, dashes in PNG names, the Background-only alert). The
group tests use crate::session() and the PNG dash names. The MCP tool
description no longer says groups export merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 00:37:50 +01:00
Dan ec07994126 Keep single-output Quick Export filename suggestions consistent 2026-11-28 20:59:25 +00:00
RickiNano f27cd5f0b9 Merge main into fix/new-doc-recent-items-14038
Since #15449 File › New is the shared NewDocumentDialog, so the old
app-local Recent heading, grid and tests are dropped in favour of main's
dialog code; that part now goes through storytold/craft-libs#2261.
Kept: document.recent.add and load_recent keep equal settings as
separate entries, now in crates/engine-core.
2026-11-24 20:42:15 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.

The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.

- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
  so caches, the compositor, previews and extents agree; the fill/stroke split
  under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
  drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
  quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
  useAlignedRendering, older align_edges still read) on every shape tool and the
  Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
  rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
  Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
  extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
  two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:02:42 +01:00
superplay2021 47790f5e0d Merge latest main and resolve Align Edges conflicts 2026-11-23 21:25:02 +02:00
David Mann fd28fa6808 Merge PR #15842: fix(automation): reject malformed doc.render requests 2026-11-22 00:28:15 +01:00
David Mann e3696eb67f Merge PR #14743: docs: document DPX bit depth for headless saves 2026-11-22 00:25:03 +01:00
David Mann e0e1ab7de5 Merge PR #14706: docs: describe absolute automation paths within granted roots 2026-11-22 00:24:38 +01:00
superplay2021 e1ba70a49b Merge latest main and fix Align Edges test compilation 2026-11-21 22:31:23 +02: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
superplay2021 31de878f08 Merge latest main and resolve Align Edges conflicts 2026-11-20 04:44:04 +02:00
Mex 9b67220c92 docs(automation): clarify null params for doc.render
Document the tested shorthand for an empty request and the distinction between inline PNG and string output paths.
2026-11-19 22:50:11 +01:00
Mex 6a7c2ccb92 Merge branch 'main' into patch-5 2026-11-18 21:28:05 +01:00
ljkx 5dcb91a891 Control channel: list and cancel every dialog by the id it replies with (#15544)
Since the move onto the craft UI framework, four dialogs could not be
driven by the id the control channel gave for them:

- Keyboard Shortcuts and Menus draws outside the framework's dialog host,
  so ui.inspect never listed it and ui.dialog.cancel {"dialog":
  "shortcuts"} failed, leaving every command refused behind its modal.
  It is now listed under "shortcuts" while open (first: it draws beneath
  the host's dialogs), and ui.dialog.cancel with that id closes it without
  saving, as its Cancel does. ui.dialog.set/confirm/apply refuse it with a
  pointer to edit.keyboardShortcuts params.
- Preferences replied "preferences" but is listed under its host id. It
  now replies with that id, or with the reason it did not open.
- Select > Color Range replied {"dialog": {"Ok": id}}: json! serialised the
  Result. It now replies through dialog_reply like every other dialog, and
  an open that fails is an error instead of ok with {"Err": ...} inside.
- The unsaved-changes prompt was listed under a number with only
  `choice`. It is listed as "discard" again with the documented command,
  document, remaining, choices and default, and ui.dialog.confirm/cancel
  resolve "discard" to it (docs/control-protocol.md, #4920).

Tests drive each through the control channel (handle with a
ControlRequest). Two existing tests change with the documented ids: the
Preferences apply test asserted the old "preferences" reply, and the
save-authorization helper fed the listed prompt id to the host lookup.
docs/control-protocol.md now says which dialogs have fixed ids and what
menu items reply.
2026-11-18 18:58:04 +01:00
superplay2021 c59d037160 Merge latest main and port Align Edges to craft UI 2026-11-17 19:31:57 +02: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
Hector Villarreal 5fc50313ee Layers to Files: one file per layer inside a group, none for the group (#13957)
Groups are walked: each layer in a group gets <prefix>_<group index>s_
<index>_<name>, repeated per level, art layers and groups counted
separately at each level. A group gets no file; a layer's file keeps it
inside its groups. With visibleOnly, a hidden group's layers are skipped
and reported; without it they are exported. Nesting is bounded.
2026-11-15 16:00:15 -06:00
Trevor BrownandClaude Sonnet 5.5 a80202557c Merge storytold/photocraft main (d547d50c7) into fix/layers-to-files-adjustment-13966
Conflicted in file_cmds/export.rs and three layers-to-files tests: numbering is main's panel-order enumerate, and the branch's rule that an adjustment layer exports for png/jpg/jpeg is kept. Test setups are Hidden(0), Levels(1), Background(2), so the expected files are 0001_Levels and 0002_Background.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-15 16:35:58 -05:00
David Mann c2ef3cbf81 Merge main into fix/new-doc-recent-items-14038 2026-11-15 20:50:29 +01:00
Mex 453bb4ac92 Merge branch 'storytold:main' into patch-17 2026-11-15 20:43:28 +01:00
superplay2021 85e9cd525e Merge latest main and resolve artboard test conflict 2026-11-15 21:07:26 +02:00
Mex efb349e838 docs: clarify screenshot paths within the write grant
Document the same scoped absolute paths accepted by the screenshot writer and the other automation file operations.
2026-11-15 18:11:59 +01: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
RickiNano 6228b5cf47 New Document: Recent tab lists Your Recent Items, 4 per row, duplicates kept (#14038)
The Recent tab of File > New is headed "YOUR RECENT ITEMS (n)" while it
lists recent documents, shows them 4 cards per row, and no longer appends
the built-in defaults after them. document.recent.add and the preferences
reload keep equal entries, so two documents created alike give two cards
(still capped at 20). With no recent items the tab keeps today's defaults,
heading and 3-column grid. A size line wider than its narrower card breaks
before "@" onto a second row.
2026-11-15 14:39:13 +01:00
RickiNano 07cdcca77a New Document: save a preset from an icon right of Name (#14043)
The Save Preset… button under Preset Details is gone. An icon right of
the Name field turns the pane into SAVE DOCUMENT PRESET, proposing the
next free "Saved N" with its text selected, with Save Preset / Cancel.
Cancel returns to Preset Details without saving.
2026-11-15 14:39:13 +01:00
Mex 08551d5eb3 docs: document DPX bit depth for headless saves 2026-11-14 19:28:51 +01:00
superplay2021 528fb9abb2 Fix aligned dash phase and clarify rendering limits 2026-11-14 15:35:30 +02:00
superplay2021 3db0c99fe5 Merge main and fix Align Edges integration 2026-11-14 14:08:31 +02:00
yoriswind 2b3aa8de44 Merge main into Classic Actions library commands 2026-11-13 21:27:41 -08:00
Trevor BrownandClaude Opus 5.5 ded27776e7 Layers to Files: other formats still skip an adjustment layer (#13966)
Only PNG and JPEG were measured; the issue keeps today's behaviour for the other formats (PSD, TIFF, BMP, Targa, PDF), so the skip with "adjustment layer has no pixels of its own" stays for them, the layer keeping its number. New test other_formats_still_skip_the_adjustment_and_keep_its_number (PSD). docs/control-protocol.md says which formats skip it (CodeRabbit on #14041).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 19:51:11 -05:00
Trevor BrownandClaude Opus 5.5 a5c67cea7b Merge upstream/main into fix/layers-to-files-adjustment-13966 (re-run the gate after the type options bar flake, #13408)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 16:52:52 -05:00
Gabriel Heuser 239a1c49c9 Merge branch 'main' into fix-pixel-aligned-shape-strokes 2026-11-13 23:31:44 +02:00
Trevor BrownandClaude Sonnet 5.5 a62036a919 Layers to Files: an adjustment layer gets its own file, like an empty layer (#13966)
export_layers_report_with no longer skips an adjustment layer. It is numbered in panel order and exported like an empty layer: a fully transparent full-canvas PNG with Trim on, a white full-canvas JPEG. A hidden one with visibleOnly is still skipped. Tests that pinned the old skip are updated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-13 16:12:28 -05:00
Cristi RaduandClaude Opus 5.5 e248c7288b Control protocol: sampleColor matches the Eyedropper only with its size and sample too
Answers CodeRabbit on #13533: size defaults to Point Sample and sampleLayer to all,
so the zoom alone doesn't reproduce a 3 by 3 Average.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 20:08:13 +02:00
Cristi RaduandClaude Opus 5.5 8b4460a7ac Control protocol: give sampleColor's zoomed box rounding, position and clipping
Answers CodeRabbit on #13533: the side is (N+1)/zoom rounded, the box starts
ceil(side/2)-1 pixels before the sampled pixel, and it is clipped to the canvas,
as sample_rect_at does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 20:08:13 +02:00
Cristi RaduandClaude Opus 5.5 dd6256238f Control protocol: document zoom of document.sampleColor (#13053)
The command's params text already describes `zoom`; the protocol doc listed only
x, y, size and sampleLayer, so an agent following it got the centred square
instead of the Eyedropper's zoom-dependent box (4 x 4 for a 3 by 3 Average at
100 %).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 20:08:13 +02:00
David Mann de93ee2d38 Merge pull request #13396 from davidmann4/integration-mcp
Integration batch MCP: agents in the open PhotoCraft window, one switch in the ArtCraft Launcher (#11363, #5525)
2026-11-13 17:41:24 +01:00
David MannandClaude Opus 5.5 309fdf1cde Address CodeRabbit review: document per-direction root overrides
In closed-app headless MCP mode, a given --automation-read-root or
--automation-write-root replaces the app's agent folder for that
direction only. Say so in control-protocol.md and mcp.md, and pin it
with a test for each direction.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 14:19:38 +01:00
David MannandClaude Opus 5.5 28c3a53367 docs(mcp): the open-window entry names the closed-app choice
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 13:29:57 +01:00
David MannandClaude Opus 5.5 94082119f1 docs(mcp): say when plain mcp is headless and that --headless always is
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 13:17:58 +01:00
David MannandClaude Opus 5.5 19f040a6ae docs(mcp): plain mcp uses the open window only with the AI-MCP flag
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 12:36:40 +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 <[email protected]>
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 <[email protected]>
2026-11-12 23:41:14 +01:00
David MannandClaude Opus 5.5 d0f01a515e The ArtCraft Launcher's agents switch lets agents in
Turning on ArtCraft Launcher > Settings > AI agents is the person's consent
for every Craft app (craft-ai-integrations#195). While the AI-MCP flag is on
and the launcher's app list (ArtCraft/mcp/apps.json) names photocraft,
PhotoCraft accepts agents as if Let AI agents connect were ticked: the
desktop app watches those files every 2 s and starts or stops the
connection, and `mcp --live` checks them before every call. The page shows
the box ticked and says the launcher turned it on; PhotoCraft's own choice
is kept. Allow Agent Control off still refuses agents.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 20:02:54 +01: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 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 <[email protected]>
2026-11-12 02:56:45 +01:00