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.
next now carries storytold/craft-libs#2977 and #2978. craft-develop stays
at main's craft-libs rev c42c34bfa, which is not on next.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings storytold/craft-libs#2919 (layer eye stays empty, #16321),
#2929 (About tab spacing, #16325), #2931 (Space after an Alt tap,
#16327), #2932 (scroll bar range and drag, #16328, #16329), #2934
(grip ticks and the toolbar grip, #16332, #16333) and #2939 (About
stays inside the window, #16326).
The Overscroll scroll bar test follows the new range: the document
plus, on each side, the visible length less 100 screen points.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
craft-libs 77c7c623 brings storytold/craft-libs#2830 (#2812: panels and
widgets read the modifiers, not the pointer frame) and #2860
(RasterDisplay::region_fill). With it a canvas hover replays every
panel body, and the hover trial now requires that.
Versions, from the review:
- every version holds the preferences' revision: Preferences' Apply and
OK and other prefs writers run no counted command (units on the
options bar and Info panel);
- the Navigator's version holds the adjustment preview its picture
shows, as the Histogram's does;
- the Histogram's version holds when its histograms landed, since the
worker lands them with no command or revision;
- the options bar's version holds whether a canvas gesture runs (the
symmetry menu's Transform entry);
- Home counts as the Properties panel not shown, so its Reset session
starts anew after a Home visit.
The chrome trials look at the whole frame (a view that ran in a
discarded pass and replayed in the last counts as run); the language
check counts the tab rows frame-wide, since the new titles take a
second pass.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in storytold/craft-libs#2758 (New Document: Background Contents
before the advanced fields, the save-preset icon on the Name row, section
captions), #2762, #2767, #2770, #2729, #2785 and #2569.
previews, stroke trails and Object Finder hover masks now take a Serials.
The app holds one (texture_serials) for all of them, since a preview of one
name is made in several places (a transform begins in one, re-renders in
another). The Object Finder job sends the region only; its mask is made on
the UI thread, as a cache hit's already is.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
craft-layers keys tree ids by their Hash (craft-libs#2774), so photocraft-doc depends on craft-tracked and craft-ui-macros instead of craft's ui feature, and the layering check passes.
The dock keeps an Arc<Workspace> and a Tracked spec model, the toolbar rail
takes Tracked slots, the Layers panel holds its rows as plain data in a
Tracked, and the menu bar is a Tracked model keyed for the native menu's
sync. PhotoCraft states the Creative component set. Export As lists its
resample methods, and layer.exportAs describes them, in the engine's order.
Part of #15476
next now has storytold/craft-libs#2550 (the default agent folder and the
agent_folders answer), #2612 (snap targets reach past their spans), #2631
(scroll bar arrows take no keyboard focus) and #2634 (Enter in the hex
field confirms).
- next vendors vello_common and vello_cpu for hayro; the patch section
follows it.
- craft_pdf::raster::Options gained max_coverage; the PDF importer keeps
craft-pdf's default (None).
- storytold/craft-libs#2363 gates a component's story-suite registration
on its crate's own `suite` feature and emits it ungated without one,
which needs craft's test kit in every build. ui-egui declares `suite`
(off): PhotoCraft runs no craft story suite.
craft-libs next merged storytold/craft-libs#2533: memoized views replace
the settling regions. The app follows it:
- the shell slots, the dock chrome, the panels and the tool rail no
longer take content versions (the framework memoizes them), so the
region versions and their trial go, with the keys that only fed them;
- Tool is MemoProps, as the tool rail's props;
- the menu bar's English-name hook is a capture-free function, reading
the names the bar's model published;
- request_own_repaint is request_repaint;
- the drag trials count replayed memoized views.
Snap targets reach past their spans (reach_past_spans), as layer edges do
in the reference application; this needs storytold/craft-libs#2612.
Moves every craft-libs dependency to storytold/craft-libs next 62189858a
and egui to the fork rev that next pins (6525c879). This brings
craft-libs#2424 (Home screen rail and empty-state card) and the Home
screen spacing fix.
Call sites follow the new craft-libs API: Picked gained Failed and
Downloaded (a failed save keeps its message, a browser download counts
as nothing chosen, as the app writes its own saves), SettingsDocument's
apply is the PreferencesDraft trait method, and the control channel's
document map takes the page index (one page per document).
Every craft-libs git dependency (craft-psd, craft-svg and craft-ipp included) and the vendored
hayro, krilla and linesweeper patches take one rev, and egui follows the rev craft-libs next pins.
#15684 replaced crates/ipp/src/lib.rs with a re-export of craft_ipp and
dropped the crate's forbid(unsafe_code) and never-crash deny lines. The
scorecard counts that attribute on every crate root, so docs/scorecard.md
went stale on main and `scorecard::tests::staleness_check_and_determinism`
and the lint job's `scorecard` step fail on every pull request.
This puts the two lines back, so the scorecard reads 25 of 25 again and
matches the committed docs/scorecard.md.
read_response searched every byte read so far for the blank line after
each read, so a server trickling a 16 MiB reply in tiny fragments made
the client rescan it once per fragment. Resume the search three bytes
before the previous end.
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.
The released-port version only proved the port was unused a moment earlier. Between
drop(free) and the connect, another process can be handed that exact ephemeral port,
and the case then reports a protocol error or blocks instead of Unreachable - the
same flake this branch was meant to remove, just quieter.
connect() now goes through open_tcp(host, port, addr, open), a private helper that
takes the connect call as a parameter. The refusal test decides what is closed, so it
owns no port: it asserts Unreachable, that the message names the endpoint, and that
the reason the connect failed survives. The end-to-end "nobody reachable" case now
names a host that can never resolve (RFC 2606) rather than a port nobody owns.
Fake-server protocol tests are unchanged, and no public injection point or dependency
was added.
`CUPS_SERVER=fe80::1%3:631` parses as `Tcp("fe80::1%3", 631)`, and host() wrote `[fe80::1%3]:631` into the HTTP `Host:` header and into the `ipp://` printer-uri. A bare "%" is not valid inside an authority - RFC 3986 section 3.2.2 reserves "%" for escaping - so a strict HTTP/1.1 server can answer 400 and the printer-uri is not a readable URI.
The zone is now written "%25"-escaped for the wire and kept raw for the socket, which is the only place a scope means anything (measured on Windows: `("fe80::1%3", 631).to_socket_addrs()` gives `[fe80::1%3]:631`).
The two reviews disagreed about the form. Codex-cloud (fork #68) cited RFC 6874; CodeRabbit here pointed out that RFC 9844 (Aug 2025) obsoletes RFC 6874 and suggested dropping the zone from the authority. Dropping it was considered and not taken: it would send `Host: [fe80::1]:631` and `ipp://[fe80::1]:631/...` for a server reached at `fe80::1%3`, naming a different and ambiguous link-local host from the one the socket opened to, and it would rewrite the printer-uri a queued printer is registered under. The escaped form is what CUPS, curl and the ipp:// URIs CUPS writes use, and current URL libraries (yarl) still read "%25" as the URI form of a zone while rejecting a bare "%".
Regressions: numeric zone ids in both authority forms, an interface-name zone, the raw host after parse, and the unchanged IPv6/IPv4/hostname authorities. The printer-uri assertion no longer echoes host() back, so it pins the authority the fake server receives. Reverting the escape fails the new assertion (checked).
Platform limit, unchanged by this commit: an interface-name zone (`fe80::1%eth0`) does not resolve on Windows (getaddrinfo 11001), so only numeric scope ids are usable there, and the client reports that as `Error::Unreachable`.
cargo test on a standalone copy of the crate: 11 passed / 0 failed; cargo clippy --all-targets -- -D warnings and cargo fmt --check clean.
Codex-cloud's review of this fix found two more places where an IPv6 print server did not work.
host() feeds the Host: header and the ipp:// printer-uri, and it wrote the endpoint the way it is stored: "::1:631". The last colon reads as the port separator, so CUPS got a malformed authority and a malformed printer-uri even though detect() could now connect. An IPv6 host is bracketed there, and in Display, which is what the user is shown; to_socket_addrs still gets the bare address, which is what it needs.
A bracketed endpoint with anything else after the bracket - "[::1]:abc", "[::1]:70000", "[::1]junk" - fell back to the default port, so a mistyped CUPS_SERVER was accepted whenever something answered on 631 and jobs went to an endpoint nobody configured. The whole string now stays the host: it cannot resolve, so detect() reports it unreachable.
Tests: an_ipv6_endpoint_writes_its_authority_in_brackets, and three mistyped endpoints in the parse test. Both fail before this commit and pass after. photocraft-ipp 11 passed / 0 failed; clippy --all-targets -- -D warnings and fmt --check clean.
The last case of error_statuses_and_broken_replies_are_errors called printers(&Endpoint::Tcp("127.0.0.1", 1)) and expected Error::Unreachable. No port is guaranteed closed: on a FreeBSD CI VM something accepted on port 1 and reset the connection, so the client got as far as sending and the test failed with "print server reply: sending: Broken pipe (os error 32)" instead.
Bind 127.0.0.1:0, read its port and drop the listener, so the case uses a port the OS has just released, and keep the assertion. The fake() helper in the same file already takes its port that way.
A held port really does read differently, which is why the old case asserted a property of the machine rather than of the client: against a listener that accepts and closes immediately, printers() returns "print server reply: reading: An existing connection was forcibly closed by the remote host. (os error 10054)" on Windows, not Error::Unreachable.
cargo test -p photocraft-ipp: 9 passed / 0 failed, the changed test five runs in a row; clippy --all-targets -- -D warnings and cargo fmt --check clean.
Endpoint::parse split the server string on its last ':', which is wrong for an IPv6 literal: "::1" became host ":" on port 1, and "[::1]:631" kept its brackets inside the host, which to_socket_addrs cannot resolve on Linux or macOS. An IPv6 CUPS endpoint was therefore always refused by detect(), even when CUPS was listening on it.
A bracketed server now takes its host from inside the brackets and its port from after them. A bare address with more than one ':' is the host with the default port, because its last ':' cannot be told apart from a port separator; a zone id (fe80::1%eth0) carries no ':', so a port can still follow it. host:port, a bare host and a socket path are unchanged.
Test: "::1", "[::1]", "[::1]:631", "[fe80::1]:6310", "fe80::1%eth0:631", and the cases that already worked. Fail before, pass after.
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.