collab (dst_fault_tests, 32 seeds): asymmetric partitions where a legacy
and a current client are cut off while the rest push the server past its
log, mid-flight drops with offline edits queued, one-way link stalls, and
per-user undo/redo mixed with layer, style, variable, comment, component
instance, main component and page edits. Every seed must catch up from
the log, a compressed snapshot and a plain snapshot, and end converged
and valid with monotonic sequence numbers, no undo violations, and no
remembered-deleted id live in the document.
Sim gains additive hooks: set_version (reconnect as an older app), stall
(one-way, order-keeping delay) and per-kind catch-up counters.
figcraft-server (dst_crash_tests, 24 seeds): the real Store with small
compact_after, clients acked only after a clean flush (as the hub does),
crashes before a flush, mid-flush with the log cut inside the new
records, and after a flush before acks, plus everyone-leaves idle/park.
After each restart the file is exactly the server's state at some seq no
earlier than the last durable point or anything a client heard; torn
tails are reported and later appends survive; clients resume with their
ids, lose no queue and converge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host page that opts in with `?save=managed` (or `data-save="managed"`
on the canvas) now gets each Save and Save As of the document with an
`id` (`save-1`, `save-2`, ...), and the document keeps its unsaved
changes until the host answers `figcraft:saved` with that `id`. Hosts
that don't opt in see no change: a file still counts as saved once it is
posted.
- `host_saves.rs`: the bookkeeping, apart from the browser so it is
tested natively. One save waits at a time; a newer one replaces it;
answers for any other `id` are ignored; a file the host opens forgets
the waiting save; a save unanswered after 30 s counts as not stored
(the clock is passed in). A Save As becomes the document's file only
once confirmed, so a retry after a failure is still `saveAs: true`.
- `host.rs`: the listener only queues what the host sent; the shell
handles it in order each frame. Exports and copies carry no `id` and
`saveAs: false`. A timeout tells the user and posts `figcraft:failed`
with the `id`, and the app wakes itself for it.
- ui-egui: `Services::deliver_document` hands the document's own file
over (its default is `download`, so desktop and plain browser saves
are unchanged). `Delivery::Pending` skips `file.markSaved`;
`FigApp::document_stored` and `document_not_stored` finish the save.
- engine: `FileSnapshot::delivered` marks the snapshot's tab saved as of
the snapshot, so edits made while the save was in flight stay unsaved,
and a tab closed or saved since is left alone. It shares its tail with
`FileSnapshot::save`.
`craft-web-host` at the pinned rev has no host-to-app refusal message
and no `host {confirmsSaves}` handshake (storytold/craft-libs#1338), so
a host's refusal shows as the timeout until the crate adds them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`export`, `convert` and `run --out` take `--strict`. When the .fig,
.penpot or Android Vector Drawable writer reports anything left out or
changed, nothing is written or replaced and the command exits 1 with the
reasons on the error line. A folder of drawables is written only once
none of its files leaves anything out. `--strict` with an output whose
writer reports nothing (png, svg, pdf, ...) or with `--vd-compat ignore`
is a usage error (exit 2), so it never passes without checking anything.
A .figcraft output is accepted for convert and run: it keeps everything.
.fig export writes a vector whose filled areas use both winding rules as
one fillGeometry path per rule, so other readers fill each area as the
network does. The warning that the outline used the first area's rule is
gone.
Image adjustments, list spacing, hanging punctuation and lists, and
vertical trim were already written on main. OpenType features,
variables' publishing, code syntax and inheritance settings, prototype
device settings and text styles on part of a text keep their warnings:
the .fig import (craft_fig's mapping at the pinned craft-libs rev) does
not read them back, so they cannot round-trip yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With all 8 connection slots taken, a new client now takes the slot of
the connection that has waited longest for its client; a connection
whose request the app is running keeps its slot. Request lines are
counted as they arrive against 64 MiB shared by all connections until
they are answered, so eight clients can no longer make the app hold
eight 32 MiB lines and their parsed trees.
Replica::from_snapshot borrowed the changes and cloned the whole
Vec<Change> before applying it, because the review-settings clamp
rewrites some of them in place. Every caller already owns the snapshot
(Client::join, the rejoin path, Server::restore), so it now takes the
Vec by value: a large file's snapshot is no longer copied and then
dropped twice on the way in. The server's publish path still borrows
and copies explicitly.
In a wasm32 build joining a 120k-layer file through the full-snapshot
catch-up (what an older server sends), this cut peak memory from 722 MiB
to 455 MiB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching the input language on Windows (Alt+Shift or Win+Space to a
Russian layout) or typing in it hung the app. A Windows start offered
wgpu Direct3D 12 and OpenGL together, and wgpu's OpenGL backend makes a
hidden window on a thread that handles no window messages as soon as its
instance exists, even when Direct3D 12 draws. Windows hands the language
change to every thread with a window, so the main window waited on that
hidden one. The reporter confirmed WGPU_BACKEND=dx12 avoids it.
A Windows start now offers Direct3D 12 alone. Vulkan and OpenGL stay as
restarts after a failed start, each on its own, and OpenGL with lower
limits is added last so the old lowered Direct3D 12 + OpenGL attempt's
reach is kept. A GPU with no Direct3D 12 driver (Intel Haswell, which
wgpu leaves out of Direct3D 12, and older GPUs) now draws on Direct3D
12's software adapter instead of its OpenGL driver.
Not run on Windows; the attempt list is tested.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main moved figcraft-cli to RFC-0018 (#2645): main.rs is a thin wrapper and the
dispatch lives in lib.rs, so mcp_roots, the --automation-allow-server handling
and its test move there; headless mcp is checked before the fonts are scanned.
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2).
Conflicts: crates/ui-egui/src/dialogs/updates_ui.rs (main's optional updater for the Nightly, applied to the port's DialogHost update flow: tick and show skip when there is no updater).
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
The files named on the command line opened before the preferences were
read, so file.open saw no kept views: such a file opened fitted instead
of where it was left. It also put the file at the top of the recent
files, and the preferences read just after replaced that list.