A session you joined or published now says where your changes stand on
their way to the server, and calls them saved only once the server has
confirmed them: Preparing, Uploading (bytes sent of the total), Waiting
for the server to confirm, All changes saved to the server (with when),
changes not yet saved while reconnecting, and when the server last had
everything after a failure.
The Share popover shows the line with a progress bar; a tab whose changes
have been on their way for a second shows a thin bar and the line on
hover. collab.peers reports upload and confirmedAt. The desktop
connection counts what it writes, a large change in 256 KiB pieces, and
reports it to the session's inbox; the browser can't measure its socket
and shows waiting.
* M6: Open and import Adobe XD (.xd) files, best effort (#2077)
The archive's artboards, pasteboard layers, groups, rectangles, circles,
lines and paths, solid, linear-gradient and image fills, strokes, opacity,
drop shadows and blurs, clip paths and text with styled ranges are mapped
onto the REST importer, as the .sketch import is. Point text is measured
so its first baseline and aligned edge stay where the file put them.
File > Open, Import, drop, CLI and MCP take .xd files, in the browser too.
* M6: XD import: clip paths take only shapes, one style range keeps its decoration, groups refit after point text (#2077)
From review: a clip path holding a group clipped by itself recursed without end;
a single style range covering a whole text dropped its underline or strikethrough;
groups kept the bounds of the guessed text size after the point text was measured.
* M11: a plugin can read the web hosts its manifest names (#1883)
A plugin can read fresh data (catalogues, tokens, translations) from exact hosts it names in permissions.network (plugin API 9: allowedDomains, methods GET/HEAD). The new http_request host import asks FigCraft for an https:// address on one of those hosts; FigCraft makes the request through the session's network link with no credentials, follows no redirects (the plugin gets status and location), allows 8 requests per run or callback and fails a response over 4 MB. Any other scheme, host, port, user info or method is refused before anything is sent, and a session confined to automation roots makes no requests.
Importing such a plugin needs the user's approval: plugin.import takes confirm: true for it and check: true to report what a manifest asks for without installing it; the app's import shows the hosts with Import and Cancel. Manage plugins lists the hosts. A plugin directory entry can't show the hosts yet, so directories neither publish nor install such plugins. The SDK gains http_request.
* Plugin web requests reach only public addresses, and an approved import must match what was shown
Review fixes for #1883. A plugin's request uses no proxy and a resolver that keeps only public addresses, so a host that resolves to this computer or the local network (an approved name rebinding to one included) is refused when it connects; IP literals are refused in permissions.network. The app's Import passes the network permission it showed as confirm, and plugin.import refuses a manifest that now asks for other hosts or methods (confirm: true still works for scripts).
Preferences > Redraw layers while dragging (`pref.liveDrag {on?}`, on by
default, Shift+Cmd/Ctrl+D). Turned off, a move renders the document the drag
started from, so the layers stay where they were and only their selection
outline follows the pointer; nothing is rendered until the release draws them
at their new place. The shortcut says at the bottom whether it is on or off,
and the main menu's Preferences shows a check mark.
* M7: variables export as Uno Platform theme resources (#2170)
* M7: Uno variables export keeps a one-mode alias's Dark value and warns about what it leaves out or cuts
* M7: an Uno variables export value resolved in one theme only goes in that theme's dictionary
* docs: how the Uno variables export picks a collection's Light and Dark modes
With team_publish = true beside team_files = "edit" (refused with
open_publish), everyone who reaches the server publishes from the app or the
browser with its plain address. The file is on the team list (Home > Online)
for everyone at once, until it is removed, so nobody keeps share links or
tokens to find it again. Such files never expire; whoever published one gets
its owner token, so their app renames, removes or shares it from Home >
Online as on a public server.
The server reports open: true with no idle time, so the existing Publish and
Share flows work unchanged and apps of any version publish there; no message
changed. meta.json marks the file `team`, which counts as shared for the
list, its team link and admission, and which the idle sweep skips.
figcraft-server healthcheck asks the server on the listen address for /healthz (exit 0 on 200, 1 otherwise), and the distroless image declares it as its HEALTHCHECK. packaging/server/docker-compose.yml builds the image and takes its FIGCRAFT_SERVER_* settings from a .env file beside it, with trusted_proxy defaulting to Docker's address range and the port on loopback. docs/server.md covers the subcommand, Compose, and running behind a platform proxy that ends TLS. Part of #2044.
macOS claims both extensions in a Viewer/Alternate document type, Windows
adds an OpenWithProgids entry and SupportedTypes without taking the
default, and Linux defines MIME types for both (with a content match so
.fig design files are told apart from xfig drawings). None of it names
another product's type identifier.
* perf(recovery): cancel in-flight recovery writes off the UI thread
* fix(recovery): wait for a cancelled write's cleanup before copying again
The cleanup of a cancelled write removes {uid}.figcraft and {uid}.online,
the same files a new write of that document creates. A document edited
again before that cleanup ended could lose its new copy. Cleanups are
now tracked by document, and a new copy waits for its cleanup (an
emergency save waits on it instead of skipping).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(recovery): keep a cancelled write tracked if its cleanup can't start; drain on quit
- If the recovery-cleanup thread can't start, the cancelled writer is no
longer detached: its handle and paths stay reachable and that rare case
waits for it, so it can't remove a later copy of the document.
- Quitting without asking waits for cancelled writes' cleanup before the
emergency copies, so a saved or closed document's copy can't survive the
exit and reopen at the next start.
- The replace test holds the writer on a channel instead of sleeping, and
checks the replacement waits for the cleanup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
* M5: Export prototype as HTML: the page's prototype as one self-contained file that opens offline (#2886)
File ▸ Export prototype as HTML… (`file.exportPrototypeHtml {path?, page?}`)
writes every visible top-level frame of the page as an embedded image and each
layer's click interaction as a link: navigate to, back and open link (http,
https, mailto). It opens from a local or network folder in any browser with no
network, account or other software. What it can't play (other triggers,
overlays, scroll to, change to, variables, transitions) is listed in the
result's `warnings` and counted in the toast.
* fix(engine): prototype HTML export skips zero-size frames and keeps Back inside the page
* fix(engine): prototype HTML Back only returns to screens the prototype showed
* fix(engine): prototype HTML reports a click's links after its first (#2886)
* fix(engine): prototype HTML export skips frames in hidden sections and reports delays, extra links and section memory
* fix(engine): prototype HTML reports scrolling frames (#2886)
A branch event for a busy tab is put back unchanged until the gesture
there ends. It was counted as processed, so a long run of them could cut
every pass short with nothing applied. The headless drain
(`while live_poll && live_backlog`) then spun until that gesture ended,
which only a later call can do. Such events are now set aside before the
slice check, so each cut-short pass has applied at least one batch.
Follow-up to #2893 (CodeRabbit finding on crates/mcp/src/headless.rs).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf: eliminate UI-thread freezes on save, recovery, MCP render, and Local Share
* Background save runs file.save's own checks, one save at a time
- file.save and the background save share one prepare/write/commit path:
branch tabs are synced first, unknown params, another tab holding the file
and the overwrite check refuse as file.save does, and a save under a new
name leaves the tab saved.
- One save at a time: an MCP file.save waits for the save in flight and
Save chosen again saves once more after it; a panicking worker ends the
save with an error instead of blocking every later one.
- The worker writes under the roots the frame ran in (an agent's shortcut).
- Only Save in the menu and its shortcut write in the background; other
callers (library publish) still save before they go on.
- Recovery: a new copy of a document waits for its dropped copy's cleanup,
which would otherwise remove it.
* Saving again saves the tab it was chosen in; ui.render draws the selection
- Save chosen while a save is written is kept per tab and runs for that tab
once the write is committed, not for whichever tab is in front by then.
- ui.render on a worker picks its layers as file.export does (the ids given,
else the selection, else the page): file.export's choice is now one
engine function, export_ids, used by both.
* Save chosen again keeps the file access roots it was chosen under
A Save queued behind the save in flight remembers the roots of the frame
that chose it (an agent's shortcut) and runs inside them, not the app's.
* Recheck the file right before a save replaces it; recovery cleanup survives a failed spawn
- A save remembers its own file's state on disk when its checks passed and
refuses to replace it if another app changed it while the new file was
written (the background save can take a while).
- A dropped recovery copy's cleanup is a guard: if its helper thread can't
start, it runs on the calling thread instead of leaving the copy behind.
* A revert or a discarding close stops a background save from replacing the file
A background save holds a gate while it replaces the file; file.revert and
file.close (once it is closing) shut the gates of the tab's saves first, so a
save still being written no longer puts back the edits the tab went back on.
A save replacing the file at that moment finishes before the revert reads it.
---------
Co-authored-by: Jeremy <jeremy8776@googlemail.com>
* M6: Link instances to library keeps edits made after the import, and the import keeps no instance swap ids (#2442 follow-up)
library.relink read the text and boolean values kept at import even when the
frame's text or visibility had been changed since, so the edit was lost; it
now reads each value from the frame's layer in the place of the main's bound
layer, falling back to the kept value. The import no longer keeps instance
swap values: they named a layer by its id in the importing file, which a copy
of the frame into another file carried along unchanged. Docs: what
`unlinked` counts when one library is named.
* M6: Link instances to library keeps an edit when the import kept no property values (#2442 follow-up)
props_for returned nothing when the frame had no kept values, so a text or
visibility edit made after the import was lost. It now also reads each text
and boolean property the import kept no value of from the frame's layer, and
keeps it when it is no longer the main's default.
* M6: Link instances to library keeps an edit to a layer renamed after the import (#2442 follow-up)
props_for found the frame's layer for a property by its name path, so a layer
renamed after the import lost a later text or visibility edit. It now reads the
layer the import left bound to the property first, whatever it is named, and
falls back to the name path.
* M6: Link instances to library reads a property's layer only among the main's own layers (#2442 follow-up)
The name-path fallback in props_for also matched layers inside the main's
nested instances, which bind their own component's properties; it now uses
the same ownership walk as the bound-layer lookup. A test covers a boolean
property found by the name path (a label hidden after the import).
FigCraft draws its own title bar on GNOME, but it dropped the window-button
layout the shared window crate reads and always drew Windows' square
minimize, maximize and close at the right. The bar now keeps that layout
(UiState::captions): the buttons sit at the left or right end as the
desktop's button-layout says (Close alone by default), as round buttons on
a faint disc, placed by craft-ui's CaptionPlan. Windows keeps its buttons;
KDE and other desktops that draw their own frame are unchanged.
- The version budget now checks the stored snapshot's size (with its ZIP
headers, or a fallback re-deflate) before keeping it, and charges that
same size. A saturating subtraction no longer hides an overshoot.
- Loading from bytes parses the raw zip only when the archive has history,
as loading from a file already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
live_poll only cleared it when no network events came in (the && short
circuit), so a busy connection kept live_backlog true after the backlog was
gone and the headless drain kept polling.
The time-sliced pass left batches waiting with nothing to wake the UI, so they
sat until the next input or network event. live_deferred now records that it
stopped on its budget (Session::live_backlog); the UI asks for another frame
while that holds and the headless MCP session drains the backlog before each
command. The budget uses web_time so the web build slices too.
Opening a file read version snapshots oldest first against MAX_VERSION_BYTES
(1 GiB) of inflated JSON. Loaded versions now stay compressed in RAM, so the
budget counted bytes that are never held. A real 81 MB file with 11 versions
(2.1 GB inflated, about 70 MB compressed) lost its 3 newest autosaves on open,
and the next save deleted them for good. The budget now counts each kept
snapshot's compressed bytes; every member is still inflated once on open,
within MAX_MEMBER and the archive-wide unpacked limit, so damage still shows
early. New test: version_budget_counts_compressed_bytes (keeps 1 of 3 before).
The in-memory and streaming saves wrote the same members with duplicated code
(SonarCloud: 4.9% duplication on new code). Both now call
version_store::write_archive.
Also from review: the lazy open reads raw version members through a duplicate
of the already-open handle instead of reopening the path by name, so a file
renamed over the path meanwhile cannot be mixed in (CodeRabbit). cargo fmt and
a needless as_deref_mut flagged by clippy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>