806 Commits
Author SHA1 Message Date
David Mann 3e3831ab41 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-25 02:29:05 +01:00
David Mann 0aaf8ecfba Merge #15421 into the merge queue batch
Tests: wait for the other thread's state instead of a fixed sleep (#15379)
2026-11-25 00:57:21 +01:00
aiongg 135a6b342f Move craft-libs to next
Pin craft-libs to the rc-integration branch and egui to the AccessKit-per-viewport branch, and follow the framework's API changes: swatch paints and the Registration kind, save answers as Picked::Saved, the Save for Web colour table as host-held shifts, Done in Save for Web, colour requests through StackDialog, zoom schemes, wheel schemes, glyph cells, face paints, preset selections, the print destination, and the command palette's search index.
2026-11-24 05:46:22 +00:00
skylar taylor-barrick 88b71cb141 Add the Apple-silicon Nightly build (#16559)
* Finish the Nightly session in the app's exit hook

On macOS every quit (Cmd+Q, the close button, File > Quit, app.quit) leaves
through craft::quit, which sends -[NSApplication terminate:]. winit's
applicationWillTerminate: delivers LoopExiting, eframe runs the app's
on_exit, and AppKit then ends the process, so eframe::run_native never
returns there and the controlled-return code after it (the Nightly
session finish) never ran: every Mac Nightly start reported the previous
session as unclean.

Services gets an at_exit hook that on_exit runs once, last. The desktop
app finishes the shared Nightly session there, and again after run_native
for the paths that create no window (renderer failure), where the second
call is a no-op.

* Add the Apple-silicon Nightly build, signing and verification scripts

packaging/macos/nightly.sh compiles the GUI-only PhotoCraft Nightly.app
for aarch64 with no signing material (it refuses any) and writes the
unsigned photocraft-<version>-macos-aarch64-nightly.zip: the nightly-common
source and identity checks, nightly_plist.py's Info.plist, the Nightly icon
and notices, no CLI, DMG or document types, zipped without xattrs. It no
longer runs the bundle before signing.

packaging/macos/nightly-sign.sh is the trusted step the shared signer calls
(--arch aarch64 --input <unsigned zip> --output <final zip>). It requires
all six release secrets, imports the Developer ID with import-cert.sh into
a private keychain it deletes on exit, signs inside-out with the hardened
runtime, timestamp and entitlements, notarizes with notarytool, staples the
ticket into the bundle, and checks the final archive as the Launcher
unpacks it (signature, team, ticket, Gatekeeper) before writing it without
replacing anything. It never compiles or runs the payload.

packaging/macos/nightly-verify.sh runs in a job without secrets (it refuses
any): the same archive checks, then the bundle's --version with an empty
environment, for the signed feed artifact or the unsigned compile output.

nightly-common.sh splits the compile from the version query; Linux keeps
both. The new suite runs the scripts against stand-in Apple tools.

* Build the unsigned macOS Nightly in pull-request CI

A hosted macos-15 job, with no secrets or environment, builds the
aarch64 Nightly bundle with packaging/macos/nightly.sh when a pull
request changes the Mac Nightly packaging or flavor, and checks it with
nightly-verify.sh --expect unsigned, including the bundle's version.

* Cap the failure-only notarization log in nightly-sign.sh

The shared signer bounds a step's output at 256 KiB; notarytool's log on a
rejected submission is the one large output, now cut at 128 KiB.

* Address review: macOS-only exit hook, clean-tree recheck, wider refusals

- The Nightly exit hook is installed only on macOS; Linux and Windows keep
  finishing the session after run_native returns.
- nightly_build_gui checks the tree is still clean after --version (Linux).
- nightly_refuse_signing_env also refuses the Windows, Azure and Linux
  signing names release.yml passes.
- nightly-sign.sh drops the single spctl run before the retried final check.
- nightly-macos.yml also runs for Cargo.toml, Cargo.lock and the text and
  ui-egui build scripts.

* List the macOS Nightly signing tests as tests for Sonar

packaging/macos/nightly_sign_tests.py is a fixture runner like the other
nightly suites; without this Sonar counts it as production code.

* Run the macOS Nightly PR build only with the full-ci label

macOS runners are shared with release builds: no path filters, and a pull
request runs the job only when it carries full-ci (a labeled event only
when the added label is full-ci). ci.yml's concurrency pattern keeps other
labels from running or cancelling a run. workflow_dispatch stays.

* Keep the unsigned macOS Nightly archive as a short-lived artifact

Seven-day retention, unsigned zip only, no secrets. It lets keyless signer tests and hand
testing use the exact verified build.

* Keep unlabelled events out of the macOS build's concurrency group

A push to a full-ci PR and the label event arrive together; the event that would be skipped
was sharing the group and cancelling the real build.

* Stop the macOS Nightly scripts' --help at their header comment

* Answer the Launcher's profile-form version query before startup (#16559)

`PhotoCraft --launch-profile nightly-v1 --profile-root <dir> --version`,
the shared producer's smoke, was refused by the strict launch-profile
parser (no `--`), and the refusal opens a native dialog on macOS, which
never returns on a headless runner: the hosted run did not exit in 180 s.

A Nightly build now treats exactly the selector/root pair followed by
`--version` or `-V` as a version query: the same line as plain
`--version`, exit 0, before root validation, process identity, IPC or any
window. Only parse()'s lexical checks apply; every other refusal is
unchanged and `-- --version` stays a file name.

nightly-verify.sh checks both forms, each within 15 seconds and with
nothing on standard error, so the PR's Mac build covers the smoke.

* Harden the Mac Nightly signing helpers (review of #16559)

- nightly_publish_archive runs python3 -I: nightly-sign.sh calls it with
  the signing secrets loaded, so no module from the working directory or
  user site may be imported.
- nightly-sign.sh and nightly-verify.sh list the archive's entries before
  unpacking (python3 -I, zipfile) and refuse absolute paths, `..`, empty
  or backslash components, entries outside PhotoCraft Nightly.app, links
  and special files. The check after unpacking stays.
- The signature check matches the Identifier line literally (grep -F).
2026-11-23 17:28:21 -06:00
FredApps 947c677c9f Merge branch 'main' into nightly/windows-flavor 2026-11-23 16:58:09 +01:00
skylartaylor c0dd6c81a5 Check the Windows Nightly source identity and widen the profile fences
nightly.ps1 now enforces what the Linux helper does: an exact 40-hex commit, a
version naming that commit, the original run date, and a clean checkout of it
before and after the build. package.ps1 no longer defaults those for Nightly.

The profile root also refuses the default MSI install folders, folders under a
portable copy and the stable Flatpak data folder, and every existing entry in
the profile must resolve inside it. An empty build channel means stable.
2026-11-23 15:32:44 +01:00
skylartaylor 5cd4bc3d1c Merge main into nightly/windows-flavor (picks up #16483) 2026-11-23 05:57:20 +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 cf80a283f2 Engine split step 6: cargo fmt 2026-11-23 03:28:48 +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
skylartaylor 3f28d14411 Keep an unshown Nightly interruption notice across a failed start
If the previous session was interrupted and renderer initialization fails before
the window opens, the controlled return no longer clears the session record, so
the CPU retry (or the next start) still shows the notice. A session that showed
it clears the record as before.
2026-11-23 03:16:43 +01:00
ljkx a306a440cf Merge remote-tracking branch 'origin/main' into tests-condition-waits
# Conflicts:
#	crates/ui-egui/tests/it/gpu_device_loss.rs
2026-11-23 03:05:29 +01:00
David Mann c870f51d5d Merge pull request #16416 from davidmann4/fix/floating-document-window-title-bar
A floating document window gets a title bar (#16415)
2026-11-22 23:56:45 +01:00
aiongg 75cbe5c4eb Merge remote-tracking branch 'upstream/main' into set-d-pin
# Conflicts:
#	crates/engine/Cargo.toml
2026-11-22 21:49:29 +00:00
David MannandClaude Opus 5.5 3c2089df94 Floating document windows: review fixes (#16415)
- Close in a floating window closes its document through the guarded
  close (a document with unsaved changes asks first, the window stays
  meanwhile), as in the reference application; a New Window for Document
  view still only closes itself.
- The placed rect is the outer origin with the inner size: the framework
  applies its size as the inner size, so a decorated window (system title
  bar) grew by its frame every pass.
- The floating status bar's zoom edit uses the window's own scale.
- The Home screen and the batch preview clear the dock target.
- The OS-move release reads the mapped primary button (swapped buttons).
- The window tests use a fixed app-drawn frame, whatever the OS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 21:42:04 +01:00
aiongg 519a0c22a3 Engine split step 3: top crate with the wrapper Session
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).

The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.

Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.

Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.

Part of #15710
2026-11-22 19:29:06 +00:00
David MannandClaude Opus 5.5 e617469fc4 Dock a floating document window the OS moved by its title bar onto the tabs (#16415)
On Windows the app-drawn frame's hit test hands the title bar to the OS,
which runs the move: the app sees neither the press nor the release. A
new primary_down service (GetAsyncKeyState) tells when the button goes
up; a window that moved and ends with the OS pointer on its bar over the
main window's tab strip docks. The drop target is the tab strip, or a
tab-high band at the top of the document area where no strip shows; the
app looks again every 50 ms while such a move lasts and repaints after
docking, so the OS window closes at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 19:15:09 +01:00
skylartaylor dce2f89062 Keep Nightly profiles isolated and startup resilient 2026-11-22 17:09:59 +01:00
aiongg 85a201b7fb Pin craft-libs next 315a223e69: native window to the runtime, font picker tests
embed::before_ui takes the native window, so on Windows the runtime answers the
window's hit test and resize starts at the press (craft-libs#2995). It also fits
a window bigger than its display once, which replaces work_area::fit_window.
Adds the font picker tests for craft-libs#3010: typed keys stay in the search,
and hover previews without a history step.
2026-11-22 15:38:16 +00:00
David Mann 7c105d873d Revert "Merge PR #14699: web: allow browser zoom on both host pages"
This reverts commit 66fcded472, reversing
changes made to fbe6b1e594.
2026-11-22 12:23:00 +01:00
David Mann 125955f0aa Merge PR #16302: fix(batch): protect the actions file from the error log 2026-11-22 00:28:56 +01:00
David Mann 4a62988dba Merge PR #16260: CLI: accept a UTF-8 BOM in recorded action files 2026-11-22 00:28:36 +01:00
David Mann 5b185b55f7 Merge PR #15832: docs(cli): list doc.replaceSmartObject in serve help 2026-11-22 00:28:02 +01:00
David Mann eff05c3042 Merge PR #15829: fix(cli): discover GIMP XCF inputs in batch folders 2026-11-22 00:27:55 +01:00
David Mann 6a89476bde Merge PR #15153: fix(logging): preserve logs with an unknown lock state 2026-11-22 00:25:57 +01:00
David Mann 04c06d15c7 Merge PR #15136: fix(linux): honor loader separators in library preflight 2026-11-22 00:25:34 +01:00
David Mann 8bb17b4850 Merge PR #15132: fix(web): distinguish unreachable requests from Wasm traps 2026-11-22 00:25:30 +01:00
David Mann 5744b2547f Merge PR #14726: fix(web): explain when JavaScript is disabled 2026-11-22 00:24:53 +01:00
David Mann 66fcded472 Merge PR #14699: web: allow browser zoom on both host pages 2026-11-22 00:24:23 +01:00
skylartaylor a71b1c5c33 Assert the Stable workspace configured folder spelling 2026-11-21 23:51:50 +01:00
skylartaylor e5f81d3977 Return a typed error from nightly process identity setup 2026-11-21 23:25:39 +01:00
Mex bd6f4055f5 test: cover equivalent actions and error-log paths 2026-11-21 20:28:53 +01:00
Mex eb790f5b82 fix(batch): protect the actions file from the error log 2026-11-21 20:28:42 +01:00
skylartaylor fb3db48bb4 Merge commit '8aee04760986486b9d91734b6d91f254ca83b1b8' into feat/nightly-signing-policy 2026-11-21 19:17:41 +01:00
Mex 7a6dba8fe9 CLI: accept a UTF-8 BOM in recorded action files 2026-11-21 18:55:18 +01:00
skylartaylor aefd26a4e7 Keep early launch-profile bootstrap separate from the app event loop 2026-11-21 18:35:12 +01: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
skylartaylor 8db86f0ef9 Own translated nightly session notice text 2026-11-21 11:03:20 +01:00
skylartaylor 9f8f4fb140 Record abnormal nightly window-session completion privately
One bounded app-private record and lease after primary IPC claim; normal controlled completion clears before IPC release. No Launcher consumer, telemetry or automatic reporting. Four behavioral cases authored, unrun; new-tree compilation/native proof pending.
2026-11-21 09:47:38 +01:00
skylartaylor 0998d5e2a1 Keep nightly default agent files inside their selected profile
Reuse the SDK resolved stable Documents boundary and existing workspace injection. Reject profile overlap and escaping default-folder aliases without stable fallback. Five added regressions are authored; execution is pending.
2026-11-21 09:03:52 +01:00
skylartaylor 78bcbd0b14 Prepare private nightly isolation and channel source
Unqualified source checkpoint. Current-main composition, remaining source closure and platform validation are pending; frozen Windows functional proof is separate.
2026-11-21 08:48:39 +01:00
David MannandClaude Opus 5.5 5d60d84b8e automation: create the default agent folder only when a direction uses it (#15974)
Same fix as craft-libs#2557 for the window side: with a flag or the
person's own folder covering every direction, the default was created
and never used.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 16:03:24 +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 eb7fae1898 Merge pull request #15819 from aiongg/test-exit-deadline
control_exit_code: drop the in-test exit deadline
2026-11-19 18:16:54 -05:00
Mex 9445f7a0b0 docs(cli): spell out doc.replaceSmartObject in serve help
Use the full RPC method name so users can search for it in help and the generated man page. The method list still matches all 19 entries in the RPC registry.
2026-11-19 22:10:10 +01:00
David Mann 6dacd20f38 Merge pull request #15763 from davidmann4/automation/shared-live-client
automation: the MCP CLI uses the shared live client (#15762)
2026-11-19 22:09:37 +01:00
Mex e0e8c0fde2 fix(cli): reject lossy paths during flat batch discovery
Fail before output planning when a recognized input path cannot be represented in the headless API. Add a Linux CLI regression with the invalid-byte filename and its valid replacement-character alias.
2026-11-19 22:07:16 +01:00
Mex 63164a7a79 docs(cli): list doc.replaceSmartObject in serve help 2026-11-19 22:00:44 +01:00
Mex df85542f8b fix(cli): discover GIMP XCF inputs in batch folders
Updated the input recognition logic to include new file extensions and added tests for GIMP XCF file handling.
2026-11-19 21:53:09 +01:00