Commit Graph
5436 Commits
Author SHA1 Message Date
BFlat aaed433ddd Merge pull request #2587 from storytold/formats/penpot-craft-zip-9-8-2
Read Penpot archives through craft-zip
2026-11-28 18:09:43 +07:00
BFlat 350ee9f728 Merge pull request #2688 from brytoncooper/fix/win-wgl-hang-2264
M1: Windows doesn't start OpenGL beside Direct3D 12 (#2264)
2026-11-28 17:53:05 +07:00
BFlat 5330237381 Merge pull request #2686 from B-uchi/pr/docs-design-review-prompt
docs: the Prompts table lists design_review
2026-11-28 17:50:26 +07:00
BFlat 905850504a Merge pull request #2689 from brytoncooper/fix/web-join-perf-2041
M9: avoid full-snapshot copy and WASM page-by-page memory.grow storm on join (#2041)
2026-11-28 17:49:00 +07:00
BFlat 179f7cffff Merge pull request #2681 from Oni-zerone/claude/magical-archimedes-li1vu4
mcp: create_node and set_properties take fields and outline
2026-11-28 17:43:52 +07:00
BFlat 8660a71a43 Merge pull request #2684 from storytold/fix/2166-bend-slop
M8: a wobbly Bend click on a point or segment is a click, not a drag (#2166)
2026-11-28 17:43:48 +07:00
BFlat 0485359a08 Merge pull request #2685 from B-uchi/pr/implement-prompt
M8: an MCP prompt takes an agent through building the selected design in a codebase
2026-11-28 17:40:26 +07:00
bflatastic 2cd906ddd8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/format/Cargo.toml
2026-11-28 17:32:22 +07:00
bflatastic 5ca94d7496 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:06:57 +07:00
bflatastic fd24ba3d55 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:03:08 +07:00
bflatastic 086594604c M8: a wobbly Bend click on a point or segment is a click, not a drag (#2166) 2026-11-28 17:02:57 +07:00
bflatastic da3f97646f Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:02:31 +07:00
bflatastic c57f63a41f Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:02:28 +07:00
bflatastic 9d4b2f2617 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:01:57 +07:00
BFlat febefdaabf Merge pull request #2683 from storytold/fix/main-shared-textdata-test
Fix main: the delta snapshot test builds its text as shared TextData
2026-11-28 17:01:41 +07:00
Bryton Cooper 46ff7d9595 fix(engine): wrap TextData with Shared::from in join_bench_tests after #2679 2026-11-28 02:57:36 -07:00
Bryton Cooper 866fe84f9c fix(collab): stop retrying large heap reservations after OOM in current read (#2041) 2026-11-28 02:55:09 -07:00
Bryton CooperandClaude Opus 5.5 6c638908c9 M9: time joining a large shared file (#2041)
An ignored release test that builds a 120k-layer file over 15 pages and
times the server's welcome, Client::join and the engine opening it
through live_poll, for the delta catch-up and the full snapshot:
cargo test --release -p figcraft-engine --lib join_timings -- --ignored --nocapture

It runs natively, where the web heap's page-by-page growth doesn't
happen, so it times decode and apply work only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 02:55:09 -07:00
Bryton CooperandClaude Opus 5.5 d1b4bc1023 M9: grow the web heap in large steps while a snapshot is read (#2041)
On wasm32-unknown-unknown, Rust's allocator (dlmalloc) grows the memory
one 64 KiB page at a time whenever it runs out, and the browser changes
the protection of the whole memory at each grow. The reporter's
121k-layer join made about 20,400 grows and spent 176 s of a 3-minute
freeze in them on Windows.

Memory dlmalloc got is reused once freed and never given back, so
allocating one large block and freeing it at once leaves that much free
room, for one grow. heap::keep_ahead does this whenever the memory grew
since its last call: half the heap again, at most 256 MiB at a time.

It acts only while a snapshot is read: a heap::reading() guard is held
by the delta snapshot decode, by unpacking a packed welcome and by
Replica::from_snapshot, and dropped on every exit path. Inside that
window it runs between delta records and vectors, between changes in
Replica::apply, and for each JSON value read from a full snapshot. The
same hooks run for live batches, where they return at once. Off wasm32
they always return at once. All of it is safe code: a fallible
reservation, then black_box so the optimizer keeps the allocation.

Measured with Client::join on an encoded 120k-layer welcome, in a
standalone wasm32 module under Node on macOS (three runs each, same
window). The shipped figcraft-web build, Chrome and Windows were not
measured:
- delta catch-up: 607-616 ms -> 433-449 ms; the memory grew twice
  between hook calls, each followed by one reservation (the baseline
  grew by 3,800 pages, at most one grow each); peak memory 241 -> 308 MiB
- full-snapshot catch-up (an older server): 3.6-3.9 s before the previous
  commit, 1.27 s after it, 407-417 ms with this one; 4 reservations;
  peak memory 455 -> 674 MiB against the previous commit (722 MiB
  before both)
The extra peak memory is the room reserved ahead and not used.

This covers the allocations inside the decode and apply. Opening the tab,
the first layout and the first paint run outside every hook and were not
measured.

--initial-memory doesn't help: with the std that Rust 1.96 links, a probe
still grew page by page above a 256 MiB initial memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 02:55:09 -07:00
Bryton CooperandClaude Opus 5.5 b33b75275c M9: open a full snapshot without copying it first (#2041)
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>
2026-11-28 02:54:44 -07:00
BFlat 745fe1aae7 Merge pull request #2682 from kler/swedish-ui-2026-11-28
i18n(sv): translate 51 new strings
2026-11-28 16:32:36 +07:00
BFlat b0a4191159 Merge pull request #2680 from storytold/fix/2507-page-link
M3: Cmd/Ctrl+L with nothing selected copies the page's link (#2507)
2026-11-28 16:28:43 +07:00
Bryton CooperandClaude Opus 5.5 71d9f20c31 M1, #2264: Windows doesn't start OpenGL beside Direct3D 12
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>
2026-11-28 02:28:33 -07:00
B-uchi 6a14526181 docs: the Prompts table lists design_review
The design_review prompt came with the design review commands (#2194),
but the Prompts table in docs/mcp.md never listed it, so the table
showed six of the seven prompts. It now has a row, in prompts/list
order, with its one argument.
2026-11-28 10:27:21 +01:00
bflatastic efd2f88ed5 Build the delta snapshot test's text from a shared TextData 2026-11-28 16:25:15 +07:00
Claude 7b2bb13b36 mcp: mutation results skip the unused wire-size pass
create_node and set_properties fetched their layers through node_at,
which also serializes each one to measure it for the read tools'
budgets. The mutation tools threw that size away, so they now fetch
through node_get, which only reads the layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KudydNWQDXESHDpVmpiqZh
2026-11-28 09:20:58 +00:00
BFlat f184f85a33 Merge pull request #2673 from storytold/fix/2664-image-downscale
M8: a downscaled image is filtered, so fine detail doesn't turn into moiré
2026-11-28 16:20:26 +07:00
B-uchi 6e12172667 docs: implement_design in the MCP guide and the ROADMAP
A row in the Prompts table, a short "Building from a design" section
after visual verification saying which tools the prompt uses, and the
ROADMAP row.
2026-11-28 10:20:02 +01:00
B-uchi 031d726da1 M8: an MCP prompt takes an agent through building the selected design
The developer tools were all there, but nothing said how they fit
together: an agent had to find out from each description that
design_context reads the whole page when nothing is selected, that
export_assets needs a dir, that annotations come from annotation.list,
and that a variable's codeSyntax is under variables.

implement_design {destination?} gives the order: read the design (and
ask which frame when nothing was selected), reuse connected components
(asking before importing mappings, which changes the design), tokens
and shared styles before literal values, explicit values as the
specification and the platform's layout behind the derived ones, the
files export_assets writes (again for what it left out), unsupported
values approximated, missing and the tree's own annotations read, the
other sizes' frames read, and the result checked with compare_design,
one frame at a time, when a browser tool is available. Every step that
can come up short says to ask or to report it, never to present it as
done.

The server instructions name it beside fix_comments and design_review.
2026-11-28 10:19:47 +01:00
BFlat aaf900a6b3 Merge pull request #2679 from brytoncooper/perf/doc-cow-sharing
perf(doc): share TextData and VectorNetwork copy-on-write via Shared<T> (#1819)
2026-11-28 16:14:51 +07:00
BFlat 43ce7f14cd Merge pull request #2677 from brytoncooper/fix/collab-delta-snapshot-budgets
fix(collab): align delta snapshot encode/decode budgets and charge bound/meta
2026-11-28 16:11:18 +07:00
Patrik LermonandClaude Opus 5.5 806e58ce0f i18n(sv): translate 51 new strings
Brings the Swedish catalog up to date with upstream main (cf320ee2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 09:58:32 +01:00
bflatastic 9284c9c3e3 M3: Cmd/Ctrl+L with nothing selected copies the page's link (#2507) 2026-11-28 15:53:46 +07:00
BFlat 3d88d9475f Merge pull request #2676 from storytold/fix/2495-stop-keyed
M9: Stop sharing works for a file shared with the server key typed under Advanced (#2495)
2026-11-28 15:53:17 +07:00
bflatastic e9a5986e69 M8: a downscaled image is filtered, so fine detail doesn't turn into moiré
An image fill shown at half its pixels or fewer (a 0.5x export, the canvas zoomed out) was sampled straight at that size with bicubic filtering and nothing averaging the pixels between samples, so fine detail aliased into moiré bands. It now draws from a copy averaged down to under twice the size it shows at (the image halved, or the canvas's smaller copy halved), cached like the canvas's copies. Every copy averages the finished pixels (premultiplied, after the image's adjustments) and is placed where the image itself would be; the size shown is measured on the axis showing the most device pixels, so an image squeezed on one axis by its crop or its layer keeps the other's pixels. Images shown larger draw as before.

Fixes #2664.
2026-11-28 15:41:42 +07:00
Bryton Cooper d9deec7b12 perf(doc): share TextData and VectorNetwork copy-on-write via Shared<T> (#1819) 2026-11-28 01:27:27 -07:00
Claude facf27218f mcp: create_node and set_properties take fields and outline
The layers these two tools return can now be cut to the keys an agent
needs, with the same `fields` and `outline` options get_node and
inspect_document take. The options are checked before the edit runs, so
a bad one changes nothing, and without them the result is unchanged.

Closes #2535.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KudydNWQDXESHDpVmpiqZh
2026-11-28 08:26:42 +00:00
Bryton Cooper c83de9d85e fix(collab): charge CodeLinks delta in est_deltas_extra_bytes 2026-11-28 01:23:45 -07:00
bflatastic 87fee2835c M9: Stop sharing works for a file shared with the server key typed under Advanced (#2495) 2026-11-28 15:07:48 +07:00
BFlat dbe9eeb1bd Merge pull request #2607 from Utakata/feat/open-camera-raw
format: open camera raw files as their developed picture
2026-11-28 15:06:51 +07:00
BFlat df66e8a406 Merge pull request #2364 from andrejskvorc/uno/U1-01-layer-code
M6: Uno Platform C# Markup code target (layers and auto layout)
2026-11-28 15:06:27 +07:00
bflatastic 2161144dad Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-28 15:06:05 +07:00
BFlat d6bc8f6e7c Merge pull request #1763 from IamAbhinav01/fix-connector-mapping-1744
fix(board): map left and right connector controls to matching ends (#…
2026-11-28 15:05:31 +07:00
Bryton Cooper a8653ba1f6 fix(collab): charge annotation_categories and mirror overrides in budget estimate 2026-11-28 01:04:31 -07:00
BFlat d32d788bcf Merge pull request #2234 from yelintong/pr-fig-slot-export
M6: .fig export writes slot properties and instance slot content
2026-11-28 15:02:46 +07:00
bflatastic 55b1b439e6 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/file-format-parity.md
2026-11-28 15:02:21 +07:00
BFlat f9bfabad36 Merge pull request #2573 from imanderson/feat/automation-allow-server-join
MCP: allow confined sessions to join an approved server
2026-11-28 15:01:23 +07:00
BFlat f673320c42 Merge pull request #2137 from TrevorBrown-dev/feat/shift-a-defaults
Auto layout: Shift+A picks Figma's sizing, gap and padding defaults
2026-11-28 15:00:59 +07:00
BFlat 925d27a23b Merge pull request #2652 from B-uchi/pr/responsive-ui-fixes
M8: the Screen sizes section keeps a typed rule and its group field per document
2026-11-28 15:00:19 +07:00
B-uchi b20d43321e M8: a test checks the tools and fields the prompts name exist
A prompt is a workflow an agent follows by name. The existing check
covers the command ids the instructions and prompts give, but not the
MCP tools or the result fields: a renamed tool or field would leave a
prompt pointing at nothing, with no test failing.

Every snake_case name in the server instructions and the prompt
templates must now be a tool, a prompt or that prompt's own argument,
and every backticked field must appear in some tool's or command's
documentation.
2026-11-28 08:59:22 +01:00