139 Commits
Author SHA1 Message Date
bflatastic ff0082043c Merge main into #1392
Port the saved-file refresh onto main's split modules: stamps in automation/file_access,
refresh beside file.open's reload in cmd/file/open, save conflict checks in cmd/file/save.
A refresh also keeps the tab's page views and fit-to-content state. Adds the file.refresh
label to the ar, bs, he, ta and zh-Hant catalogs.
2026-12-02 00:45:32 +07:00
bflatastic 72fe0e9661 Presenter: a tap clicks a hotspot, a finger doesn't hover, a pinch does nothing (#2540)
In the full-window presenter (and the preview pane, which shares the player) touch
now acts as touch:
- A tap is a click: its release counts where the finger lifted, although a touch
  screen takes the pointer away in the same frame.
- A finger has no hover: Mouse enter, Mouse leave and While hovering don't fire from
  it, so they can no longer swallow the tap. A press that comes from nowhere (no
  pointer position before it, no move to it) counts as a finger even before its
  touch event arrives, as a browser sends them. A mouse moving hands hover back.
- A swipe scrolls a scrolling frame, or fires an On drag trigger, as a mouse drag
  does; a small wobble is still a tap.
- A second finger cancels the press: a pinch neither drags, scrolls nor taps, and a
  scroll it interrupts springs back inside its range.

