Apply the storytold/cadcraft#3603 profile_root.rs reopen fix to PhotoCraft:
- Enforce directory-only check in private_subdirectory for existing non-directory entries
- Define PROFILE_FOLDERS for PhotoCraft's profile subfolders (Recovery, AgentFiles, Presets, logs)
- Distinguish regular files from folder-only entries in entries_stay_inside and validate regular files with private_regular_file (nlink == 1 on Unix, non-reparse/non-directory single-link check via winsafe on Windows)
- Add nightly_profile_reopens_after_saving_settings_and_session_state regression test
* --version: name the commit of a dev build from git (#5247)
A plain cargo build reported only '0.8.2 (dev build)'. The desktop and
CLI build scripts now read the checkout's commit (git rev-parse HEAD,
rerun when HEAD moves) and the binaries hand it to build_info at start,
giving '0.8.2 (dev build, 6f8505421)'. Release builds keep
PHOTOCRAFT_BUILD_SHA and their format; without git, or when the
workspace isn't the root of the checkout (a source tarball unpacked in
another repository), it stays '(dev build)'. The engine itself still
doesn't shell out, so a commit doesn't rebuild it.
* --version: only watch git paths that exist (#5247)
Cargo treats a missing rerun-if-changed path as always changed: it re-ran
the build script and recompiled photocraft and photocraft-cli on every
build when packed-refs (or the branch's loose ref) did not exist. Watch
HEAD and packed-refs only when present, and for a packed branch the
nearest existing directory under refs/, so the first commit on it, which
writes the loose ref, still triggers a rebuild.
* --version: watch an unborn branch and reftable checkouts (#5247)
The git paths are now registered before asking for the commit, so the first
commit on an unborn branch re-runs the build script. A reftable checkout
watches reftable/tables.list, which every ref update rewrites, instead of a
loose ref or packed-refs.
* --version: git fixtures ignore the caller's repository and ref format (#5247)
The test fixtures run git without GIT_DIR, GIT_WORK_TREE, GIT_COMMON_DIR,
GIT_INDEX_FILE and GIT_DEFAULT_REF_FORMAT, and the files-format fixtures pass
init.defaultRefFormat=files, so a reftable default or an inherited GIT_DIR
can't move or reshape them.
* --version: the git fixtures join the app's tests/it binary (#5247)
Main builds each crate's integration tests as one binary. The desktop
--version test now hands the checkout's commit to build_info as the
binary does, so both print the same dev build string.
---------
Co-authored-by: FredApps <[email protected]>
The UI builds and frees many small values every frame, and the system heap's
alloc and free were about 14 % of the UI thread. Windows only: Linux keeps
glibc, tuned by malloc_tuning to return closed documents' memory (#8743).
mimalloc and libmimalloc-sys are MIT.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2).
The full-resolution develop of the visible area was started but never
collected outside tests since the move to the craft UI framework, so the
preview stayed the up-scaled proxy. The source now wants the develop by
its order (unchanged settings keep it), the after picture collects it each
pass, and a reduced read averages texel blocks so Fit is served too.
PhotoCraft also gave the framework no window placement store, so the
RAW Develop window's remembered size and place saved nowhere. The runtime
install now keeps them in window.json in the settings folder.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
* 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).
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.
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.
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.
- 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]>
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
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]>
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.
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]>
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.
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.
Unqualified source checkpoint. Current-main composition, remaining source closure and platform validation are pending; frozen Windows functional proof is separate.
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]>
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]>
* 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]>