- The design was drawn over its export area, which takes in strokes, effects and layers past an
edge that doesn't clip, then fitted to the frame's grid, so it shifted against the capture. It
is now drawn over the frame's own rectangle (`render_area`), as the capture holds it.
- Every grid is sized from the compared scale itself, never rebuilt from a rounded overlap: a
capture a few pixels across can't make the frame's grid enormous. The scale has no floor, so a
gigantic frame gets a coarser grid instead of a bigger one.
- A layer claimed every pixel of its box, so the see-through corners of an ellipse over a changed
rectangle took the rectangle's difference. A layer with an unclaimed difference now claims only
the pixels it draws on, from its own drawing at the compared scale, up to 300 layers; past that
a layer is matched by its box and the result says how many (`truncated.matchedByBox`).
`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.
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.
Image fills were dropped by the native targets, so a photo under a colour overlay vanished (#2271). Each image fill is now written in its paint-order place as the asset file.exportAssets hands over, named by the same content hash, fitted by its scale mode with its opacity. A pattern fill is left out with a comment line.
- `inspect.designContext` returns the target's responsive context under `responsive`, and names
the missing breakpoints only when nothing was stated.
- `responsive.set` marks frames and sections only, as the Inspect section shows; a component or
instance is refused. `group: null` goes back to the frame's name, and emptying the field in the
Inspect tab sends it.
- A stored viewport that isn't mobile, tablet or desktop is ignored, and an empty or over-long
group reads as none (`node.set {pluginData}` can write anything there).
- The walk for rules counts each layer once and stops at its cap without collecting a whole
subtree first, so overlapping targets don't use it up; `near` is searched by binary search.
- `responsive.rule` refuses a page before making the category, as `annotation.add` does.
- Developer Mode makes responsive edits, like its annotations (`dev_mode_allows`).
- The Inspect tab keeps a rule's draft per document and keeps it when the rule is refused.
- Status line, row and revision row in docs/dev-mode-parity.md.
A design file has no breakpoints, so an agent implementing a frame can only guess how it should
respond. The designer can now say it outright: `responsive.set` marks frames as the mobile, tablet
or desktop version of a design (layer data, so the file format is unchanged), and
`responsive.rule` adds a note to the Responsive annotation category, made if the file lacks it.
`responsive.list` returns what was stated about the given layers, the layers above them and those
inside them, and never infers anything from names or sizes. The Inspect tab gets a Screen sizes
section for frames.
Explicit targets are checked rather than falling back to the selection, a rule keeps to the
limits `annotation.add` has (note length, annotations per layer, number of categories), and the
result says `truncated` when there were too many layers to read every rule.
- Export refuses to write over a connect file it can't read (not JSON, not an object, or over
4 MB) instead of replacing it with this design's links alone.
- Import skips an entry whose `values` is malformed, with a warning, instead of replacing the
component's link with one that maps nothing.
- `{Property ? "a" : "b"}` reads the design's value, so mapping Off to `inactive` doesn't make the
condition true.
- A `values` key that is only a parameter name (`state` for State) is reported as unknown, since
the mapping is read by property name and it would do nothing.
`inspect.designContext` wrote a component's links through `camel`, which renames keys at every
depth, so a mapped design value such as `extra_large` came out as `extraLarge`. Its components and
the code it gives each connected layer now use Code Connect's own link JSON: value names stay as
written, and the code carries the link's `source` and `notes`. Export also sorts its links once,
after merging the file's other links.
A link can say where the code component lives (`source`, a path inside the
repository), what a property's design values are called in code (`values`:
{"State": {"Hover": "hovered"}} renders `hovered`; a value without an entry
keeps its design name) and `notes`, through codeConnect.set, the connect file
and Inspect ▸ Connect to code (a Source file field and a row per variant
value). The fields are skipped when empty, so existing files and exports don't
change.
codeConnect.list and the MCP tool component_mappings say which code
component each design component is: import line, name, ready snippet,
properties and variants, and with a repository root whether each source file
is there. sync_mappings imports or exports a repository's connect file.
codeConnect.export {path} keeps the file's other top-level keys and the links
of components this design doesn't have, so several designs can share one file.
From review: `ImagePaint::rotation` is unbounded, so `rotation * 90` could
overflow and reported 4 quarter turns as 360 and -1 as -90. The renderer draws
`rotation.rem_euclid(4)` quarter turns; the adjustment now reports that, and
none for whole turns. A regression test covers 4, -1, 1, a very large value
and i32::MIN. Targets go through params::req_targets like other commands,
keeping the whole page when nothing is named or selected.
file.exportAssets and the MCP tool export_assets write a design's images and
vectors into a folder: images as the bytes the file holds, never re-encoded,
vectors through the SVG export, and layers with export settings by those
settings. Each file says whether it is original, vector or rendered. Files are
named by the first 16 hex digits of their SHA-256, so one asset has one file
used by every layer listed and exporting again writes nothing. What a layer
does to an image that isn't in its bytes (filters, crop, rotation, opacity) is
listed, as is why an asset couldn't be handed over. Writes go through
file_access, so automation roots confine them.
From review: the asset list follows the layers placed in the tree, so a
smaller tree (maxNodes, or the MCP tool's retry for maxBytes) means a smaller
list, and `truncated.assetsLeftOut` counts the rest; following aliases reports
`truncated.variables` when it stops at its budget with variables still to
read; and a font is checked with figcraft_text::has_family by its trimmed name,
as the missing-fonts list does, so a family stored with outer spaces isn't
taken for installed. A regression test for each fails without its fix.
From review: the variables a style binds and those an alias or colour
calculation reads are joined too, followed to any depth; fonts come from the
text layers placed in the tree, so a second target's font isn't lost to a
separate walk's budget; and a malformed `id` or `ids` entry is an error
instead of reading the selection or dropping the entry. A regression test for
each fails without its fix.
inspect.designContext and the MCP tool design_context read the selection (or
ids, or a scope) in one call. Each layer keeps apart the values the designer
set (explicit), those layout or the file worked out (derived) and those with no
direct CSS equivalent (unsupported, with the reason). The variables (every
mode's stored and resolved value), styles, components, fonts and assets the
tree uses are joined once, and `missing` says what the design doesn't specify.
A connected instance gives its code snippet instead of its layers. Large trees
are capped and say so, and the MCP tool asks for fewer layers until the result
fits the client.
An auto layout frame that is the exported layer kept the size it has in the design, so content that grows (a longer text, a larger gap) was cut off or left space. It now hugs on the axes where it hugs, as FigCraft lays it out. A clip is a fixed rectangle, so it is written only on a frame fixed on both axes; one that hugs or fills gets a note instead.
Path data longer than the 10,000 characters a C# literal is cut at would lose its last commands, so such an outline now falls back to the PNG asset like one with too many elements. Found in review.
A line height below the font's natural height keeps LineHeight as written and
adds LineStackingStrategy.BlockLineHeight, which Uno draws as FigCraft does
(the lines overlap). No padding or margin shift; a looser line height keeps
the half-leading shift. Docs updated.
Every layer's name is the last comment line directly above the statement that
creates its outermost element, below any warning line, so a plugin that
post-processes the code can pair elements with layers. Not-mapped notes stay
in the chain below the constructor. Hidden layers and slices write nothing.
Vectors, booleans and shapes are a Microsoft.UI.Xaml.Shapes.Path with path
data from the node's outline (F1 non-zero, F0 even-odd, at most 5,000
elements), one solid fill and one solid stroke; stroke inside or outside is a
note. Gradients, several paints, effects and over-cap outlines fall back to a
PNG Image. Docs: parity, MCP, gaps, ROADMAP.
An explicit line height puts half the leading above the first line in
FigCraft and all of it below in Uno. Text moves down by
h = (L - (ascent + descent) / upem * size) / 2 from the face FigCraft draws
with: a top padding with a negative bottom margin in a panel (merged with an
independent child's margin), the offset in a Canvas. A line height below the
font's natural height and a family that is not installed are notes.
A frame with grid auto layout is a WinUI Grid: column and row definitions
(pixels, Auto, whole-number stars), column and row spacing, padding less the
stroke weight, and each child in the cell FigCraft's layout gives it, with
spans and the alignment in the cell. Fractional stars are scaled to whole
numbers or rounded with a note, at most 64 tracks per axis are written, and a
wrapping layout is one line with a note.
A child sizes per axis in its AutoLayout parent: fixed writes the length,
hug writes none, fill stretches with the attached AutoLayout call; min and
max lengths go on the child. Text hugs (one line), fills (wraps) or is
fixed. A child that ignores the layout is independent at its offset, and a
hugging parent with such a child is written at its size. reverse_z paints
with descending Canvas.ZIndex and keeps the order.
Fluent .Children(...) and .Child(...) double the load time with every level
of nesting. Each element is now a local with fluent property setters; its
children are added with Children.Add(x) or Child = x, and the view sets
Content = root. A test pins that no output has .Children( or .Child(.
A frame with horizontal or vertical auto layout is a Toolkit AutoLayout that
takes the box itself: orientation, spacing, padding less the stroke weight,
primary and counter axis alignment, space between. Space around and evenly
and baseline alignment are notes. Frames without auto layout keep the
Canvas, with one warning per view that counts them.
Keeps both sides' tests in al_behaviour_tests.rs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium