Commit Graph
11425 Commits
Author SHA1 Message Date
dotCooCoo 8af2ffef6e Merge main into fix/save-added-extension-asks-before-replacing 2026-10-17 16:28:33 -07:00
dotCooCoo b8727aff86 Merge main into fix/craft-fonts-register-under-manifest-name 2026-10-17 16:28:31 -07:00
Stepan Pavlenko e4bc5c25e8 i18n(ru): translate the dynamic labels the Russian catalog was missing
The Russian catalog passed `cargo xtask i18n-coverage` (100% of measured keys)
but lacked the runtime-only labels the other catalogs already carry, so they
showed in English: filter and adjustment parameter names and choices, gallery
names, Camera Raw panels (Balance/Clarity/Dehaze/Color Mixer/Texture/…),
History/Layers/paths/channels menu labels, metadata and File Info fields,
System Info and hardware status lines, rasterize prompts, composed status
templates and dialog text.

All of them are translated (1,229 keys added; the catalog is now 4,227 keys
against upstream's 2,998), written from the meaning of the English labels and
reusing the vocabulary the catalog already uses (Highlights → Света,
Midtones → Полутона, Feather → Растушёвка, Pattern → узор). Filter and gallery
names are aligned with the menu labels already in the catalog so a filter never
reads two ways (Texturizer → Текстуризатор, Unsharp Mask → Нерезкое
маскирование, Shape Blur → Размытие по фигуре, …).

Tests: `russian_covers_generated_filter_options_and_gallery_names`
(filter_dialog.rs, the Italian/Korean/Spanish check) and
`russian_dynamic_status_hardware_and_dialog_labels_are_translated` (i18n/mod.rs).
Docs: docs/localization-ru.md (terminology), localization-parity, gaps G13,
ROADMAP, ATTRIBUTION and LICENSE-translations.

Validated on a rebase onto upstream/main: `cargo test -p photocraft-ui-egui
--lib` 2,998 passed / 0 failed; clippy clean (the only lint is a pre-existing
`nonminimal_bool` in canvas.rs, untouched here and present on upstream main);
`xtask layers` OK; `xtask wasm` OK; `xtask i18n-coverage` ru 1,863 / 1,863;
offscreen `snapshot` in Russian checked.
2026-10-18 02:27:44 +03:00
UnemarsandClaude Fable 5.1 2a003d51ea Cargo.lock: rayon for photocraft-paint
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 01:24:26 +02:00
seotarek ac1bc012ef fix(compose): prevent outside stroke from bleeding into opaque character interior (#5861) 2026-10-18 02:21:02 +03:00
skylar taylor-barrick ead6d2197f Package: report its paths with / on Windows too (#7184)
`file.package` absolutised the caller's `dir` and then built `folder`, `document`
and every `links` entry on it with `join`, which always writes `/`. On Windows
that left one string spelt both ways:
`C:\Users\...\pkg/Print Me/Links/art.png`. The control channel takes `/` and
rejects alternate separators, so a reported path could not be handed back to it.

Spell the absolutised directory with `/` as well, keeping a leading `\\`
(verbatim and UNC prefixes, where Win32 does not accept `/`) intact.
2026-10-17 19:20:33 -04:00
UnemarsandClaude Fable 5.1 7deeaeeba1 Brush: large tips rasterize, accumulate and composite in parallel
A 2000 px soft tip is a 12 MP dab, and every dab ran on one thread: the tip's
coverage (92 ms), its accumulation into the stroke's tiles (44 ms) and the
composite of the dirty tiles into the layer (177 ms), about 300 ms a dab, so a
stroke across a 24 MP photo lagged by a quarter second per frame. Photoshop
keeps such strokes fluid by spreading them over the cores.

Each stage is independent per row (the round tip's coverage) or per tile (the
accumulation, the composite), so they now run on the thread pool from 256²
pixels of work up, to the same pixels: the per-pixel maths is untouched, the
dither and Dissolve hash positions, and a test renders a 700 px soft stroke,
a Dissolve stroke and a per-dab-colour stroke (with a selection, 8-bit) both
ways and compares every pixel. Below the threshold, and on the web, nothing
changes. The composite's writes to the layer stay in order; its tiles are
composited in batches so the pending regions stay small.

`examples/big_dab_bench.rs` prints the stages of one dab. On a loaded 16-thread
machine the 12 MP dab went from about 300 ms to 100–140 ms; the hard 2000 px
tip from 75 to 35 ms.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 01:16:29 +02:00
skylar taylor-barrick f8cd3e7982 chore: clear the rustc 1.96 clippy lint that fails CI
Unrelated to this branch's change; main already fails clippy --all-targets -- -D warnings
without it, which is what failed the Windows integration job here. One
clippy::nonminimal_bool site in canvas.rs, taking clippy's own rewrite: the
negation stays outside, so the is_finite guards and their NaN behaviour are
unchanged. A sweep of all 30 workspace members found no other site.
2026-10-17 17:08:37 -06:00
ametadot 16e5374bcf fix(camera-raw): preserve document identity across queued completions 2026-10-18 09:53:58 +11:00
dotCooCoo 3c9c93ed8c GPU startup: Auto on Windows leaves Vulkan out when an Intel adapter is present (#4)
With the `auto` backend on Windows, eframe created its wgpu instance with
Vulkan, and creating it, listing its adapters and asking each adapter
about the window's surface loaded and ran the Intel Vulkan driver
(igvk64.dll) before the adapter selector could pick Intel's DX12
adapter. When the driver crashed there, the first launch died, and only
the next one moved to DX12 through the startup marker.

`configure` now lists the DX12 adapters first, with a DX12-only
instance, when the plan is `auto` on Windows without WGPU_BACKEND. If
one of them is an Intel adapter, the instance is created with DX12 and
GL only (GL stays the last resort), so no Vulkan driver is loaded. On a
system with an Intel and a discrete GPU, the discrete GPU then runs on
DX12 instead of Vulkan. WGPU_BACKEND, --safe-gpu, a chosen backend and
the crash fallback are unchanged, and System Info still shows the Intel
DirectX 12 note.

The decision is `windows_auto_backends`, tested with vendor lists.
2026-10-17 15:28:20 -07:00
Michael Higgins 2e3aa8ded2 Merge branch 'main' into fix/5884-delay-load-windows-data-pdf 2026-10-17 18:17:21 -04:00
Theo Wilenius 6ebfd87a0d Merge branch 'main' into fix/6286-guide-drop-on-either-ruler 2026-10-18 00:59:29 +03:00
Diego Chagas 235e7578f3 Print through CUPS over IPP and the print portal, so File › Print works in the Flatpak (#2728) (#3017)
Main prints through craft-print, which runs `lp`; a Flatpak has no `lp`,
so File › Print fails there. This keeps craft-print as the route wherever
`lp` is on the path (and on Windows) and adds two more behind it:

- `photocraft-ipp`, a pure-Rust IPP client (CUPS-Get-Printers/Classes/
  Default, Print-Job over HTTP/1.1) that talks to CUPS over its socket or
  TCP; the Flatpak manifests grant --socket=cups for it. A `printServer`
  named in the request always takes this route. `file.print.printers`
  lists the queues.
- The XDG Print portal as the app's spooler (`Session::print_spooler`),
  for a sandbox without the CUPS socket or a system without a printer:
  the system print dialog, seeded with copies, paper and orientation.
  PHOTOCRAFT_PRINT_PORTAL=1 prefers it, =0 removes it.

A route that exists but fails (unknown printer, refused job) is an error;
only a missing route moves on. Results gain `backend` (lp, windows, ipp,
portal). docs/printing.md describes the routes.
2026-10-17 15:55:54 -06:00
deniskhudandClaude Opus 5.5 89305c1d17 Shape tools: gradient Fill and Stroke from the swatches, with an editable stops strip
The shape Fill / Stroke swatches (options bar and Properties) offer No Color, Solid and
Gradient, as Photoshop's popover does, for the next shape and the selected one. The
Gradient tab (shape_gradient_ui.rs) has a Recent row, the preset library, a stops strip
(click to add a colour or opacity stop, drag to move, drag off to delete, midpoints) with
the selected stop's colour, opacity, location and Delete, and style, angle, scale,
Reverse and Align with layer. Stop edits reuse the Gradient Editor's apply_stop.

shape.create / shape.edit take and report every gradient field (opacityStops,
midpoints, offset, dither, align), so editing an imported gradient keeps the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 23:13:04 +02:00
Higgs32584andClaude Opus 5.5 86f6199b01 Print: load Windows.Data.Pdf.dll before using it; fix the error hint (#5884)
Review follow-up on #6395:
- Check that the DLL actually loads (winsafe `LoadLibrary`, no unsafe) rather than that the
  file exists: a DLL that is present but cannot load still aborts at the delay-load stub.
- The hint no longer says to clear Print Settings; that doesn't take a page off the PDF path.
  It now points to Save as PDF, or printing an RGB image without page text or labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:53:11 -04:00
seotarek 7348e060b4 fix(paint): scale blur sigma with brush size (#5892) 2026-10-17 23:52:30 +03:00
Derek GliwaandClaude Opus 5.5 2cf274f991 Brushes: accept .abr files up to 1 GiB
Import Brushes refused .abr files over 512 MiB: the engine's preset file cap
and the .abr decoder's sample budget were both 512 MiB. Raise both to 1 GiB
for brush files only; gradient, swatch, action and image-tip imports keep the
512 MiB cap. A compile-time assert keeps the reader and decoder caps equal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:38:11 -05:00
Michael HigginsandClaude Opus 5.5 1d65bd605b Web: Place Embedded and canvas drops place images (#5749) (#5817)
* Web: Place Embedded and canvas drops place images (#5749)

File > Place Embedded was disabled in the browser (the engine command reads a
path), though the menu path reads the picked file's bytes. Files dropped on
the canvas were always opened as new documents. The web shell now tracks the
drag position, and drops on the canvas are placed from their bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Format (cargo fmt)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Narrow to the web canvas-drop half: Place Embedded enablement landed in #5585

Drop the picker test that covered the part #5585 now owns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:20:44 -07:00
RehanKhatkarandClaude Opus 5.5 f94fb6cd59 Open EXR Parts: the menu asks for a file and shows the parts dialog (#7169)
File › Open EXR Parts… ran the engine command with no params, failing
with `missing "path"` and never showing a dialog: the picker and parts
form in view_cmds were never reached because the id was missing from
`wraps()`. Add it, with a regression test that drives the menu through
the file picker, the parts dialog and OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 01:37:26 +05:30
HirthikBalaji ee4966260b feat(atn): map Batch steps inside actions to file.automate.batch (#7104) 2026-10-18 01:11:07 +05:30
MarekSpodBiedry 237ff1d01f Merge branch 'main' into issue-6810 2026-10-17 20:21:03 +02:00
skylar taylor-barrick 06ad0d5c95 Merge pull request #2863 from 1Git2Clone/ci-panic-hunt
CI: run panic_hunt in the Linux test job
2026-10-17 12:14:20 -06:00
skylar taylor-barrick 039b86f8f6 Merge pull request #7149 from skylartaylor/linked-path-checks
Follow linked paths only on this computer or the document's share
2026-10-17 12:13:47 -06:00
skylar taylor-barrick 482fd899cf Build: take craft-docpath from the merged craft-libs rev
craft-libs#169 is merged, so the fork pin is no longer needed. Pinned to
storytold/craft-libs 82a24b006eefa036b43c09a67fb9a3fbd17ffe63 (main after the merge) rather than the older 12281d07,
which predates resolve_absolute and the Windows colon refusal.
2026-10-17 12:02:56 -06:00
Gert Pellin - GPE ba40454b18 Logging: a second launch leaves the running instance's log alone (#6432) (#6478)
logging::rotate renamed photocraft.log up the chain on every start without
knowing whether another instance still wrote to it. The running instance
kept its handle, so after a second launch its live log was .1.log, after a
third .2.log, and a fourth launch deleted it.

The instance that writes photocraft.log now holds an exclusive lock on
photocraft.lock until it exits (a separate file, since Windows locks are
mandatory and would keep the log itself from being opened). A start that
finds that lock held leaves the chain alone and writes
photocraft-<pid>.log, marked by photocraft-<pid>.lock. Those side-by-side
logs are pruned to the newest KEEP once their instances have exited; a
held one is never touched. Rotation and pruning run under rotate.lock so
two starts at once can't interleave. On a file system without locks every
start rotates as before.
2026-10-17 11:57:39 -06:00
Khawar Zamman WaniandClaude Opus 5.5 378231214a Desktop app: photocraft --help prints usage; unknown options are usage errors (#6431) (#6435)
* fix(desktop): `photocraft --help` prints usage; unknown options are usage errors (#6431)

The desktop binary's argument loop took every argument it didn't know as
a file, so `photocraft --help`, `-h` or a typo such as `--safegpu`
opened the window and logged "Couldn't open --help".

- `--help` / `-h` print the usage (every option and environment
  variable) and exit 0.
- Any other argument starting with `-` (except macOS `-psn_`) is named
  on stderr and the launch exits 2 before the log file or window, along
  with any bad `--control` port (`control_args_exit_code` becomes
  `usage_exit_code`).
- `--` ends the options, so a file whose name starts with `-` opens.
- `--help` and `--version` write without `println!`, so a closed pipe
  (`photocraft --help | head -1`) can't panic.

Tests: apps/photocraft/tests/command_line_usage.rs runs the binary with
no display; 4 of its 6 tests fail on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(desktop): usage tests exit before the window opens; fmt smart_filter_authorization

`arguments_after_double_dash_are_files` and `macos_process_serial_number_is_still_ignored`
passed only valid arguments, so the app went on to open its window. Removing DISPLAY makes
that fail fast on Linux, but Windows runners have a desktop and both tests hung until
nextest's 600 s timeout. They now add a bad `--control` value so the launch always fails
with the usage errors, and assert stderr names only that error (no "unknown option").

Also `cargo fmt` crates/automation/tests/smart_filter_authorization.rs, left unformatted
on main by #5684, which failed the Format step of every PR's ubuntu test job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:57:27 -06:00
ZuujisandClaude Opus 5.5 796ee3b103 Image Assets: two layers naming the same file no longer overwrite each other (#6614) (#6668)
* Image Assets: two layers naming the same file no longer overwrite each other (#6614) [WIP]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Image Assets: two layers naming the same file no longer overwrite each other (#6614)

generate_assets wrote every requested asset, so two layers (or two
default variants) naming one file silently replaced each other and the
result listed the file twice. Each file is now written once per run:
layers go top first, as the Layers panel lists them, the first writer
keeps the name, and later ones are reported in errors. Names are
compared ignoring case, since Logo.png and logo.png are one file on
Windows and macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:55:54 -06:00
David MannandClaude Opus 5.5 589941a536 Save: refuse to replace a read-only file (#6600) (#6643)
Saving writes a temporary file and renames it over the destination. A
rename only needs the folder to be writable, so on Linux and macOS a
read-only (chmod 444) file was silently replaced, while on Windows the
rename failed with a vague "locked or read-only" access error.

atomic_write now asks the AtomicFs whether the existing destination is
read-only (new `is_readonly`, false by default for other implementors)
and refuses before anything is written: "cannot save <file>: the file
is read-only; the original file was not changed". New files and
writable files save as before. Photoshop refuses the same way; the
user saves a copy with Save As.

Tests: a fake AtomicFs reporting read-only gets the error with nothing
written or renamed; a real file marked read-only keeps its bytes and
mode and gets the clear message on every platform.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:55:43 -06:00
David MannandClaude Opus 5.5 c9899e9c29 Duotone: ink curve points must be finite (#7049) (#7050)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:55:31 -06:00
Marco Arnulfo e196d8e47c Opening a file that is already open shows its tab instead of a second copy (fixes #6598) (#6630) 2026-10-17 11:53:21 -06:00
ZuujisandClaude Opus 5.5 1dcaa28b96 Quick Export: Same Folder asks before replacing the document's own file (#6599) (#6632)
With Export Preferences › Location = Same Folder, Quick Export wrote
<name>.<format> beside the document's file with no check, so a document
opened from photo.png was exported over photo.png itself. The app now
opens the save dialog for that case, and file.export.quickExport refuses
it without a `path`. Overwriting an earlier export beside a PSD is kept.

Adds file_cmds::same_file (text, dev+inode on Unix, case-insensitive
canonical path on Windows).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:53:10 -06:00
David MannandClaude Opus 5.5 193f495e5a Perspective Crop and Rotate Arbitrary keep the Background opaque (#7138)
Both filled the Background's uncovered area with the background colour
including its alpha (tools.setColors accepts one), leaving see-through
pixels on a Background. They now use alpha 1, as crop_doc does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:44:29 +02:00
Nicolas FalesyandClaude Opus 5.5 c05d827fde perf(type): refresh type layers without cloning the document (#7092)
`type_cmds::refresh` read only the document's resolution and pixel format,
but took `&Document`, so 15 call sites that hold the layer mutably cloned the
whole document to pass it, once per keystroke and pointer move. The new
`refresh_at(dpi, format, t)` takes the two values; those sites read them
before borrowing the layer. `refresh(doc, t)` stays as a wrapper for callers
that already hold the document. `with_text_layer` and `with_text` hand their
closures the resolution, the only thing any of them read from the copy.

type.edit on a 6000 x 4000 document: 60 filled layers 5.60 -> 5.14 ms,
20 layers 4.33 -> 3.90 ms (median of 300).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUAqfMqVHdoeDa2y68KQQw
2026-10-17 13:40:31 -04:00
highperfocused f7e441244f fix(ui): Color Picker updates the colour on press, not on release (#6937)
The hue/component strip and the colour field only reacted to
dragged() || clicked(), so a click-and-hold updated the selection only
when the button was released. Photoshop updates immediately on the
press. React to is_pointer_button_down_on() instead, which is true from
the press frame onwards and covers dragging too.

Regression test drives the picker with a press-and-hold on the hue
strip and asserts the colour changes before release.
2026-10-17 19:39:10 +02:00
highperfocused 52ad01f426 Eyedropper: a large sampling ring that reads on any colour (#6973) 2026-10-17 19:37:45 +02:00
David MannandClaude Opus 5.5 2f038c5eb2 Perspective Crop: W and H follow the Point/Pica Size preference (#7135)
size_params converted points at a hard-coded 72 per inch. It now uses
Preferences › Point/Pica Size, as the rulers, the type tools and the
Crop tool do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:37:40 +02:00
Michael Higgins 4146d61b78 Merge branch 'storytold:main' into fix/6884-pen-tool 2026-10-17 13:36:48 -04:00
David MannandClaude Opus 5.5 2a690f0f71 Crop: a refused crop keeps the frame for fixing (#7133)
commit_crop cleared the box Undo, took the frame, turned the view upright
and reset the angle before running image.crop, and restored nothing when
the engine refused it (e.g. a resolution past 10 000 ppi). It now keeps
the frame, its turn, its box Undo/Redo and the view and puts them back on
an error. Leaving the tool with a refused frame cancels it instead of
retrying every frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:30:02 +02:00
David MannandClaude Opus 5.5 22cacbf198 Perspective Crop: switching documents drops the pending box (#7130)
perspective_crop_ui::cancel_stale ran only on a pointer event or a
commit, so after a tab switch the other document's quad was drawn (and
reported) until the next press. sync_views now runs it next to the Crop
tool's cancel_stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:21:38 +02:00
Nicolas FalesyandClaude Opus 5.5 4b660fcffa perf(camera-raw): Shadows/Highlights 1.5× faster, bit for bit the same
The fast local Laplacian filter upsampled every remapped level in full for
every reference (up to 96), but each pixel reads that level for at most two
references. `llf` now samples it only where the weight is nonzero, with
`up_at` (same terms, same order as `up`; row taps found once per row,
`mirror` only near the edges). `quantile` selects its element instead of
sorting the whole work copy (5 sorts per render, serial).

36 MP dialog, all cores: Shadows 252 -> 168 ms, Highlights 275 -> 184 ms,
all 14 sliders 627 -> 411 ms. Output hashes match main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUAqfMqVHdoeDa2y68KQQw
2026-10-17 13:18:21 -04:00
David MannandClaude Opus 5.5 b052fd591e Crop: Straighten is one box Undo step (#7127)
The Straighten branch of crop_ui::pointer returned before the press step
was recorded and pushed, although it turns the frame and makes it
pending. With a crop pending, Undo then undid the document (or skipped a
box step). It now records the step like every other frame gesture,
through a shared push_press_step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:15:25 +02:00
David MannandClaude Opus 5.5 617b75597c Image Size: type keeps its pixel size when the resolution changes (#7124)
image.imageSize set the new resolution and then resampled, which scales
the type transform by the pixel factor and re-renders at the new ppi
(text px = pt x dpi / 72): doubling 72 -> 144 ppi made text 4x as tall.
With Resample off the pixels stayed but the next re-render doubled them.

canvas_geom::set_resolution now changes the resolution keeping type the
same size in pixels, as Photoshop does: text space grows by new / old, so
the box and path scale with it and the layer transform undoes that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:08:58 +02:00
dotCooCoo b06a02a3fa Paste: a drawing copied as SVG markup pastes its pixels
Edit › Paste, Paste in Place, File › New from Clipboard and New
Document's Clipboard preset read only images from the OS clipboard:
copied image files, then the clipboard's image, then on Wayland the
other image/* types. When the clipboard held a drawing as SVG markup in
plain text, the paste found nothing and the status bar read "Nothing to
paste: the clipboard holds no image". On macOS and Linux, VectorCraft's
Copy leaves only that markup on the clipboard while Include SVG Code is
on, which is its default, so art copied there did not paste.

When the clipboard holds no copied image file and no image, the reader
now reads its text. Text that photocraft_io::svg::is_svg accepts is
rendered at one pixel per SVG unit, scaled down to fit the SVG import's
limits (16,384 px a side and 24,000,000 px in all), and pastes as a
copied image does, with its transparency. An image on the clipboard
still comes first. Other text, markup that does not parse and markup
longer than 128 MiB paste nothing, as before. The render runs inside
the crash guard that file import uses.

The new photocraft_io::svg::rasterize_rgba8 renders a drawing at its
own size within those limits and shares its render code with
rasterize. The read order moved into clipboard_image, which takes the
three clipboard reads as closures. Tests cover the SVG text paste, the
scaling, the text that pastes nothing and the read order.
2026-10-17 10:05:03 -07:00
David MannandClaude Opus 5.5 fd99c1f464 Perspective Crop: a drag without area leaves no crop box (#7061)
A straight drag (no width or no height) made a zero-area quad that could neither be committed nor replaced by a new drag, only cleared with Esc. Such a drag now leaves no box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:45:34 +02:00
David MannandClaude Opus 5.5 f7203636be Crop: X with a ratio preset turns the frame instead of shrinking it (#7057)
With a ratio preset, X fitted the swapped ratio inside the unswapped frame, so every X shrank it. The frame now turns first and the ratio is then applied to it, so X twice brings the frame back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:45:33 +02:00
skylar taylor-barrick 8c12449819 Save: keep the replaced file's metadata (#6603, #7073, #7094, #7095, #7096)
Saving writes a temporary file and renames it over the target, so everything
attached to the old file went with the file that was unlinked. Several of those
are security decisions, so a save quietly undid them: a download lost its Mark
of the Web, an explicit ACL fell back to whatever the folder hands down.

New crates/format/src/atomic/meta.rs, reached from atomic_write through two
AtomicFs methods (copy_permissions became copy_metadata; replace_existing is new
and defaults to rename, so the failure-injecting test file systems are
unchanged):

- Extended attributes (#6603): flistxattr/fgetxattr/fsetxattr through safe
  rustix, per attribute, best effort. macOS Finder tags, com.apple.quarantine
  (the Mark of the Web's macOS counterpart) and Linux user.* all ride along.
  Attributes the system owns refuse to be written and are skipped;
  com.apple.decmpfs is skipped deliberately, since it describes storage the new
  bytes do not have.
- macOS ACL (#7073): a new macOS-only exacl dependency (MIT).
  fcopyfile(COPYFILE_ACL) is an unsafe fn and fclonefileat(CLONE_ACL) is
  APFS-only and would mean writing every save as clone-then-truncate; the
  reasoning is in docs/decisions.md. A file with no ACL is left alone.
- Windows (#7094, #7096): ReplaceFileW through winsafe's kernel feature (MIT,
  no dependencies, a safe wrapper; the workspace forbids writing the FFI call
  here). One call keeps the destination's DACL, its named streams including
  Zone.Identifier, and its creation time.
- Automation write path (#7095): AuthorizedWorkspace::write copies the replaced
  file's attributes through the two cap-std descriptors, never a path, so a
  request path still cannot escape the write root. Permissions there remain
  #4963; ReplaceFileW is path-based and so is not used on that path.

The order inside copy_metadata matters: attributes and ACL first, permission
bits last. Writing an attribute needs the destination open for writing, so
copying a 0444 mode onto the temporary file first locks you out of your own
temporary file. Covered by a regression test.

Atomicity is not weakened. The metadata step runs on the temporary file before
the swap, never touches bytes, and never fails a save. Windows is the one place
the swap itself changed, and a backup file name is passed because it is a
correctness requirement, not an option: ReplaceFileW without one documents
ERROR_UNABLE_TO_MOVE_REPLACEMENT as leaving the replaced file deleted and the
replacement under its temporary name, which is a failed save that loses the
user's document. With a backup name the same failure leaves both files alone.
ERROR_UNABLE_TO_MOVE_REPLACEMENT_2, the one error that does move things, is
unwound by hand; every other error falls back to the plain rename, i.e. to the
previous behaviour.

THE WINDOWS PATHS ARE UNVERIFIED ON WINDOWS. They were written and reviewed on
a Mac. The #[cfg(windows)] tests -- Zone.Identifier, a second named stream,
icacls output, creation time -- have never executed. They do compile and pass
clippy -D warnings against x86_64-pc-windows-msvc, which is as far as a Mac
gets. CI's Windows job is the first real run, and #7094 in particular (Mark of
the Web surviving a replace) is the whole point of the change and is the part
no one has observed working.

Tested on macOS: a real chmod +a entry and a real Finder tag both survive a
save (checked with ls -le and xattr, and as unit tests), plus a 64 KiB
attribute value, a read-only file, the mode, and the automation path.

Still open: Linux POSIX ACLs are not carried over (system.posix_acl_access is
not reported by listxattr, so it needs its own step; not part of these issues),
and macOS creation time is still reset by a save (that half of #6603 needs
setattrlist, which has no safe wrapper here).
2026-10-17 10:43:09 -06:00
David MannandClaude Opus 5.5 47063c29c5 Merge main into fix/6544-lut-format-roundtrip
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 18:39:12 +02:00
David MannandClaude Opus 5.5 638912f0a6 Merge main into fix/6575-psd-unknown-adjustment
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 18:36:20 +02:00
denstu473 ceb826e270 fix(atn): map Apply Layer Comp steps by name (#7101) 2026-10-17 18:30:57 +02:00
David MannandClaude Opus 5.5 4286ff86a9 Merge main into fix/6550-selected-path-outline
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 18:30:12 +02:00