5995 Commits

Author SHA1 Message Date
BFlat c2d599bc76 Merge pull request #2949 from storytold/feat/338-2945-show-upload-progress-and-se
M9: show upload progress and server-confirmed sync status (#2945)
2026-12-03 02:51:40 +07:00
BFlat a751a4045f Windows: full screen from a maximised window covers the taskbar's strip (#2943)
* Windows: full screen from a maximised window covers the taskbar's strip (#2941)

* Run CI again
2026-12-03 01:56:46 +07:00
BFlat 83100f906c Merge pull request #2907 from storytold/cp/226-1680-feature-request-figcraft-co
M4, #1680: notched (inside square) corners, and .sketch corner styles stay live
2026-12-03 01:51:05 +07:00
bflatastic f512b80ed4 M9: a publish that fails before the server answers reports its upload as failed (#2945) 2026-12-03 01:45:00 +07:00
bflatastic 06733df25c M9: a dropped connection leaves no upload progress behind (#2945) 2026-12-03 01:38:24 +07:00
bflatastic a9db939688 M9: show upload progress and server-confirmed sync status (#2945)
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.
2026-12-03 01:02:17 +07:00
BFlat 6975590011 docs: install with brew install --cask figcraft (#304) (#2916) 2026-12-03 00:19:49 +07:00
bflatastic 449fa747b3 M4, #1680: notched (inside square) corners, and .sketch corner styles stay live 2026-12-02 15:32:57 +07:00
BFlat 5975fa0ded M5: the presenter's detail margin grows it to at most half the whole-frame texture's pixels (#2879) (#2902) 2026-12-02 15:32:20 +07:00
BFlat c7546e9e0e M6: Open and import Adobe XD (.xd) files, best effort (#2077) (#2912)
* 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.
2026-12-02 10:16:44 +07:00
BFlat 61947923d4 M11: a plugin can read the web hosts its manifest names (#1883) (#2911)
* 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).
2026-12-02 09:59:01 +07:00
BFlat b6f3b70c78 Merge pull request #2900 from storytold/cp/pr-2884-149
M7: Uno variables export follow-up: P3 colours as sRGB, stable keys, export warnings shown (#2170)
2026-12-02 09:52:31 +07:00
BFlat 61b7590a79 M8: Redraw layers while dragging can be turned off, so only the outline moves (#1569) (#2913)
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.
2026-12-02 09:21:10 +07:00
bflatastic 95ee02cc3e docs: components parity row for the Uno variables export follow-up 2026-12-02 09:17:34 +07:00
bflatastic 652ff16ec9 Variables export: the toast says how many warnings the export has and the first one, so a Uno or DTCG file with something left out says so 2026-12-02 09:17:22 +07:00
bflatastic 3e5612c170 Uno variables export: Display P3 colours written as sRGB, colliding keys suffixed in variable-id order, and \n escapes in the format strings 2026-12-02 09:17:17 +07:00
BFlat 077ba7083f M7: variables export as Uno Platform theme resources (#2170) (#2884)
* 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
2026-12-02 09:04:02 +07:00
BFlat c6cdefa326 fix(pathops): path operations leave out zero-width sliver contours (#1572) (#2910) 2026-12-02 09:03:29 +07:00
BFlat 28ddd45a20 M9: figcraft-server keeps a workspace for the team: publish without the key, straight to the team list (#2119, part) (#2906)
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.
2026-12-02 08:31:12 +07:00
BFlat 92e3622177 M9: figcraft-server checks its own health in a container, and runs with Docker Compose (#2044, part) (#2903)
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.
2026-12-02 08:27:23 +07:00
BFlat 924f067d79 Merge pull request #2904 from storytold/cp/pr-1805-168
M4: keep-all leaves kana beside Hangul breakable (#1233)
2026-12-02 08:25:12 +07:00
BFlat 2ed5266e7f M6: .fig and .jam files offer FigCraft under Open With (#1788) (#2905)
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.
2026-12-02 08:00:09 +07:00
Jeremy 49cb9b93b8 perf(recovery): cancel in-flight recovery writes off the UI thread (#2890)
* 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>
2026-12-01 19:54:58 -05:00
BFlat fefa72a5a8 M5: Export prototype as HTML: the page's prototype as one self-contained file that opens offline (#2886) (#2897)
* 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)
2026-12-02 07:24:19 +07:00
bflatastic 3ccaebc5ec M4: keep-all leaves kana beside Hangul breakable (#1233) 2026-12-02 07:17:08 +07:00
Jeremy 4281078cd5 fix(engine): a busy branch's waiting event doesn't count toward a live pass's time slice (#2898)
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>
2026-12-01 19:16:18 -05:00
BFlat 9087f616d3 perf: eliminate UI-thread freezes on save, recovery and MCP render (#2887) (#2896)
* 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>
2026-12-02 07:15:44 +07:00
BFlat 0ebd8c5e55 Merge pull request #2899 from storytold/cp/2870-copy-as-docs
M6: The MCP docs say Copy as commands write only the system clipboard (#2524)
2026-12-02 07:00:58 +07:00
BFlat 726365df1b Merge pull request #1736 from storytold/feat/board-table-cells
M12: board tables size rows by their borders and take cell colours
2026-12-02 06:56:12 +07:00
BFlat 784196a97f Merge pull request #1805 from lileeei/1233-korean-keep-all
Korean wraps word by word (wordBreak: keepAll)
2026-12-02 06:49:51 +07:00
BFlat 2ac3a12984 M6: Link instances to library keeps edits made after the import, and the import keeps no instance swap ids (#2442 follow-up) (#2885)
* 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).
2026-12-02 06:42:53 +07:00
BFlat 6f52f12116 Merge pull request #618 from Skyfuller1303/fix/image-adjust-popup-sync
M7: keep the image adjustment popup on the selected image
2026-12-02 06:38:15 +07:00
BFlat b8b6ab1202 Merge pull request #2882 from Elvis33LE/ci/event-driven-cache-prune
ci: add event-driven cache-prune workflow
2026-12-02 06:36:02 +07:00
bflatastic 156d38c8c5 Merge origin/main into #1805
Resolves ROADMAP and parity checklist conflicts.
2026-12-02 06:14:57 +07:00
bflatastic e083e95311 M6: The MCP docs say Copy as commands write only the system clipboard, so an attached agent reads CSS or exports instead (#2524) 2026-12-02 06:13:03 +07:00
bflatastic cfb0e58a48 ci: align cache-prune harden-runner with the other workflows and describe what it prunes here 2026-12-02 06:01:31 +07:00
BFlat bb5898905b Merge pull request #2892 from storytold/perf/doc-node-arc-diff
perf(doc,engine): short-circuit Arc<Node> PartialEq on ptr_eq and use OrdMap::diff in changed_nodes
2026-12-02 06:00:41 +07:00
bflatastic d563145fd2 Merge remote-tracking branch 'origin/main' into cp/pr-1736-61
# Conflicts:
#	docs/boards-parity.md
#	docs/gaps.md
2026-12-02 06:00:35 +07:00
BFlat 890e149acb M10: on GNOME the title bar's window buttons follow the desktop's layout and look (#2277) (#2883)
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.
2026-12-02 05:58:28 +07:00
BFlat aea30a7656 Merge pull request #2889 from storytold/perf/format-streaming-version-save
perf(format): pass-through compressed version storage and streaming JSON save
2026-12-02 05:54:44 +07:00
BFlat 975c3057e6 Merge pull request #2893 from storytold/perf/collab-lazy-view-timeslice
perf(collab,engine): avoid redundant Replica clones when pending is empty and time-slice live_deferred
2026-12-02 05:08:41 +07:00
Jeremy e53c628b4d fix(format): admit a version by the bytes it keeps; skip the raw zip without history
- 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>
2026-12-01 21:44:22 +00:00
BFlat 0a0224ef23 Merge pull request #2894 from storytold/perf/proto-canvas-noodle-cache
perf(ui): cache prototype noodle edges per document version and page
2026-12-02 04:36:09 +07:00
bflatastic b9cddad3c1 fix(engine): clear the live backlog flag on every poll
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.
2026-12-02 04:32:17 +07:00
bflatastic 9145a090ff fix(engine,ui,mcp): ask for another frame when live_deferred runs out of time
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.
2026-12-02 04:26:30 +07:00
Jeremy de93ab9f6b fix(format): count compressed bytes in the version budget; share one archive writer
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>
2026-12-01 21:20:53 +00:00
BFlat 2f3cc9c741 Merge pull request #2880 from storytold/cp/142-2187-presenter-render-the-hidpi
M5: the presenter's sharp detail renders off the UI thread (#2187)
2026-12-02 04:10:10 +07:00
BFlat 1ca3643b2b Merge pull request #2881 from storytold/cp/143-2171-developer-mode-uno-componen
M6: Uno components, variants and code connect (#2171)
2026-12-02 04:09:37 +07:00
Elvis33LE bcf76e96d6 ci: lock cache-prune workflow actions 2026-12-01 22:09:18 +01:00
bflatastic b87a8be989 test(ui): cached prototype noodle edges follow edits and undo 2026-12-02 04:00:39 +07:00