Commit Graph
3891 Commits
Author SHA1 Message Date
4e80150200 Integration: export artboard assets at the full board, no preference (#8254)
Photoshop's Generator always exports an artboard named like an asset at the
board's bounds (generator-assets renderer: canvasBounds = layer.artboard),
with no setting. The PR put that behind a new Export preference that
defaulted to the trimmed, non-Photoshop output. Image Assets now always tries
artboard_document first and falls back to layer_document; the preference,
its dialog label and its 20 translations are gone (scorecard prefs back to
main's 21 of 176).

Test: image_assets_keep_full_artboards writes a transparent 40x30 artboard
with an 8x6 logo through file.generate.imageAssets and expects board.png
at 40x30 (the trimmed path gives 8x6) and logo.png still trimmed to 8x6.

Co-authored-by: IbrahimOezhan <89545837+IbrahimOezhan@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 21:16:12 +02:00
vangel76andClaude Sonnet 5.5 80753c7f6d Run rustfmt and regenerate docs/scorecard.md after the upstream merge
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 21:05:32 +02:00
dotCooCoo c641cf44a8 Print: reuse a kept printer list only for the printers it came from
While another thread holds the spooler, the Print dialog's listings
return the last printer lists this process got. The lists were kept
process-wide, so a session with one printer_source could get the lists
of another session's stand-in, or the system's. Each kept list now
records the printer_source it came from, and a session with other
printers lists its own, waiting for the spooler as a first listing does.
2026-10-22 11:59:03 -07:00
David Mann 34146281ea Integration: merge main (#8254) 2026-10-22 20:57:14 +02:00
edea110601 Integration: refuse Paste Into a Lock-All group before pasting (#6352)
With the mask commands now honouring Lock All, Paste Into / Paste Outside with a
child of a Lock-All group active committed edit.paste and then failed on the
refused layer.layerMask.revealAll, leaving an unmasked pasted layer behind an
Err. paste_into now checks the destination group's locks first and refuses
cleanly. Test: mask_lock_all::paste_into_a_lock_all_group_refuses_before_pasting
(layer count and history unchanged). Also moves mask_lock_all.rs into main's
one-binary tests/it layout.

Co-authored-by: osaidahmed <170216456+osaidahmed@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 20:52:59 +02:00
aiongg 993e3046df Automation: exported layers keep linked smart objects as pixels in workspace sessions
`Headless::export_layers` calls `export_layers_with` outside `Session::execute`, so no session gate was installed when `encode` chose whether a PSD/PSB embeds a linked smart object's file. `export_layers_with` enters the session's gate itself, as `Session::execute` does, and a workspace session's layer export writes such a layer as pixels like `doc.save`.
2026-10-22 18:41:32 +00:00
James ChapmanandClaude Opus 5.5 a2fe5b2458 Gate linked smart-object reads on re-render
A smart object's Linked source path is document data (a PSD placed layer's
Idnt, or a path a .pcraft stores). `read_file`, the single disk read point
for linked files, now rechecks the path with the gate the engine already
carries through dispatch, `Session::edit` and background jobs, as the
contents commands already did. A refused path is handled like a missing
file: the layer keeps its last rendering. Trusted sessions install no gate
and are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:41:32 +00:00
James ChapmanandClaude Opus 5.5 b4d6d3f639 Don't embed linked smart-object files in automation PSD saves
PSD/PSB and layered TIFF export embed the file a Linked smart object names
(lnk2). Add `read_linked_files` to `photocraft_io::ExportOptions` and
`PsdExportOptions` (default on, so trusted saves are unchanged), threaded
through nested PSB and layered TIFF export. When it is off, such a layer is
written as pixels with the existing warning. Automation turns it off in
`Headless::save` (workspace), the desktop's `save_automation_with`, data-set
export for a gated session, and `file_cmds::encode` when a session gate is
installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:41:32 +00:00
dotCooCoo 9e8657984e Merge main into fix/print-listing-serialized 2026-10-22 11:41:25 -07:00
bommerts 7f6aa6f852 Merge upstream consolidated integration test layout 2026-10-22 14:41:05 -04:00
durtyrobbin 5bd07b07ed Address mixer review: safe sampling, shared live commits and preserved brush behavior 2026-10-22 14:41:04 -04:00
David Mann 9095272487 Integration: merge main (#6352) 2026-10-22 20:38:21 +02:00
James ChapmanandClaude Opus 5.5 25def299d7 Gate Pixel Replacement paths in data-set export
`image.applyDataSet` judges the Pixel Replacement image paths a data set
names with the session's automation gate. `export_data_sets_with`
(doc.exportDataSets / doc_export_data_sets) now does the same: the check is
factored out of `apply_data_set` and runs for every planned data set before
anything is written. Test in automation rpc tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:33:32 +00:00
vangel76 1d99a1d8e8 Merge remote-tracking branch 'upstream/main' into fix/3290-filter-mask-paint
# Conflicts:
#	crates/engine/src/float_cmds.rs
#	crates/engine/src/jobs.rs
#	crates/ui-egui/src/smart_ui.rs
2026-10-22 20:15:51 +02:00
vangel76 460e68c8dd Merge remote-tracking branch 'upstream/main' into fix/vp-stamp-tearoff
# Conflicts:
#	crates/algo/src/vanishing.rs
2026-10-22 20:10:43 +02:00
David MannandClaude Opus 5.5 95e0848332 Merge main into fix/4381-psd-frame-stroke
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:09:11 +02:00
durtyrobbin 3233e2ffc9 Merge main while preserving live mixer controls and review fixes 2026-10-22 14:00:00 -04:00
David Mann 9487065314 Integration: merge main (one test binary per crate, #8644)
# Conflicts:
#	docs/file-format-parity.md
#	docs/gaps.md
#	docs/scorecard.md
#	scorecard/file_compat.toml
2026-10-22 19:55:06 +02:00
Dylan M. Taylor 6649b78526 Use chrono instead of hand-rolled UTC conversion (#8234)
* Use chrono for UTC/calendar conversion instead of hand-rolled copies

Replaces the civil_from_days copies behind the app's log timestamp, the
Measurement Log's date/time, and the perf report date with chrono as a
workspace dependency (reusing the version already in the tree). Output formats
are unchanged and pinned by the existing tests. AGENTS.md now says time goes
through chrono.

Follow-up to storytold/cadcraft#1785

* Never panic on a clock outside chrono's range; keep 5-digit years unprefixed

chrono's From<SystemTime> unwraps internally, so a clock past year 262143
panicked. logging::timestamp and analysis_cmds::now_iso now read the duration
since the epoch and go through the fallible DateTime::from_timestamp, reading
an out-of-range or pre-epoch clock as the epoch as the old saturating code
did. All three ISO helpers (timestamp, now_iso, perf::iso_utc) write the year
with {:04} rather than %Y, which prefixes a '+' past year 9999.

Tests cover the far-future and year-10000 cases for timestamp and iso_utc.

* Don't build an unrepresentable SystemTime in the far-future test

UNIX_EPOCH + Duration::from_secs(u64::MAX / 2) overflows Windows'
SystemTime and panicked before timestamp() ran, failing the Windows
test job. Build it with checked_add and only assert where it exists.

* time: preserve old out-of-range date conversion (no epoch fallback)

`DateTime::from_timestamp(...).unwrap_or_default()` silently reset any
instant past chrono's year range to 1970-01-01, changing output the old
hand-rolled Howard-Hinnant code converted exactly (e.g. 10_000_000_000_000 s
was 318857-05-20 17:46:40, not the epoch). Restore the old conversion domain
with a cycle-based helper that routes the calendar through chrono (the
calendar repeats every 400 years = 146_097 days, so month/day/time come from
chrono and only the year is carried in i128, keeping every i64 exact).

- apps/photocraft/src/logging.rs: `timestamp` via `utc_parts`; keep the
  pre-1970 epoch clamp; u64 secs past i64::MAX saturate, not epoch.
- crates/engine/src/analysis_cmds.rs: extract pure `iso_from_unix` (cycle
  based) from `now_iso` so the conversion is tested directly.
- xtask/src/perf.rs: `iso_utc` cycle-based, accepts the full u64 range the
  old code did.

Pinned old outputs in tests:
  logging u64::MAX/2 s -> 292277026596-12-04T15:30:07.000Z (was epoch),
          10_000_000_000_000 s -> 318857-05-20T17:46:40.000Z
  iso_from_unix 10_000_000_000_000 -> 318857-05-20T17:46:40Z,
          -10_000_000_000_000 -> -314918-08-13T06:13:20Z, i64 extremes
  iso_utc u64::MAX -> 584554051223-11-09T07:00:15Z (was epoch),
          10_000_000_000_000 -> 318857-05-20T17:46:40Z

* Don't build a year-318857 SystemTime unchecked in the logging test

Windows' SystemTime only reaches about year 30828, so
UNIX_EPOCH + Duration::from_secs(10_000_000_000_000) panicked before
timestamp() ran and failed the Windows test job. Build it with
checked_add and assert where the platform can hold it. The year-10000
case fits everywhere and stays unconditional.

* Name the 400-year range extension as the one exception to the time rule

The rule said never to hand-roll calendar math, but the range fix
(shifting by whole 400-year Gregorian cycles so dates past chrono's year
range keep their old output) is cycle arithmetic, so the rule and the code
disagreed. The rule now names that exception: the library still computes
month, day and time, and only whole cycles are carried in the year.

* Say the library computes month and day; time-of-day is plain arithmetic

Narrows the range-extension wording: the date library computes the
calendar fields, and splitting seconds into hours, minutes and seconds
is ordinary arithmetic, which is what the code does.
2026-10-22 13:54:10 -04:00
eiketre be85bbc030 Merge upstream main into fix/multilayer-transform-handles 2026-10-22 19:36:31 +02:00
bommerts dac050d95e Merge main and retain exact action export corpus assertions 2026-10-22 13:35:49 -04:00
2f1eacf391 Integration: merge main, resolve conflicts (#5504)
- algo/paint.rs: main locks transparency with composite_atop; keep that
  for every blend mode, and Clear on a locked layer leaves the pixel.
- paint_mouse.rs: main's Some arm (loads stored tips), the PR's None arm
  (a first-seen tool starts in Normal).
- retouch_ui.rs: main moved the Pattern Stamp params into
  pattern_stamp_params, shared with its live preview; the PR's `mode`
  goes there, so preview and commit agree.
- tool_reset.rs: main's Type keys plus the PR's Paint Bucket mode keys.
- distort_ui.rs (from #5478): main's Delete/Backspace pin branch, then
  tool_keys.
- docs: both sides' history rows and status lines.

Co-authored-by: paulou-jpg <79102098+paulou-jpg@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:28:49 +02:00
David MannandClaude Opus 5.5 f5533e5d82 Integration: merge main into batch 6
Main merged #5940, #6472, #7838 and #7922 directly. Kept from the batch:
the snapshot/History-follow identity at the history limit (#5940,
c7ef3676a; main still had the 3-tuple HistorySpot) and the strokeless
shape at a 0 px width step (#6472, 962539607; main still added the
stroke). Main already carries the other two fix-ups (34c9d0ea4, dff8bfd0e).

Overlaps with main resolved:
- #5842 vs main's #5568: one path, apply_color, tool-gated as #5842
  has it, with #5568's float fill, kept fill opacity and lock skip;
  shape_fill_ui's duplicate foreground_changed/gesture dropped; #5568's
  tests run with a shape tool.
- #6230 vs main's #5180: one Type tool path click (path_target), no
  second type.attachToPath; vertical type does not start type on a path,
  as main has it; main's path_at/path_cursor and canvas arm dropped.
- #5452 moved the shape swatch to shape_paint_ui.rs: main's hex field
  (#6201) ported there.
- type_extra_cmds::with_text takes main's dpi form, pub(crate) for
  type_area_cmds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:20:26 +02:00
Khawar Zamman Wani 4c80a98dff Merge remote-tracking branch 'origin/main' into save-for-web-webp
# Conflicts:
#	docs/file-format-parity.md
2026-10-22 22:36:41 +05:30
Khawar Zamman Wani 8a7134135e Merge remote-tracking branch 'origin/main' into fix/6501-multi-layer-free-transform
# Conflicts:
#	docs/gaps.md
#	docs/ui-parity.md
2026-10-22 22:36:29 +05:30
Khawar Zamman Wani ac3d172acd Merge remote-tracking branch 'origin/main' into pen-path-operations
# Conflicts:
#	ATTRIBUTION.md
#	docs/ui-parity.md
2026-10-22 22:36:15 +05:30
midasdf fadb558d6c Merge origin/main into jp/print-paper-sizes
Conflicts resolved keeping both sides, newest first:
- ROADMAP.md: status line, progress log, revision history
- docs/printing.md: Paper sizes then Positioning the preview
- docs/target-app-parity.md: status line, Print row, revision history
2026-10-23 02:02:40 +09:00
aiongg ffa400c754 Keep tests correct and docs current with one test binary per crate
- gpu: the test modules share one GPU_LOCK, and timing and vector_mask
  take it too, so one process drives one wgpu device at a time.
- ui-egui: the wgpu tests in pattern_preview_canvas, adjust_preview_gpu,
  marquee_autoscroll and layout_perf take gpu_lock().
- affinity compound_limits: the child process selects its test by the
  module path (compound_limits::<name>); with --exact, the bare name
  matches no test and the child passes without running the check.
- xtask scorecard reads crates/io/tests/it/corpus.rs.
- Docs and comments name the new test paths and the --test it filters.
2026-10-22 16:55:34 +00:00
aiongg a6428d3dfb Build each crate's integration tests as one binary
Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs; helper modules under tests/common move with them.

These keep their own binary (own process):
- engine panic_hunt: a process-wide panic hook counts every panic.
- engine text_gamma: changes the process-wide text gamma.
- engine smart_filter_stages, mask_cache_purge: assert on global caches.
- codecs pnm_peak_memory: reads the process's peak RSS.
- photocraft mac_menu_appkit: harness = false.
2026-10-22 16:55:34 +00:00
durtyrobbin 6d8870157a Merge main while retaining live mixer behavior and regression coverage 2026-10-22 12:32:26 -04:00
NetterSilverandClaude Haiku 5.5 2e849bb6fc Keep a bare '+' key when saving a keyboard shortcut set
Found while testing crates/engine/src/kys.rs:263-271 (photoshop_key), used by write at :288

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 18:31:35 +02:00
d5139d177a Integration: local models off by default in builds without them (#1199)
- Preferences > Integrations: default and web builds showed the section
  with two single-option "Classical" dropdowns, "Local models aren't
  available in this build" and disabled Download buttons; main hides it
  (#204). The model choices are now hidden where no model can run
  (prefs::LOCAL_ML_ONLY), and main's hidden-section test is back.
- A model choice saved by a local-ml build (the preferences file is
  shared) made every Select Subject, Object Selection box and Remove
  Background fail in a default build, with no control left to switch
  back. There it now means Classical; local-ml builds stay strict, and
  an explicit "model" param still fails.
- models.download / models.remove: the automation gate let a control or
  MCP agent start about 1.8 GB of downloads or delete installed models
  outside its workspace. Both are now refused like other ambient file
  effects; models.list stays allowed.
- Select Subject / Object Selection with a model run as jobs, so "No
  subject found" / "found nothing there" never showed. The job result
  now gets the same message as the classical path, including the
  Object Selection options bar's "try a rectangle" hint.
- local-models.yml pins its third-party actions by SHA, as ci.yml does.
- docs/development.md: Windows local-ml builds fail to link ONNX Runtime
  1.28's prebuilt with MSVC 14.42 (unresolved __std_search_1 etc.), and
  Linux ones need glibc 2.38 / GCC 13 (Ubuntu 22.04 fails with
  __isoc23_strtol).

Tests that fail without the fix: model_cmds
a_model_saved_by_a_local_ml_build_means_classical_in_a_build_without_models,
prefs_ui unimplemented_preferences_are_hidden_from_the_dialog, workspace
local_model_downloads_and_removals_are_not_automation_commands, jobs_ui
a_model_selection_that_finds_nothing_says_so_like_the_classical_one.

Co-authored-by: mighty-programmer <83077551+mighty-programmer@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:32 +02:00
aiongg 1370c7a642 Integration: #7811 cargo fmt on process_outputs 2026-10-22 15:47:53 +00:00
JGF c56a313306 Reject multi-layer action targets until they can export faithfully
Prevent single or compound layer.setProps exports from silently targeting only the active layer. Cover valid multi-layer commands, strict failure, atomic skip and malformed targets at 8/16/32-bit.
2026-10-22 11:46:23 -04:00
81925d7769 Integration: Raw Defaults resolution on Revert, Batch, Stack, headless open and CLI convert (#7811)
The resolution preference reached File › Open, but the other ways a raw
becomes a document of its own still opened it at 72 ppi: File › Revert
(a raw opened at 240 dropped to 72), Batch / Image Processor / Lens
Correction batch (a raw saved as PSD came out at 72 while Open + Save
gave 240), Load Files into Stack, the headless MCP `doc.open`, and the
CLI (`convert` at 72 while `run`/`info`, which open headless, now take
the default 300). They now apply the same `raw_defaults` rule; Batch
passes the user's value into its scratch sessions.

Tests that fail without this change (72 vs 240/300):
revert_batch_and_stack_open_a_raw_at_the_raw_defaults_resolution
(engine, one assertion per path), doc_open_gives_a_raw_the_raw_defaults_resolution
(automation), convert_opens_a_raw_at_the_raw_defaults_resolution (CLI).

Co-authored-by: Korg1ch <57859048+Korg1ch@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:42:42 +00:00
aiongg 22d912a108 Integration: #8142 #8535 Quick Export accepts a .exr path
Main's extension check (#8519) refused .exr, the format #8142 adds to Export Preferences; the path's extension now may also name EXR.
2026-10-22 15:40:08 +00:00
aiongg add0fbc706 Integration: merge main (through #8562)
contributors/people.toml: kept both sides' new entries (r4's list and main's benandez).
2026-10-22 15:40:05 +00:00
aiongg eb199bcefe Merge PR #7721: fix(actions): refuse lossy fractional Crystallize ATN export (new head) 2026-10-22 15:39:55 +00:00
aiongg 934eb71d84 Integration: merge main
crates/engine/src/file_cmds.rs: batch keeps the save-point closure (takes the output path) and also copies the session's authorize hook into each scratch session, as main now does.
crates/raw/src/sensor.rs: both sides cap the memory of retained tiles; kept the existing retained_segment_bytes check (checked multiplication, same limit) and dropped main's duplicate inline loop.
2026-10-22 15:39:51 +00:00
aiongg f618cdea29 Integration: #8371 the .atn corpus round trip merges the per-property Sets that Save now writes 2026-10-22 15:39:49 +00:00
aiongg 2496742eaa Integration: merge main
Merges main through #3283 (Smart Filters: distinct editors, shared
disclosure and stable alpha).

filter_dialog.rs: main's split of the preview into is_smart_edit,
smart_preview_factor and scale_preview_params is kept. The plug-in branch
from #7524 (plugin_cmds::scale_for_preview scales only declared pixel
lengths) moved into scale_preview_params, so it applies to a plug-in run
on its own and to a plug-in recorded as a smart filter.

smart_ui.rs open_editor: main's smart_filter_dialog::target flow and the
shared adjust/filter dialog opening are kept; the Liquify re-open with
recorded strokes (r4) stays ahead of it. The old per-adjustment
edit_filter call is dropped with main's rewrite.
2026-10-22 15:39:28 +00:00
aiongg e846b64262 Integration: #7593 the plain crop round trip carries no deleteCroppedPixels key
The exporter leaves out an unset Crop delete (see the exporters' defaults note), so the imported step has none either.
2026-10-22 15:38:58 +00:00
aiongg 39dd2eda12 Integration: #7101 the Apply Layer Comp event is registered once, by the name-only mapping
main already registered an applyComp event that accepted any reference class; the first match won, so #7101's name-only mapping never ran.
2026-10-22 15:38:56 +00:00
aiongg 386ebe736b Integration: #8304 #7262 layer_props_tests compare with the optional layer ref 2026-10-22 15:38:50 +00:00
aiongg 87d930997b Integration: #7611 smart brush export refuses steps with refine strokes 2026-10-22 15:38:44 +00:00
aiongg 8d0f920ea6 Integration: #7574 the lift outline allocates fallibly 2026-10-22 15:38:42 +00:00
aiongg 95db2fe5eb Integration: #7968 #7262 groupLayers From uses the optional layer ref 2026-10-22 15:38:40 +00:00
aiongg 576ba0e02b Integration: track t12
# Conflicts:
#	contributors/people.toml
#	crates/compose/src/lib.rs
#	crates/compose/src/tests.rs
#	crates/engine/src/print_cmds.rs
#	crates/engine/src/print_cmds/tests.rs
#	docs/target-app-parity.md
2026-10-22 15:38:33 +00:00
aiongg 5857afd121 Integration: track t11
# Conflicts:
#	apps/photocraft-cli/src/lib.rs
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sr.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/gaps.md
2026-10-22 15:38:31 +00:00
aiongg 71991b0a03 Integration: track t10
# Conflicts:
#	contributors/people.toml
#	crates/engine/src/prefs.rs
#	crates/ui-egui/src/layer_style/contour.rs
#	docs/ui-parity.md
2026-10-22 15:38:28 +00:00