The control channel's ui.input takes {touch: [x, y], phase, finger?}, sent as a
touch screen sends it, so this can be driven without a touch screen.
2026-12-01 19:35:22 +07:00
BFlat b2c09d6e36 Merge pull request #2844 from storytold/feat/1592-preview-window
M5: Prototype preview opens in a window of its own for another screen
2026-12-01 14:53:53 +07:00
bflatastic fc64d38284 Prototype preview: open it in a window of its own for another screen (#1592)
The preview pane's bar gets a pop-out button next to Close. It moves the
preview into an OS window of its own (same size as the pane), where the
same prototype keeps playing and follows edits and the selection live,
so it can sit on a second screen. The button there, or closing that
window, puts the preview back over the canvas.

`proto.preview {window: true}` opens it straight in its window, and
`ui.set {previewWindow}` / `ui.inspect` `previewWindow` move it and read
it over the control channel. The browser build (one window) and a
running screen reader (other windows have no accessibility tree yet)
keep the pane over the canvas, without the button.
2026-12-01 14:20:08 +07:00
bflatastic 8efb0809ad M11: plugin panels can dock in the sidebar (#2752, part 1)
A plugin panel whose spec says "placement": "sidebar" shows in the left
sidebar under a Plugins tab on the rail instead of a floating window. The
tab is there only while such a panel is open, and a newly docked panel
opens it; each docked panel has a close button that ends its plugin's
session, and its fields take the sidebar's width. Floating stays the
default, and plugin.ui reports the placement.
2026-12-01 13:02:15 +07:00
BFlat cfbf83c158 Merge pull request #2802 from storytold/feat/2539-present-entry
M5: the browser build presents a prototype file from its own site, view only, from a link
2026-12-01 10:34:40 +07:00
bflatastic c206c523b8 M5: the browser build presents a prototype file from its own site, view only, from a link (#2539)
Opening the web build at `index.html#present=<file>&start=<frame>` now downloads that file
from the page's own site, opens it and presents its prototype full-window with no editor
behind it. A static folder of the web build and its `.figcraft` files becomes a set of
prototype links.

- Only a file on the page's own origin over HTTP(S) is fetched (same-origin mode, so a
  redirect to another site fails); the 512 MB browser limit applies before and after reading.
- The presenter is view only: no Close, Escape and Cmd/Ctrl+W do nothing, no tab bar, no
  comments, no device or responsive choice. Scale, hotspot hints, Inspect, restart and
  stepping between frames stay.
- `start` is a frame id; a frame the file lacks starts where Present starts, with a message.
- A file that can't be fetched or opened, or has nothing to present, leaves a note saying why.
- Ignored in host mode; the files the last page kept are left for the editor.
2026-12-01 09:56:28 +07:00
bflatastic cea73df3a5 The navigation bar can hide itself and come out at the window's edge (#2785)
View > Panels > Auto-hide navigation bar (`view.autoHideNavBar {on?}`, kept in
the preferences) hides the icon bar left of the layers panel, so the canvas
takes its width. The pointer at the window's edge brings the bar out over the
layers panel without moving the panels or the canvas; it goes when the pointer
leaves it, unless its main menu is open or one of its controls has the keyboard.
2026-12-01 08:29:21 +07:00
David Mann 48287201cf mcp: plain figcraft-cli mcp reaches the open window through the launcher's switch (#2740)
While the ArtCraft Launcher's switch lets agents use FigCraft, figcraft-cli mcp sends each call
to the open window through craft_control::agents::Live (the connection file, the token file; a
closed app is started) and otherwise runs headless in the automation roots or the agent folder.
Without the switch it still needs both roots (rule 18); --headless forces headless. --attach
reads the token file of its port.

Requests from the agent listener carry the agent folder as their roots (ControlRequest::roots):
handle runs confined to them and a screenshot path is checked as it is admitted, unless the app
was started with roots of its own. Docs: mcp.md, control-protocol.md, cli.md.
2026-11-29 15:18:51 +01:00
bflatastic 6b3c4c2bf4 Control channel: idle connections give up their slot; request lines share one memory budget (#1110, #1111)
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.
2026-11-28 18:19:02 +07:00
bflatastic e5060d0f55 M8: control channel: requests queued behind an applied ui.input batch run in the next frame, so a doc.switch can't send the batch into another file (#1503) 2026-11-28 13:29:32 +07:00
varabudi b85b944df3 M5: исправить адресное управление прототипами
Сохранять явный выбор документа при адресных вызовах и вложенных пакетах.
Откатывать запросы интерфейсу отказавшей группы, сохраняя обычные диалоги.
Распознавать оба имени стрелок и показывать предпросмотр поверх редактора.
Добавить воспроизводящие тесты и уточнить документацию протокола.

По замечаниям сопровождающего перевести новые комментарии и пояснения тестов
на английский. Перенести изменение поверх актуальной main без коммита слияния,
сохранив обе записи состояния: сначала нашу, затем записи основной ветки.
2026-11-19 20:26:11 +05:00
B-uchi 6dace8c570 M8: get_node reports text and stroke settings it stores
A layer stored its vertical text alignment, text case, paragraph spacing and
indent, OpenType features, start and end caps, a frame's variable modes, which
component property controls a field, and whether a nested instance is exposed,
but node.get and document.inspect left them out. They are reported now, under
the names node.set takes so a value read can be written back, and only when
they aren't the default.
2026-11-18 08:00:03 +01:00
bflatastic c391f13ccd M8: a pan past the canvas image shows a coarse image of the area around the view, not the bare page colour 2026-11-17 18:06:04 +07:00
Trevor BrownandClaude Sonnet 5.5 d0379dc70d M8: Rotation field shows and sets the rotation on the page (node.set absoluteRotation)
The Design panel's Rotation field now reads and writes the layer's rotation on the page (its own angle plus its parents'), as measured in Figma's web app, 2026-11-10. A new additive node.set key, absoluteRotation, does the work (one call for every selected layer, so one undo step and the moved rotation origin still apply); rotation stays the angle to the parent for scripts, inspect, codegen and the formats. Closes #2196.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Fable 5.1 briefed; Sonnet 5.5 wrote at medium
2026-11-10 03:02:09 -05:00
skylar taylor-barrick 3839fe4a0c Naming: use Developer Mode instead of Figma's Dev Mode (#2135)
Figma holds a US registration for DEV MODE (US 7574348). Display text only: the view.devMode label, Inspect tab, shortcut row, refusal messages, CLI help, docs and all locale catalogs now say Developer Mode. Command ids, preference keys and saved fields are unchanged; "Dev Mode" stays a search alias in the Actions palette. Adds a naming guard test.
2026-11-09 06:24:44 +01:00
BFlat 5cbc8207fd Merge pull request #2065 from helenkwok/web/page-api
figcraft-web: window.figcraft takes its request functions from craft-web-api
2026-11-07 13:03:10 +08:00
Helen Kwok 78502eea6a figcraft-web: window.figcraft takes its request functions from craft-web-api
request, execute, commands and screenshot move onto the shared crate (storytold/craft-libs#413): a timeout on every call, one data field for the screenshot's PNG, and docInspect and uiInspect beside them. A call the page gave up on cancels its request if the app has not started it, so the app skips it. openFile, captureDownloads, files, readFile and inspect stay FigCraft's own, on the same object.
2026-11-07 08:12:59 +08:00
Filip StrajnarandClaude Opus 5.5 853e8c6cc4 M8: a minimised window under Wayland answers control requests (#1906)
Under Wayland an app can't tell that its window is minimised (no `minimized`, no `occluded`),
and the compositor stops asking it to draw. eframe keeps running the app's logic for a window
whose redraw is overdue, but `control::background` still left every request for "the window's
frame", which never came: with the window minimised on GNOME or KDE Plasma each control-channel
or attached-MCP request waited and timed out after 60 s ("it was not applied").

`control::background` now treats a window that drew no frame for `NOT_DRAWING_AFTER` (0.2 s)
while a request waited for it as hidden: requests that act on the app's state are answered from
the logic passes, as they are for a window the platform reports minimised. `FigApp::control_waits`
keeps, per window, its pass count and the time the wait began; a frame drawn since starts the
wait again, and a pass is asked for 0.2 s later while a request waits. Screenshots and `ui.input`
still wait for a drawn frame. Measured on GNOME Wayland with the window minimised by its own
button: 0.54 s a request (before: 13.7 s for one, then 60 s timeouts).

Test: `idle_tests::a_window_that_stopped_drawing_answers_from_its_logic_passes`. Docs:
control-protocol.md, mcp.md, hardware-parity.md, target-app-parity.md, ROADMAP.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LvG6E2LxvJ6MuFmiLA6Zqm
2026-11-06 12:27:59 +01:00
Trevor BrownandClaude Fable 5.1 5050631bcf M5: Hide UI in the presenter: the bars go away and Cmd/Ctrl+\ brings them back (#1820) (#1826)
Co-authored-by: Claude Fable 5.1 <[email protected]>
2026-11-01 23:50:03 -05:00
BFlat 437d052396 M8: a control request can set its own timeout, up to 10 minutes (#1696) (#1706)
A request line can carry timeoutMs beside id and method, capped at 600,000 ms; without it the wait stays 60 s and older apps ignore the field. figcraft-cli mcp --attach PORT --timeout SECONDS sends it with every request and reads the answers that much longer. A timeout's message says how long the request waited.
2026-10-31 03:41:56 +07:00
BFlat f152ca995f Merge pull request #1697 from saimskywalker/issue-1095-roots-refuse-network
M8: commands confined to automation roots reach no server (#1095)
2026-10-31 02:10:56 +07:00
saimskywalker e6059b3543 M8: confined library checks say they were refused (#1095)
library.check refused nothing while automation roots confined it: it
counted libraries it never asked about and remembered them as yours. It
now refuses before remembering any. library.updates and library.list
answered a refused check with the team library cached earlier, as if the
server had nothing newer; the refusal now reaches them instead of
falling back like an offline server. The MCP and control protocol docs
say that a root on a network share still reaches that file server.
2026-10-31 02:43:50 +08:00
BFlat b6499a295c M8: a control request that times out says whether it was applied (#1673) (#1692)
The UI starts a request through its gate (a new Running state) just before running it and never runs one the transport already cancelled. At the timeout the reply says it was dropped and not applied, or that it is still running and will take effect; a reply that just made it is delivered. Only screenshots and input blame the window.
2026-10-31 01:37:09 +07:00
saimskywalker ef4c0aacfd M8: commands confined to automation roots reach no server (#1095)
The roots confined files only: a confined agent could still publish the
open document to any server, host it on the network or join a session.
The engine reaches the network only through the live link, which now
refuses a call made while the roots confine it (hosting, joining,
publishing, sharing, team libraries, plugin directories), and skips the
background team library checks. The MCP and control protocol docs say so.
2026-10-31 02:05:29 +08:00
bflatastic cf129e42c9 Merge main into #1420 2026-10-30 13:21:51 +07:00
BFlat b2885452fb M8: doc.list gives AI agents and plugins file names, not paths (#1117) (#1620) 2026-10-30 12:14:34 +07:00
Mert Dede 5c3aef840a Merge remote-tracking branch 'origin/main' into feat/996-inspect-fields
# Conflicts:
#	docs/roadmap.md
2026-10-30 07:07:54 +03:00
BFlat 38a4feccc9 M8: hover hit-tests once per pointer move, and a moved auto layout frame keeps its layout (#1571) (#1601)
Every pointer move draws about three frames, and the canvas hit-tested the hover on each: a hover where nothing changed since the last (place, modifiers, zoom, file, page, revision, selection, tool and modes) is no longer sent to the tools again. Dragging an auto layout frame laid its contents out again on every move: a frame whose only change is its transform now keeps its own layout (its parent's still runs). ui.inspect reports frameTimes. Measured on a synthetic 1,900-layer file: hover UI pass 0.91 to 0.49 ms a frame and CPU 33% to 22% of a core; normalise while dragging 648 layers 3.8 to 2.1 ms a move.
2026-10-30 09:28:34 +07:00
BFlat e7ae0f4426 M9: share links can comment: a comment access level beside edit and view (#1525) (#1576)
Someone who joins with a comment link (or its join code) sees the file live and adds, replies to, reacts to and resolves comment threads, but can't change the design: their app refuses other edits and the server accepts a comment link's batch only when every change in it touches comment threads. Sharing online makes a comment link and code beside the edit and view ones; the Share popover offers Can edit, Can comment and Can view, and the commenter's toolbar shows a Can comment badge with Move, Hand and Comment.

Backward compatible: clients announce the comments word; one that doesn't is welcomed with a comment link as a viewer and gets comment links listed as view links, a level this build doesn't know reads as view, and an older server that can't make a comment link leaves the share without one.
2026-10-30 07:29:40 +07:00
Mert DedeandClaude Opus 5.5 42e1a39d72 Merge main into #1420
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 01:47:34 +03:00
BFlat 714bbfcdaa M8: MCP and control calls name the document they act on (#998) (#1533)
Tools that act on a document, and the control methods engine.execute,
document.inspect, node.get and ui.render, take an optional `document`
(an open file's id from doc.list / document.inspect, or its path). The
call acts on that file and the tab in front stays in front, so an
attached agent keeps editing its own file when the user switches tabs.
2026-10-29 19:47:41 +07:00
BFlat 72b4269383 M8: an AI agent attached over MCP comments under its own name (#1414) (#1529)
Every command an MCP client runs acts as the client's name from initialize (clientInfo.title, else .name) with ' (agent)' after it, or 'AI agent' without one, carried to the app as engine.execute {agent}. Its messages, reactions and read state are its own, and its messages are marked (agent: true in the file and comment.list, an Agent label in the thread). The user's name and comments made in the app are unchanged; in live sessions the name and marker travel with the thread.
2026-10-29 19:15:19 +07:00
bd7a277c75 #1420: clearer option errors and text cut-off in the inspect docs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: GPT-6 Astra <[email protected]>
2026-10-29 12:43:53 +03:00
dd55ef63dd Merge main into #1420
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: GPT-6.1 Sol <[email protected]>
Co-Authored-By: GPT-6 Astra <[email protected]>
2026-10-29 12:18:33 +03:00
bflatastic e89def2068 Merge main into #1409 2026-10-29 13:46:42 +07:00
bflatastic c5ba6dd2e8 Merge main into #1409
# Conflicts:
#	crates/engine/src/session/undo.rs
#	docs/roadmap.md
2026-10-29 12:23:11 +07:00
bflatastic a51e815073 Merge main into #1460 2026-10-29 12:22:28 +07:00
bflatastic 1505681a54 Merge main into #1407 2026-10-29 11:39:50 +07:00
bflatastic 56196eac5a Merge main into #1409
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/session/undo.rs
#	docs/roadmap.md
2026-10-29 11:27:45 +07:00
bflatastic f99f01d57b Merge main into #1460 2026-10-29 11:09:30 +07:00
phonedu 8e6b3bf449 M12: MCP comment feedback and live change events
Comments become the task queue for an attached or headless MCP client: comment.prompt returns a bounded Markdown brief, the Comments panel gains Copy for AI, and the MCP server exposes fix_comments, watch_comments, figcraft://comments and wait_for_changes. Mutating comment.* commands append to a bounded in-memory event log; the control channel's events.poll long-polls it without the UI thread, and a successful batch commits its events only if the whole batch lands. No model, network dependency, asset or file-format change.
2026-10-28 21:42:31 +08:00
MortenHustedandClaude Opus 5.5 ff4fe00294 M0.9: commands refuse parameter names they don't take (#1413)
A misspelt parameter name was ignored and the command reported success,
answering as if the parameter hadn't been given (`comment.list
{"filterr": "open"}` listed resolved threads). `Session::execute` now
refuses names the command's params doc doesn't list, naming them and
what the command takes, before the command runs, so every path into a
command (CLI, batches, control channel, MCP, plugins, the UI) gets the
check.

The names come from the existing docs, parsed once with the registry:
each top-level item's first word and the words joined to it by `|`, `/`
or `+`, bracketed text and what follows `:`, `=` or `→` being
description, alternative groups (`{x, y} | {points}`) included. `ids`
and `id` are always taken (`params::targets` reads either); node.set,
whose doc is its props list, keeps its own check.

The junk sweep runs each junk object as given and cut down to the names
a command takes, so the junk values still reach the parsers. Tests that
passed names their command never read (comment.resolve's author,
collab.host's link, node.get's depth) pass only what it takes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 09:06:58 +01:00
d86a7ad9d9 M0.9: inspect layer trees with selected fields or a compact outline (#996)
node.get, the control channel's inspect methods and the MCP get_node / inspect_document tools
take fields: [node keys], applied at every level, or outline: true (id, name, type, characters
cut to 120 characters, mainComponentName, visible). Ids and structure are always kept, properties
that aren't selected aren't computed, and the default output is unchanged. Part of #996.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: GPT-6.1 Sol <[email protected]>
Co-Authored-By: GPT-6 Astra <[email protected]>
2026-10-27 12:55:47 +03:00
300a5f2f9d M0.9: let batches continue after failed steps (#1386)
command.batch and the MCP batch tool take onError: "abort" (the default, unchanged) or
"continue". In continue mode each step runs inside a rollback-only checkpoint split out of
Session::grouped: a failed step is rolled back on its own, later steps still run, and the result
is one {step, command, ok, result|error} object per step. What was applied is one undo step; a
reference to a failed step fails too; malformed batches are still rejected before any step runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: GPT-6.1 Sol <[email protected]>
Co-Authored-By: GPT-6 Astra <[email protected]>
2026-10-27 07:57:54 +03:00
8ae76d9b2a M8: bound attached MCP replies to 512 MiB (#1113)
The attached backend read each reply from the app's control port with read_line, which has no
limit. It now reads up to 512 MiB before the newline (an app window capture is at most 256 MiB as
base64) and stops at the first byte past that. An oversized or non-UTF-8 reply drops the
connection and is reported like a lost reply; the next call reconnects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: GPT-6.1 Sol <[email protected]>
Co-Authored-By: GPT-6 Astra <[email protected]>
2026-10-27 07:57:53 +03:00
StrajnarFilip ee542c49bb M1: retry failed file refreshes and deduplicate warnings (#1388) 2026-10-26 20:51:17 +01:00
StrajnarFilip aa9ab11212 M1: refresh saved files across windows and refuse stale saves (#1388) 2026-10-26 18:58:33 +01:00
bflatastic 1f1c8624c9 #824: window.figcraft is opt-in: installed only with a ?control query entry 2026-10-26 23:10:04 +07:00
bflatastic b9fc8f5113 Merge main into #824 2026-10-26 22:57:20 +07:00