Commit Graph
647 Commits
Author SHA1 Message Date
Michael Higgins 43ad6f2990 Merge branch 'storytold:main' into fix/5884-delay-load-windows-data-pdf 2026-10-18 09:44:31 -04:00
aiongg 71a5bc44be Merge PR #6499: Desktop: a control/automation flag without its value is a usage error (#6429)
apps/photocraft/src/main.rs: #6499's parse_launch_args is the one parser; it also takes main's --help/-h, -- and unknown-option errors (#6435); usage_exit_code is the one exit helper
2026-10-18 13:19:41 +00:00
aiongg e452f6ad80 Merge PR #6414: Web: a requested download no longer marks the document saved (#4962)
crates/ui-egui/src/lib.rs: Services keeps both main's file_stamp and #6414's write_unconfirmed
2026-10-18 13:16:00 +00:00
Khawar Zamman Wani 1004c19253 Merge origin/main into save-for-web-webp 2026-10-18 14:27:55 +05:30
Khawar Zamman Wani 1b286fb186 Merge origin/main into fix/control-port-zero-logs-bound-port 2026-10-18 14:27:54 +05:30
nrq6993-a11yandCursor a2372a9ce2 Fix rustfmt on viewport_icon for CI format check.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 11:08:41 +03:00
Nicolas FalesyandClaude Opus 5.5 2301ecf9e9 fix(linux): file dialog probe sees a portal with no FileChooser backend (#5739) (#6422)
The probe read the FileChooser `version` property and only counted a few D-Bus
error names as "absent". zbus wraps property errors in `Error::FDO`, and a portal
with no FileChooser backend doesn't export the interface at all, so the read fails
with `InvalidArgs` ("No such interface"). Neither matched, the probe said
"inconclusive", and Save As / Export did nothing without the "No file dialog can
open" notice.

Introspect the portal object and look for the interface instead, and treat
InvalidArgs, UnknownMethod and NameHasNoOwner (as `FDO` or `MethodError`) as absent.

Fixes #5739


Claude-Session: https://claude.ai/code/session_01AfRHB1wHUjrJx6agBYGnVu

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:33:35 -04:00
nrq6993-a11yandCursor 4b88e94f91 macOS: keep bundled Dock icon after eframe loads (storytold/photocraft#7253)
Skipping with_icon on .app bundles let eframe substitute its default glyph once
the window opened; pass IconData::default() so the bundle .icns stays in the Dock.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 09:04:38 +03:00
Codex d3d1506e13 single_instance: the menu override is on and off exactly as main.rs reads it 2026-10-17 20:19:02 -07:00
Codex b5fb2fde62 single_instance: each environment override is off the way it is read 2026-10-17 20:19:02 -07:00
Codex 5c48fa987d Save As on Linux: the one file type offered gives the name its extension
With a single type offered the portal reports no filter, and the dialog opens on the stem (services::dialog_file_name), so accepting the name as shown returned a bare path: Swatches became a file named "Swatches" instead of "Swatches.aco" for the Swatches and preset-export flows. The sole filter's extensions are now used when the answer names no type this dialog offered; several types with no pick still add nothing, and an extension the user typed stays their own (with_chosen_type keeps one it recognises).

Tests: the mock portal answers the bare stem for a single filter and gets back Swatches.aco; chosen_type is also checked directly, so the rule is covered where no dbus-daemon exists to run the portal test.
2026-10-17 19:24:29 -07:00
Codex a465fd2b1c A second launch that sets only environment overrides keeps its own process
PHOTOCRAFT_PRESENT_MODE, PHOTOCRAFT_FRAME_LATENCY, PHOTOCRAFT_STROKE_TRACE, PHOTOCRAFT_IN_WINDOW_MENUS and the two automation roots are documented as the equivalent of the per-launch flags, and a per-launch flag makes a launch keep its own process. A launch that sets only variables left launch_options empty, so it handed its files to the running instance (or merely raised its window) and exited before any override was read. Those variables now count as the flags they stand for; empty and 0 mean off, as with PHOTOCRAFT_NEW_INSTANCE.

Test: each variable maps to its flag, a value that means off maps to nothing, and skip_reason names the flag.
2026-10-17 19:22:42 -07:00
Jeremy YaoandClaude Opus 5.5 cfe8ae5c09 Animation Effects: plainer Linux/BSD reader
- The worker thread shares its latest answer with the UI as a plain
  Option<bool> behind a mutex, instead of a byte that needed encode and
  decode helpers.
- Finding the user's config directory is its own small function.
- In freedesktop.rs, the two dense one-liners in without_portal are split
  into named steps, and the parsers are pub(super) (ini_value private): only
  the animations module uses them.

No change in behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 22:20:54 -04:00
Jeremy YaoandClaude Opus 5.5 0bdac25172 Merge branch 'main' into feature/animation-effects
Brings in 20 commits from main. Two conflicts, both in dependency lists:
- apps/photocraft-web/Cargo.toml: main added the web-sys DomRect feature; the
  list is main's plus this branch's MediaQueryList.
- Cargo.lock: main's, with cargo adding back this branch's one line (the
  desktop app's direct windows dependency).

docs/scorecard.md is regenerated; it differs from main only in UI-217-10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:47:37 -04:00
Vikram Bhaskaran c87af035b7 Merge origin/main into feat/iff-read 2026-10-18 11:56:31 +11:00
Vikram Bhaskaran 4a2a73c226 Merge origin/main into feat/dicom-read 2026-10-18 11:55:26 +11:00
Vikram Bhaskaran cf2d819fad Merge origin/main into fix/5258-psd-open 2026-10-18 11:54:46 +11:00
dotCooCoo a321a69a49 Merge main into fix/paste-svg-from-clipboard 2026-10-17 16:28:37 -07:00
dotCooCoo 8af2ffef6e Merge main into fix/save-added-extension-asks-before-replacing 2026-10-17 16:28:33 -07: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
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
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
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
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
Jeremy YaoandClaude Opus 5.5 5d552d4a60 Animation Effects: one wheel fix, readers split by platform, clearer names
- wheel_nav: unsmooth is the one place that stops the wheel glide. main's
  read_with(smooth) from #5883 did the same for the canvas only, and only for
  plain scrolling; with unsmooth running first in PhotocraftApp::logic it no
  longer changed anything, so read() is the single reader again and the canvas
  calls it as before. #5883's test now drives unsmooth and sits with the other
  Animation Effects tests.
- wheel_nav: arrived and touch become unsmoothed_scroll and in_gesture, with
  plainer docs.
- animations.rs: the Linux/BSD settings parsers move to
  animations/freedesktop.rs (plain functions, tested on every platform), so
  animations.rs reads as one short reader per platform under a table of where
  each one reads from.
- prefs_ui: Runtime::reduce_motion becomes animations_off, to match
  animations_on(); the long animation test is split into three focused ones.

No change in behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:52:09 -04:00
Jeremy YaoandClaude Opus 5.5 382082fd73 Merge branch 'main' into feature/animation-effects
Brings in 433 commits from main. Conflicts:
- scorecard/ui.toml and the generated docs/scorecard.md: main updated the
  UI-217-10 note (canvas dots and Home screen recents are done). The note keeps
  main's text with this branch's animation part; the doc is regenerated.
- crates/ui-egui/src/prefs_ui.rs: main split the section editor into
  field_visible and field_rows; the choice dropdown there now uses
  pref_choice_label again. Runtime keeps both new fields.
- contributors/people.toml: main's version (this branch no longer adds an
  entry).

Main also read the removed interface.enable_animations for its canvas
no-glide change (#5883); the canvas now passes the resolved setting. Spanish
gained the same "On" entry on main, so this branch's copy is dropped, and a
test here follows wheel_nav::read's new parameters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:18:13 -04:00
dotCooCoo a78e9f05fc Save: ask before replacing a file that an added or lowercased extension names
The save dialog asks before replacing only the file it answers with.
After it closes, pick_save can change that path: it gives a name
without an extension the suggested file's extension (#5039), and
Lowercase Extension changes CAT.PSD to CAT.psd. The save then wrote to
the changed path at once, and a file there was replaced without a
question. On Linux this happens when the Swatches panel exports to a
folder that holds Swatches.aco (the one-type portal dialog shows and
asks about "Swatches"), when CAT.PSD is typed where CAT.psd exists, and
in rfd's zenity fallback dialog.

When the path written differs from the dialog's answer and a file
exists there, the save now asks "“{name}” already exists. Replace it?".
Replace writes the file, and ui.dialog.confirm returns the save's
result. Cancel writes nothing and ends the save like the dialog's
Cancel, and Save in the close prompt of an untitled document returns
to that prompt. PhotoCraft counts the file dialog as open until the
question is answered.

A name that reaches the same file, as CAT.PSD and CAT.psd do on
Windows and macOS by default, is not asked about again. The new
same_file service decides this: the desktop app compares device and
inode on Unix and the canonical paths on Windows. The web has no file
stamps and does not ask. The two new strings have rows in all 20
catalogs.
2026-10-17 03:08:09 -07:00
Higgs32584andClaude Opus 5.5 1be48a8360 fix(web): one press per tap, so menus open again on touch (#2095)
In the browser eframe 0.36 turns one finger or pen tap into two primary
presses and two releases: one pair from Pointer Events (pointerdown runs
a frame of its own) and one from Touch Events (touchstart/touchend). The
menu bar titles and press menus toggle on the press, so the twin press
closed the menu the first had just opened.

The web shell's raw_input_hook now drops a primary press that arrives
while the button is already held (pressed within 0.5 s) and a release
while it is already up. A press held longer still passes, so a lost
release can't lock the pointer down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:38:29 -04:00
ZuujisandClaude Opus 5.5 fbcb70b317 Save: ask before overwriting a file another app changed (#6596) (#6652)
* Save: ask before overwriting a file another app changed (#6596) [WIP]

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

* Save: ask before overwriting a file another app changed (#6596)

File › Save now notes the size and modification time of a document's
own file when it is opened or saved, and checks them again before
writing back. If another app changed the file in between, a prompt asks
whether to replace it (Cancel keeps both; Save As saves elsewhere)
instead of silently overwriting the other app's changes.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:19:32 -06:00
Korg1ch 4c881326ea fix(windows): keep crash-recovery autosaves out of the roaming profile (#5648) (#6412)
* fix(windows): keep crash-recovery autosaves out of the roaming profile (#5648)

* test(windows): cover the local recovery folder and moving old autosaves (#5648)
2026-10-16 20:19:06 -06:00
Gustavo Ziger d900daa0ba fix(web): File › Place Embedded is enabled in the browser and places the picked file's bytes (#1209, #5749) (#5585)
With a document open in the web app, Place Embedded was disabled because its menu enablement inherited the engine's native-filesystem check, although the menu path reads the picker's bytes and never touches a path. Place Embedded is now enabled whenever a document and a file-dialog service exist; Place Linked keeps the engine's native guard, since the web could only link to a bare file name (caught in #5817 by Higgs32584). An enablement test runs with the native check forced off, and a file-dialog test covers the browser answer shape, cancel, invalid bytes and the Free Transform handoff.

Fixes #1209. Fixes #5749.
2026-10-16 17:38:56 -07:00
Higgs32584andClaude Opus 5.5 c9334c4661 Windows: a maximized custom-title-bar window lets an auto-hidden taskbar show (#4845)
An auto-hidden taskbar reserves no work area, so the maximize guard left the
caption-less window covering the whole monitor and the shell treated it as a
full-screen app, never revealing the taskbar. On each monitor edge with an
auto-hidden taskbar (found via Shell_TrayWnd / Shell_SecondaryTrayWnd through
safe winsafe calls) the window now stops 1 px short of the monitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:39:39 -04:00
David MannandClaude Opus 5.5 22217e6ab2 CLI batch: skip shell-only Save and view steps inside played action sets (#6860)
Batch strips Save/Save As/zoom steps from every action of a loaded set, called actions
included, and remaps their unchecked/dialog step indices.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 01:32:48 +02:00
wwew 93f6376c5e docs: write product name as PhotoCraft in package descriptions and comments (#5615) 2026-10-16 16:59:41 -06:00
wwew e33384c9ba docs: write product name as PhotoCraft in crate module docs (#5455) 2026-10-16 16:58:50 -06:00
wwew 651647fdf6 docs(cli): write product name as PhotoCraft in USAGE and description (#5449) 2026-10-16 16:56:48 -06:00
Higgs32584andClaude Opus 5.5 7b32097e2a Intel Iris Xe on DX12: no more red blocks in brush previews and tool icons (#6790)
wgpu-hal 30 creates Iris Xe textures as committed resources (its
gfx-rs/wgpu#3552 workaround) with D3D12_HEAP_FLAG_CREATE_NOT_ZEROED, and
egui-wgpu fills each new texture with a single copy. On this driver the
copy leaves 4x4 blocks of all-zero texels showing stale memory, so the
empty corners of Brush Preset picker strokes and tool icons show freed
textures' pixels (often red).

ui-egui's new texel_guard plugin rewrites fully transparent texels in
each frame's texture uploads as premultiplied (0, 0, 0, 1) before eframe
renders them (under one 8-bit level of difference). The desktop app
installs it only for DX12 on "Iris(R) Xe", the same adapter test wgpu
uses; PHOTOCRAFT_TEXEL_GUARD=1/0 forces it on or off.

The gpu example zero_block_probe reproduces the driver bug without the
UI: 630/1500 egui-style uploads read back wrong, 0/1500 with the guard.
Driving the release app (tool cycling, picker rescaled): 6/40
screenshots with red blocks before, 0/120 after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:40:42 -04:00
Marco Arnulfo b4e0d2491d macOS: Beep When Done plays the system alert sound (NSBeep) instead of a terminal bell (#6537) 2026-10-16 19:24:17 +02:00
highperfocused 4d6f3f4d1e style: cargo fmt (review on #6499) 2026-10-16 11:31:52 +02:00
highperfocused a08992c9d9 Desktop: a control/automation flag without its value is a usage error (#6429) 2026-10-16 09:14:24 +02:00
denstu473 ef2eed6d4f Fail control startup promptly when its loopback port is occupied 2026-10-16 08:55:15 +02:00
jonathnwxh 670ca40804 Merge upstream and retain both save-type and clipboard regressions 2026-10-16 13:58:18 +08:00
Khawar Zamman WaniandClaude Opus 5.5 8ac3df9c32 test(photocraft): mock portal subscribes before the client calls SaveFile
The mock made its MessageIterator inside the spawned thread. A zbus stream
only sees messages that arrive after it is created, so on a loaded runner the
client's SaveFile could land first, go unanswered, and hang the test until
nextest's 600 s timeout (a_typed_extension_wins_over_an_untouched_file_type
on ubuntu-latest, PR #6468).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:21:41 +05:30
JGF 2a952f164c Windows/Linux: open files in the running PhotoCraft instead of a second instance (#3708) (#3755)
Fixes #3708; part of #1540 (Flatpak needs its own follow-up: each sandbox has its own loopback).

A second launch hands its files to the running instance over an authenticated loopback channel (random port, 32-byte token in a private instance.json, constant-time check, bounded clients, requests and paths). Files are acknowledged only once the UI has taken them; the instance shuts the hand-off down before a CPU-compatibility relaunch; it runs only in the per-user settings mode. --new-instance and PHOTOCRAFT_NEW_INSTANCE=1 opt out.

Thanks to @MrCloudy2 (#2358), whose Linux version first handled the relaunch and per-user endpoints, and @Desayuno64 (#5273), whose shutdown flag and read deadline informed the final design.
2026-10-15 22:48:30 -07:00
Khawar Zamman WaniandClaude Opus 5.5 12c43aaa49 Save for Web: WebP, lossy at its Quality or lossless (part of #6391, #2415)
Save for Web (Legacy) gains a WebP format: lossy through our VP8 encoder at
the dialog's 0-100 Quality, or lossless (new `lossless` param). Translucent
pixels keep their alpha as in PNG-24 (matte when Transparency is off); Embed
Color Profile and the Metadata choice apply as for JPEG. The lossy preview
decodes the file so its artefacts show; 4-Up halves a lossy quality.

AVIF and JPEG XL from #6391 are not included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:38:36 +05:30
Khawar Zamman WaniandClaude Opus 5.5 eee8d8c4ea fix(photocraft): --control 0 logs the port actually bound (#6427)
With port 0 the OS picks a free port, but the control server printed the
requested one (`127.0.0.1:0`), so a client had no way to find it. It now
prints `listener.local_addr()`, like `photocraft-cli serve` does, falling
back to the requested port if the OS can't report it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:34:52 +05:30
58f855a40f Save As on Linux: the file type picked sets the extension (#6121, #4328, #4394) (#6151)
* Save As on Linux: the file type picked sets the extension (#6121, #4328, #4394)

The GTK file chooser behind the desktop portal keeps the typed name when
another file type is picked, and rfd 0.17.2 reads only the file name from
the portal's answer, so Untitled-1.psd with PNG picked was written as a
PSD. On Linux, Save As now asks the portal's FileChooser.SaveFile itself
(over the zbus already used for the portal), reads current_filter, and
gives the name that type's extension: an extension PhotoCraft saves is
replaced, none or another is appended. If that names an existing file, the
dialog opens again under the new name so the portal asks before replacing
it. rfd remains the fallback without a portal, and this can go once an rfd
release reads current_filter (PolyMeilex/rfd#341).

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

* Save As on Linux: keep typed extensions, open on the stem, follow the request handle

Review follow-ups, checked on real GNOME 46 and KDE Plasma 6.7.5 sessions
(Wayland and X11):

- An extension the user typed is kept, as in PolyMeilex/rfd#341: only a
  name with none, or still with the extension the dialog opened with, takes
  the picked type's. GTK reports the type even when it is untouched, so
  art.png with the PSD type left alone was saved as art.psd.
- The dialog opens on the stem (test), as on Windows (#4407): with
  test.psd in the name and PNG picked, GTK asked to replace test.psd,
  which the save leaves alone. A name that then exists is asked about
  again under that name; the rule compares against the suggested name, so
  a test.psd GTK completes back still becomes test.png.
- Response 2 (GNOME's dialog closed with Esc) is a cancel: it fell back to
  rfd, which opened a second Save As.
- The answer is awaited on the handle SaveFile returns, which a portal
  older than 0.9 picks itself (the Request documentation).

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

* style(automation): format smart filter refresh closure

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
2026-10-15 22:47:17 -06:00
skylartaylor 8f58ea4629 ci: integrate current main while retaining strict test gates 2026-10-16 05:25:24 +02:00