Commit Graph
522 Commits
Author SHA1 Message Date
bflatastic 2161144dad Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-28 15:06:05 +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
FredApps bc9c97c7d2 Merge branch 'main' into uno/U1-01-layer-code 2026-11-28 08:11:36 +01:00
FredApps 1f73395b90 Merge branch 'main' into feat/automation-allow-server-join 2026-11-28 08:11:36 +01:00
FredApps a8c90689b0 Merge branch 'main' into feat/variables-json-text-styles-2173 2026-11-28 08:11:36 +01:00
FredApps f278b428cb Merge branch 'main' into feat/automation-allow-server-join
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.
2026-11-28 08:01:38 +01:00
FredApps bb7e878e69 Merge branch 'main' into feat/variables-json-text-styles-2173 2026-11-28 07:40:43 +01:00
FredApps 9562640d75 Merge branch 'main' into uno/U1-01-layer-code 2026-11-28 07:40:32 +01:00
FredApps 4caba4a7d3 Merge branch 'main' into pr/visual-compare 2026-11-28 07:26:27 +01:00
bflatastic d20a121f23 M12: boards: code blocks from the toolbar and the ` key, a language menu, and handles on the left and right edges only (#2237, step 2) 2026-11-28 10:54:57 +07:00
bflatastic e07c9944eb M4: superscript and subscript per range of characters (text.style textPosition, Type settings while editing, text styles, CSS) (#2338) 2026-11-28 08:06:10 +07:00
B-uchi d8b49294d1 M8: a clean comparison says what it checked
A layer is listed only once 2% of the pixels it owns differ, so a few
stray pixels on a large background give `total` 0, and changedPercent,
rounded to one decimal, reads 0 for them. The docs said a clean result
meant no compared pixel differed by more than the tolerance; they now
give the 2% rule and what it leaves out, and the compare_design
description says an empty list doesn't mean every pixel matches.
2026-11-27 18:12:39 +01:00
B-uchi cbd785b4ad docs: visual verification says what a clean result covers and names the frame
The example now passes the frame's `id`; a clean result is described as covering only the area
compared and the layers looked at; `truncated.matchedByBox` is explained. The test of the
differences cap asserts that the list is shorter than the count rather than the cap's value, and
uses a small frame (it took several seconds).
2026-11-27 13:47:49 +01:00
B-uchi f4b6e0d885 M8: visual compare refuses a layer that isn't a frame, component or instance
`inspect.compare` checked only how many targets it had and that the target had a size, so with a
rectangle selected it compared the page against the rectangle, used the rectangle as the viewport,
and returned a result that looked like a real answer. A page is built from a frame, a component or
an instance of one: any other layer, named outright or selected, is now refused before the capture
is read, with what it is and what to pick. The command's and the tool's descriptions and the docs
say so.
2026-11-27 13:19:44 +01:00
B-uchi d53d02b7cd M8: an agent can compare a capture of the page it built with the frame
An agent building a page can't see whether it matches the design. `inspect.compare` and the MCP
tool `compare_design` take a capture the agent's own browser tools made and compare it with a
frame, on this computer. A browser's text and antialiasing never match pixel for pixel, so the
answer isn't one score: it is the layers that differ, each on the deepest layer it belongs to and
largest first, as a position difference (with its offset), a colour difference (expected and
actual) or a content difference. Text is held to twice the tolerance. A capture at 2x is the same
design: the frame's width sets the density.

Explicit targets are validated, and one frame is compared at a time. Parameters of the wrong type
are refused, and so are a path and data together. The capture is size-checked before it is
decoded, the comparison scale is bounded by the larger of the frame and the capture, the layer walk
is iterative and capped (`truncated` says so), and only the 100 differences listed are searched
for a move.
2026-11-27 12:10:51 +01:00
BFlat ffb0676467 Merge pull request #2397 from gmrmad1/fix/2180-create-font-warnings
Text: creating text warns when its font style draws in another face (#2180)
2026-11-27 16:56:59 +07:00
bflatastic 4b99b1930e Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	contributors/people.toml
2026-11-27 16:25:37 +07:00
bflatastic 38862eabd0 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-27 16:11:19 +07:00
bflatastic ed640c7449 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-27 15:53:31 +07:00
bflatastic 1ce3cd9cfa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 15:47:02 +07:00
bflatastic 0ddaf822fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	docs/prototyping-parity.md
2026-11-27 15:33:29 +07:00
bflatastic d61e0d6978 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/lib.rs
2026-11-27 15:27:12 +07:00
bflatastic 43ea030d4f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 15:22:26 +07:00
bflatastic d6dee9dbb0 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-27 15:21:14 +07:00
bflatastic b6257d6969 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 15:20:33 +07:00
bflatastic 1c5f6f60d0 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:40:03 +07:00
bflatastic 8ed8860632 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:39:29 +07:00
bflatastic 522c55e62f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/design_context_tests.rs
#	crates/ui-egui/src/panels/dev_mode.rs
#	docs/dev-mode-parity.md
2026-11-27 14:39:13 +07:00
BFlat 075e5a21c8 Merge pull request #2613 from denisg0mes/paste-library-main-as-instance
M3: a main pasted from its library file into another file is an instance of it
2026-11-27 14:39:11 +07:00
bflatastic 2fd043874a M3: variables can be sorted and reordered in the Local variables window (#2633) 2026-11-27 14:38:15 +07:00
bflatastic bb02b6ff09 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:38:04 +07:00
bflatastic e167b6b452 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/mcp/tests/it/main.rs
2026-11-27 14:26:51 +07:00
bflatastic 85c760b094 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:24:56 +07:00
bflatastic 3590abc9ff Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:06:34 +07:00
bflatastic 010bb86c0b Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:06:19 +07:00
bflatastic eddba16aae Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:06:02 +07:00
bflatastic 0aaa19ac25 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:05:10 +07:00
bflatastic e309dee7d4 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/mcp/src/tools.rs
#	docs/mcp.md
2026-11-27 13:57:58 +07:00
bflatastic 17adfae82d Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd.rs
2026-11-27 13:57:00 +07:00
BFlat de547a0d0d Merge pull request #2446 from B-uchi/pr/asset-handoff
M8: asset handoff for code projects
2026-11-27 13:46:59 +07:00
FredApps 0622efe1e1 Merge main into mind maps UI (code blocks and mind map nodes both handled in board.addNext, colour and docs) 2026-11-26 21:01:37 +07:00
Denis Gomes 5a875417e7 M8: frames, sections and components land on whole pixels
Figma's help says they "always snap to the pixel grid, even if Snap to
pixel grid is disabled". In FigCraft they followed the setting like any
layer, and since #2031 a snap to a layer off the grid wins over the
grid, so a frame dragged next to a neighbour at 100.4 landed at 100.4
and the whole numbers inside it sat between pixels.

A move, resize or draw of frames, sections, components, component sets
and instances now rounds to whole pixels before and after object
snapping, whatever Snap to pixel grid says. A moved one also lands on
whole pixels of its parent (`snap::settle_on_pixels`), so a frame
already off the grid comes back onto it. Other layers keep #2031's
order: the pixel grid first, then the snap to a layer wins.

The move rounds the drag itself rather than each layer afterwards, so
the preview keeps its shifted-layers fast path for frames already on
the grid.
2026-11-24 14:22:35 -05:00
Denis Gomes f9964e14ae Desktop: reopen the files open at quit instead of starting in a new file
The desktop app started in a new, empty file on every launch, and with a
control port open (FIGCRAFT_CONTROL_PORT set for an attached agent) even
the Start on the Home screen preference was overridden, so the files you
worked in had to be found and opened again each time.

Quitting now keeps the paths of the open tabs' files, in tab order, and the
one in front (Prefs::open_files, Prefs::front_file); the next start opens
them again and brings that one forward, as Figma's desktop app reopens its
tabs. Files without a path (new, imported, joined live) and branch tabs are
left out. A file named on the command line stays in front, a recovered
copy keeps its one tab (file.open switches to an open path), a file gone
since is skipped, and one that won't open is reported like a file named on
the command line.

With nothing to reopen the window starts on the Home screen; only with a
control port open does it still start in a new file (#874: control callers
expect a document). Start on the Home screen now means Home instead of the
reopened files.

The list is written at quit only, with the other preferences. Keeping it on
every tab change would cover a crash too, but a crash already brings back
the unsaved files through recovery copies, and the list from the last quit
is a fair fallback for the rest.
2026-11-24 03:00:57 -05:00
Denis Gomes fd45d4f05b M3: a main pasted from its library file into another file is an instance of it
Copying a main component in a library file and pasting it into another
file made a copy of the main there: a new component of that file, not
linked to the library. Copy then Paste of a main in its own file already
makes an instance, and pasting an instance from the library file already
uses the main from the library. Now a main the source file publishes is
an instance of it from that library too, which gets enabled the same way,
as Figma does with a published component. A variant is an instance of that
variant.

A main the library doesn't offer (hidden from publishing, added since the
last publish) and a main from a file that publishes no library still paste
as a copy. Making those an instance as well was rejected: their main would
stay in the other file, so the instance would show a missing main.

The part of adopt_pasted that brings published components in is now
from_published, shared with the new published_main.
2026-11-24 03:00:27 -05:00
Denis Gomes 8056e20dcf M3: a variant switch keeps typed text the other variant nests in other frames
Switching an instance to another variant matched its old layers to the
new variant's by source and then by name path. When the two variants nest
the same text layer differently (text > Label in one, div > text > Label
in the other), the path differs, the typed layer matched nothing, and the
new variant's own text came back.

A text layer of the new variant that nothing else matched now takes the
old text layer of the same name, when exactly one layer on each side has
that name. Two of one name stay unmatched, since either could be the one
typed into. Layers inside nested instances are left to their own mains'
rebuild, so a text layer never moves between instances.

Matching every layer kind by name alone was left out: a fill or size kept
from another place in the tree would land on a layer that only shares a
name, while text is what was typed and the layer most likely to be the
same one.
2026-11-24 02:57:37 -05:00
ljkx c63ad55771 M3: library.swap names the unused copies it removes (#2569)
The swap removes the old library's copies that nothing uses before it
starts (a component imported but not placed, a variable imported but not
bound), and its result said nothing about them. It now lists them in
`dropped`, apart from copies that went because what used them moved.
2026-11-23 10:39:26 +01:00
Anderson 4296cf8136 Clarify approved MCP network exception 2026-11-23 04:32:27 +01:00
Anderson 470b6483f1 Require both roots for headless MCP 2026-11-23 04:04:24 +01:00
Anderson 4f2ade852e MCP: allow confined sessions to join an approved server 2026-11-23 02:34:21 +01:00
varabudi b85b944df3 M5: исправить адресное управление прототипами
Сохранять явный выбор документа при адресных вызовах и вложенных пакетах.
Откатывать запросы интерфейсу отказавшей группы, сохраняя обычные диалоги.
Распознавать оба имени стрелок и показывать предпросмотр поверх редактора.
Добавить воспроизводящие тесты и уточнить документацию протокола.

По замечаниям сопровождающего перевести новые комментарии и пояснения тестов
на английский. Перенести изменение поверх актуальной main без коммита слияния,
сохранив обе записи состояния: сначала нашу, затем записи основной ветки.
2026-11-19 20:26:11 +05:00