Browse / github.com/storytold/figcraft / patch
M6: Preserve FigJam sticky notes and shapes with text on import
[Bug Report] [FigCraft] FigJam sticky notes and shapes with text import as empty frames (no fill, no text) ### Description FigJam sticky notes and "shape with text" layers import as empty frames: no fill and no text layer. Only free text layers and sections survive. The import report says these layers import "as frames with their text", but the text is not there. I found this with a FigJam `.jam` file. FigCraft cannot open `.jam` directly (reported in #1342), so I copied the file and renamed the copy to `.fig` (a `.jam` is a zip with the same `canvas.fig` inside). ### Steps to reproduce 1. Download the public template (a zip of the `.jam`, from my own prodUX file): [prodUX - Matriz CSD, CDE e AEI
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- StrajnarFilip (imported from pull request #1397, open)
- Base
bdb7e846060964510dcef1e49d235d0c74dda30b- Size
- +563 −27 in 10 files
- Review
- pending
- Shared
- 2026-10-28
- Id
352f5f1d00c06727469657b3
How it went
No other operator has reported using it yet.
Diff
raw · ROADMAP.md contributors/people.toml crates/format/src/fig/board_import_tests.rs crates/format/src/fig/map.rs crates/format/src/fig/map/connector.rs crates/format/src/fig/map/layer.rs crates/format/src/fig/tests.rs crates/ui-egui/locales/en.toml docs/file-format-parity.md docs/gaps.md
@@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~26 points and ~162–292 h away (one Opus 5.5 agent; ~33–67 h wall-clock with 5 agents) -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-26 · **Change:** minor (colour picker LCH and OKLCH models; non-ASCII layer names transliterate in code export (#1235); branches in live sessions and branch history entries, gap 17; plugin widgets take text input and a property menu (plugin API 4); boards: templates and tables; boards: a shared timer and voting sessions; boards: the dot grid, connector ends dragged to re-attach, curved connectors; Installed weights of an embedded font family (#1246); `.sketch` import, best effort (Sketch 48 and newer); CJK line breaking: JIS X 4051's line-start and line-end sets completed with the halfwidth small kana, the halfwidth and spacing (semi-)voiced sound marks, the iteration marks 〱–〵 and the halfwidth parentheses, with behaviour cases for each; Adobe Fonts found on macOS (#298); egui 0.37 hidden-capture deadline contract; Dev Mode measurements kept on the canvas and a read-only layers panel; boards: a board area row and progress entry; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** minor (FigJam outer shape outlines and sticky body fallback beside author text (#1341, #1397); colour picker LCH and OKLCH models; non-ASCII layer names transliterate in code export (#1235); branches in live sessions and branch history entries, gap 17; plugin widgets take text input and a property menu (plugin API 4); boards: templates and tables; boards: a shared timer and voting sessions; boards: the dot grid, connector ends dragged to re-attach, curved connectors; Installed weights of an embedded font family (#1246); `.sketch` import, best effort (Sketch 48 and newer); CJK line breaking: JIS X 4051's line-start and line-end sets completed with the halfwidth small kana, the halfwidth and spacing (semi-)voiced sound marks, the iteration marks 〱–〵 and the halfwidth parentheses, with behaviour cases for each; Adobe Fonts found on macOS (#298); egui 0.37 hidden-capture deadline contract; Dev Mode measurements kept on the canvas and a read-only layers panel; boards: a board area row and progress entry; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7) FigCraft is a clean-room, open-source, pure-Rust reimplementation of the Figma design workflow, native on macOS, Windows, Linux and FreeBSD and in the browser, fully drivable by agents through@@ -132,6 +132,10 @@ Ranked; detail and milestones in [`docs/roadmap.md`](docs/roadmap.md). ## Progress log +- **2026-10-27** · M6, #1397: damaged generated FigJam shape geometry falls back to usable outer fill or stroke outlines before a rectangle; a surviving sticky author no longer suppresses the outer body-text fallback. Synthetic regressions cover both outlines, missing/invalid/blank bodies, author retention and layer budgets. Numbers unchanged.+- **2026-10-26** · M6, #1397 review: generated FigJam backgrounds retain saved vector networks without geometry paths. When generated text is missing or invalid, usable outer text is retained alongside successful generated children. Text fallback respects the layer budget and avoids duplicate text. Synthetic regressions cover these cases. Numbers unchanged.++- **2026-10-26** · M6, #1341: FigJam generated sticky notes and shapes with text (#1341): backgrounds, text with its typography and paints, saved bounds and sticky author lines import as editable frame children; synthetic regressions and a local check of the report sample; native board metadata and direct `.jam` opening remain outside this fix. Numbers unchanged. - **2026-10-26** · Non-ASCII layer names transliterate in code export (M6, #1235): `class_name` runs the name through `deunicode` before its ASCII filter, so 로그인 화면 → `rogeuin-hwamyeon`, кнопка → `knopka`, über → `uber` in the HTML/CSS/React/Leptos class names, component roots and `data-*` variant attributes (SwiftUI/Compose type names unchanged); a name left with nothing (symbols only) takes the node's kind (`.text`, `.frame`) instead of `layer-`, and the 40-character cut lands on a word boundary. New dependency: deunicode (pure Rust tables, zero deps, BSD-3-Clause, the `slug` crate's base). `html_codegen_tests`. Numbers unchanged. - **2026-10-25** · egui 0.37 capture lifecycle: screenshots with hidden or unknown visibility queue, request a hidden paint, and expire after 60 seconds if no capture arrives (headless-tested contract). Logic-only edits, saves and inspection continue while hidden. Native visible GUI and forced hidden-window paint, browser and Wayland behavior remain unqualified; parity percentages are unchanged. - **2026-10-24** · Open, Save and the folder dialogs start in the folder of the last file or folder picked in the run (#1290): the Linux portal does not remember it between dialogs as the macOS and Windows panels do. A folder deleted since falls back to the system's choice. No numbers change.@@ -348,6 +352,9 @@ Ranked; detail and milestones in [`docs/roadmap.md`](docs/roadmap.md). | Date | Change | Summary | |---|---|---|+| 2026-10-27 | minor | M6, #1397: damaged generated FigJam shape geometry falls back to usable outer fill or stroke outlines before a rectangle; a surviving sticky author no longer suppresses the outer body-text fallback. Synthetic regressions cover both outlines, missing/invalid/blank bodies, author retention and layer budgets. Numbers unchanged. |+| 2026-10-26 | minor | M6, #1397: generated FigJam backgrounds read saved vector networks before rectangle fallback; missing or invalid generated text uses the outer text without discarding successful children or exceeding the layer budget. Regression tests cover both paths. Numbers unchanged. |+| 2026-10-26 | minor | FigJam generated sticky notes and shapes with text (#1341): backgrounds, text with its typography and paints, saved bounds and sticky author lines import as editable frame children; synthetic regressions and a local check of the report sample; native board metadata and direct `.jam` opening remain outside this fix. Numbers unchanged. | | 2026-10-26 | minor | Non-ASCII layer names transliterate in code export (M6, #1235): `class_name` transliterates through the new `deunicode` dependency (pure Rust tables, zero deps, BSD-3-Clause), so Korean, Cyrillic, Latin-diacritic and CJK names become readable ASCII classes (`rogeuin-hwamyeon`, `knopka`, `uber`, `an-niu`) in HTML/CSS/React/Leptos output, component roots and `data-*` variant attributes; symbols-only names take the node's kind (`.text`) instead of `layer-`, and the 40-character cut lands on a word boundary. `html_codegen_tests` updated and extended. Numbers unchanged | | 2026-10-25 | minor | egui 0.37 capture lifecycle: screenshots with hidden or unknown visibility queue, request a hidden paint, and expire after 60 seconds if no capture arrives (headless-tested contract). Logic-only edits, saves and inspection continue while hidden. Native visible GUI and forced hidden-window paint, browser and Wayland behavior remain unqualified; parity percentages are unchanged. | | 2026-10-24 | minor | Server memory (#1134): when the last person leaves a file nobody edited, figcraft-server keeps the client ids it issued in the log instead of rewriting the snapshot (compaction still follows `compact_after`/`compact_mb` and edits), and a snapshot is encoded straight into its file buffer, without a second copy of the body; the file format is unchanged. Numbers unchanged |@@ -89,3 +89,6 @@ sync_github_name = true [people.mateusvillain] sync_github_name = true++[people.StrajnarFilip]+display_name = "Filip Strajnar"new file mode 100644@@ -0,0 +1,419 @@+//! FigJam generated layers (#1341). All document content and outlines are synthetic.++use super::*;++/// The synthetic FigJam schema adds generated layout and text alignment records.+fn board_schema() -> Schema {+ Schema::parse(&SCHEMA.replace(+ "\nmessage Blob ",+ ", GeneratedData nodeGenerationData, GeneratedData derivedImmutableFrameData, string textAlignHorizontal, string textAlignVertical\nmessage GeneratedData NodeChange[] overrides, uint version\nmessage Blob ",+ ))+ .unwrap()+}++/// Address a generated template child by its full GUID, independently of array order.+fn record(id: u64, mut fields: Vec<(&'static str, Kv<'static>)>) -> Kv<'static> {+ fields.push(("guidPath", o(vec![("guids", arr(vec![o(vec![("sessionID", u(40_000_000)), ("localID", u(id))])]))])));+ o(fields)+}++/// Synthetic styled text with an inline font-size override and explicit text paints.+fn text(chars: &str, size: f64) -> Vec<(&'static str, Kv<'static>)> {+ vec![+ (+ "textData",+ o(vec![+ ("characters", s(chars)),+ ("characterStyleIDs", arr(vec![u(0), u(1)])),+ ("styleOverrideTable", arr(vec![o(vec![("styleID", u(1)), ("fontSize", f(18.0))])])),+ ]),+ ),+ ("fontSize", f(size)),+ ("fontName", o(vec![("family", s("Synthetic Sans")), ("style", s("Bold"))])),+ ("fillPaints", arr(vec![solid(0.0, 0.0, 0.0)])),+ ("textAlignHorizontal", s("LEFT")),+ ("textAlignVertical", s("TOP")),+ ]+}++/// A synthetic note or shape with shuffled background, body and author records.+fn board_node(ty: &'static str) -> Kv<'static> {+ let background = record(0, vec![("fillPaints", arr(vec![solid(1.0, 0.75, 0.25)])), ("opacity", f(1.0))]);+ let note = record(1, text("Olá\nIdea", 24.0));+ let author = record(2, text("Test Author", 12.0));+ let bounds = |id, x, y, w, h| record(id, vec![("size", xy(w, h)), ("transform", at(x, y))]);+ node(+ 2,+ Some((1, "!")),+ ty,+ "Board object",+ vec![+ ("size", xy(240.0, 240.0)),+ ("transform", at(100.0, 150.0)),+ ("opacity", f(0.5)),+ ("shapeWithTextType", e("ELLIPSE")),+ // Deliberately shuffled: records are addressed by their full template GUID.+ ("nodeGenerationData", o(vec![("overrides", arr(vec![author, background, note]))])),+ (+ "derivedImmutableFrameData",+ o(vec![+ ("version", u(1)),+ (+ "overrides",+ arr(vec![+ bounds(2, 20.0, 204.0, 200.0, 16.0),+ bounds(1, 20.0, 20.0, 200.0, 160.0),+ record(+ 0,+ vec![+ ("size", xy(240.0, 240.0)),+ ("transform", at(0.0, 0.0)),+ ("fillGeometry", arr(vec![o(vec![("commandsBlob", u(0)), ("windingRule", e("NONZERO"))])])),+ ],+ ),+ ]),+ ),+ ]),+ ),+ ],+ )+}++/// Wrap one board object in a page with its synthetic triangle path blob.+fn message(layer: Kv<'static>) -> Kv<'static> {+ o(vec![+ ("nodeChanges", arr(vec![node(0, None, "DOCUMENT", "Synthetic board", vec![]), node(1, Some((0, "!")), "CANVAS", "Page", vec![]), layer])),+ ("blobs", arr(vec![o(vec![("bytes", Kv::Bytes(triangle_blob()))])])),+ ])+}++/// Encode and import a synthetic board through the public binary file importer.+fn imported(layer: Kv<'static>) -> (Document, Vec<String>) {+ import(&canvas(&board_schema(), &message(layer)), "Synthetic board").unwrap()+}++/// Generated records retain editable geometry, styled text, paints, bounds and authors.+#[test]+fn generated_stickies_and_shapes_keep_their_background_text_and_author() {+ for ty in ["STICKY", "SHAPE_WITH_TEXT"] {+ let (doc, warnings) = imported(board_node(ty));+ let frame = named(&doc, "Board object");+ assert!(matches!(frame.kind, NodeKind::Frame));+ assert_eq!(frame.opacity, 0.5);+ assert_eq!(frame.children.len(), if ty == "STICKY" { 3 } else { 2 });+ let background = doc.node(frame.children[0]).unwrap();+ assert!(matches!(background.kind, NodeKind::Vector { .. }));+ assert_eq!(background.fills[0].solid_color().unwrap().to_rgba8(), [255, 191, 64, 255]);+ assert_eq!(background.opacity, 1.0);+ let note = doc.node(frame.children[1]).unwrap();+ let t = note.kind.text().unwrap();+ assert_eq!(t.characters, "Olá\nIdea");+ assert_eq!(t.style.font_size, 24.0);+ assert_eq!(t.style.font_family, "Synthetic Sans");+ assert_eq!(note.fills[0].solid_color().unwrap().to_rgba8(), [0, 0, 0, 255]);+ assert_eq!(note.transform.translation(), figcraft_doc::geom::Vec2::new(20.0, 20.0));+ assert_eq!((note.width, note.height), (200.0, 160.0));+ assert!(t.runs.iter().any(|r| r.style.font_size == 18.0), "inline styles survive");+ if ty == "STICKY" {+ let author = doc.node(frame.children[2]).unwrap();+ assert_eq!(author.kind.text().unwrap().characters, "Test Author");+ assert_eq!(author.kind.text().unwrap().style.font_size, 12.0);+ assert_eq!(author.transform.translation(), figcraft_doc::geom::Vec2::new(20.0, 204.0));+ }+ assert!(!warnings.iter().any(|w| w.contains("skipped")), "{warnings:?}");+ }+}++/// Replace one fixture field, or add it when the synthetic object omits it.+fn set(value: &mut Kv<'static>, field: &'static str, replacement: Kv<'static>) {+ let Kv::Object(fields) = value else { panic!("object") };+ if let Some((_, old)) = fields.iter_mut().find(|(name, _)| *name == field) {+ *old = replacement;+ } else {+ fields.push((field, replacement));+ }+}++/// Incomplete text records warn while an independently valid background survives.+#[test]+fn missing_generated_bounds_warn_without_losing_the_background() {+ let mut layer = board_node("STICKY");+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![("version", u(1)), ("overrides", arr(vec![record(0, vec![("size", xy(240.0, 240.0)), ("transform", at(0.0, 0.0))])]))]),+ );+ let (doc, warnings) = imported(layer);+ let frame = named(&doc, "Board object");+ assert_eq!(frame.children.len(), 1);+ let background = doc.node(frame.children[0]).unwrap();+ assert!(matches!(background.kind, NodeKind::Rectangle));+ assert_eq!(background.fills.len(), 1);+ assert!(warnings.iter().any(|w| w.contains("missing its style or bounds")), "{warnings:?}");+}++/// Invalid child bounds are rejected before they reach the document model.+#[test]+fn invalid_generated_sizes_and_transforms_are_skipped() {+ for (width, x) in [(-1.0, 20.0), (f64::INFINITY, 20.0), (200.0, f64::NAN)] {+ let mut layer = board_node("STICKY");+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![("version", u(1)), ("overrides", arr(vec![record(1, vec![("size", xy(width, 160.0)), ("transform", at(x, 20.0))])]))]),+ );+ // The fixture encoder refuses non-finite floats; exercise the mapper's guard directly.+ let msg = message(layer);+ let (json, warnings, _) = map::to_rest(&msg, "Invalid bounds", 100);+ let (doc, _) = crate::rest::import(&json, &|_| None).unwrap();+ assert!(named(&doc, "Board object").children.is_empty());+ assert!(warnings.iter().any(|w| w.contains("invalid bounds")), "{warnings:?}");+ }+}++/// Unknown layout versions retain the legacy outer-frame and text fallback.+#[test]+fn unsupported_generated_versions_keep_the_legacy_fallback() {+ let mut layer = board_node("SHAPE_WITH_TEXT");+ set(&mut layer, "derivedImmutableFrameData", o(vec![("version", u(2))]));+ set(&mut layer, "textData", o(vec![("characters", s("Legacy text"))]));+ set(&mut layer, "fillPaints", arr(vec![solid(0.0, 1.0, 0.0)]));+ let (doc, warnings) = imported(layer);+ let frame = named(&doc, "Board object");+ assert_eq!(frame.fills.len(), 1);+ assert_eq!(frame.children.len(), 1);+ assert_eq!(doc.node(frame.children[0]).unwrap().kind.text().unwrap().characters, "Legacy text");+ assert!(warnings.iter().any(|w| w.contains("unsupported")), "{warnings:?}");+}++/// Generated backgrounds and text consume the same node budget as ordinary layers.+#[test]+fn generated_children_stay_within_the_layer_budget() {+ for cap in 1..6 {+ let msg = message(board_node("STICKY"));+ let (json, warnings, _) = map::to_rest(&msg, "Budget", cap);+ /// Count every emitted layer, including generated children.+ fn count(n: &Value) -> usize {+ 1 + n.get("children").and_then(Value::as_array).map_or(0, |kids| kids.iter().map(count).sum::<usize>())+ }+ assert_eq!(count(&json["document"]) - 2, cap.min(4), "{json}");+ if cap < 4 {+ assert!(warnings.iter().any(|w| w.contains("limit") || w.contains("skipped")), "{warnings:?}");+ }+ }+}++/// Malformed generated records remain safe to map and import.+#[test]+fn malformed_generated_records_never_panic() {+ for junk in [Kv::Bool(false), f(f64::NAN), f(f64::INFINITY), s("junk"), arr(vec![]), o(vec![])] {+ for field in ["nodeGenerationData", "derivedImmutableFrameData"] {+ let mut layer = board_node("STICKY");+ set(&mut layer, field, junk.clone());+ let msg = message(layer);+ let (json, _, _) = map::to_rest(&msg, "Junk", 100);+ let _ = crate::rest::import(&json, &|_| None);+ }+ }+}++/// A non-rectangular background saved only as an editable network, with no path geometry.+#[test]+fn generated_background_reads_its_network_before_falling_back_to_a_rectangle() {+ use super::super::network::{self, Network, Region, Segment, Vertex};++ let outline = network::encode(&Network {+ vertices: vec![Vertex { style: 0, x: 0.0, y: 0.0 }, Vertex { style: 0, x: 240.0, y: 0.0 }, Vertex { style: 0, x: 120.0, y: 240.0 }],+ segments: (0..3).map(|a| Segment { style: 0, a, b: (a + 1) % 3, ta: (0.0, 0.0), tb: (0.0, 0.0) }).collect(),+ regions: vec![Region { style: 0, non_zero: true, loops: vec![vec![0, 1, 2]] }],+ });+ for valid in [true, false] {+ let mut layer = board_node("SHAPE_WITH_TEXT");+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![+ ("version", u(1)),+ (+ "overrides",+ arr(vec![record(+ 0,+ vec![+ ("size", xy(240.0, 240.0)),+ ("transform", at(0.0, 0.0)),+ ("vectorData", o(vec![("vectorNetworkBlob", u(0)), ("normalizedSize", xy(240.0, 240.0))])),+ ],+ )]),+ ),+ ]),+ );+ let mut msg = message(layer);+ set(&mut msg, "blobs", arr(vec![o(vec![("bytes", Kv::Bytes(if valid { outline.clone() } else { b"damaged".to_vec() }))])]));+ let (doc, warnings) = import(&canvas(&board_schema(), &msg), "Network background").unwrap();+ let frame = named(&doc, "Board object");+ let background = doc.node(frame.children[0]).unwrap();+ if valid {+ let NodeKind::Vector { network } = &background.kind else { panic!("saved triangle must remain a vector") };+ assert_eq!(network.vertices.len(), 3);+ assert_eq!(network.segments.len(), 3);+ assert_eq!(network.regions.len(), 1);+ assert!(!warnings.iter().any(|w| w.contains("outline is missing")), "{warnings:?}");+ } else {+ assert!(matches!(background.kind, NodeKind::Rectangle));+ assert!(warnings.iter().any(|w| w.contains("outline is missing")), "{warnings:?}");+ }+ assert_eq!(background.fills[0].solid_color().unwrap().to_rgba8(), [255, 191, 64, 255]);+ }+}++/// Missing, invalid or blank generated text must not hide a usable outer text record.+#[test]+fn outer_text_survives_when_generated_text_does_not() {+ for ty in ["STICKY", "SHAPE_WITH_TEXT"] {+ for broken in 0..3 {+ let mut layer = board_node(ty);+ set(&mut layer, "textData", o(vec![("characters", s("Outer saved text"))]));+ set(&mut layer, "fontSize", f(30.0));+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![+ ("version", u(1)),+ (+ "overrides",+ arr(vec![+ record(0, vec![("size", xy(240.0, 240.0)), ("transform", at(0.0, 0.0))]),+ record(1, vec![("size", xy(if broken == 1 { -1.0 } else { 200.0 }, 160.0)), ("transform", at(20.0, 20.0))]),+ ]),+ ),+ ]),+ );+ if broken == 0 {+ set(+ &mut layer,+ "nodeGenerationData",+ o(vec![("overrides", arr(vec![record(0, vec![("fillPaints", arr(vec![solid(1.0, 0.75, 0.25)]))])]))]),+ );+ } else if broken == 2 {+ set(+ &mut layer,+ "nodeGenerationData",+ o(vec![(+ "overrides",+ arr(vec![record(0, vec![("fillPaints", arr(vec![solid(1.0, 0.75, 0.25)]))]), record(1, text(" ", 24.0))]),+ )]),+ );+ }+ let (doc, _) = imported(layer);+ let frame = named(&doc, "Board object");+ assert_eq!(frame.children.len(), 2, "background and fallback text both survive");+ assert!(matches!(doc.node(frame.children[0]).unwrap().kind, NodeKind::Rectangle));+ let text = doc.node(frame.children[1]).unwrap().kind.text().unwrap();+ assert_eq!(text.characters, "Outer saved text");+ assert_eq!(text.style.font_size, 30.0);+ }+ }+}++/// Valid generated text remains authoritative, while the outer fallback still obeys the cap.+#[test]+fn outer_text_fallback_avoids_duplicates_and_respects_the_layer_budget() {+ let mut layer = board_node("STICKY");+ set(&mut layer, "textData", o(vec![("characters", s("Outer saved text"))]));+ let (doc, _) = imported(layer.clone());+ assert!(!doc.nodes().any(|n| n.kind.text().is_some_and(|t| t.characters == "Outer saved text")));+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![("version", u(1)), ("overrides", arr(vec![record(0, vec![("size", xy(240.0, 240.0)), ("transform", at(0.0, 0.0))])]))]),+ );+ for cap in 1..4 {+ let (json, _, _) = map::to_rest(&message(layer.clone()), "Fallback budget", cap);+ let children = json["document"]["children"][0]["children"][0]["children"].as_array().map_or(0, Vec::len);+ assert_eq!(children + 1, cap);+ }+}++/// A damaged generated network still keeps usable fill or stroke outlines on the outer shape.+#[test]+fn outer_shape_outline_survives_a_damaged_generated_network() {+ for field in ["fillGeometry", "strokeGeometry"] {+ let mut layer = board_node("SHAPE_WITH_TEXT");+ set(&mut layer, field, arr(vec![o(vec![("commandsBlob", u(0)), ("windingRule", e("NONZERO"))])]));+ let paint = if field == "fillGeometry" { "fillPaints" } else { "strokePaints" };+ set(&mut layer, "nodeGenerationData", o(vec![("overrides", arr(vec![record(0, vec![(paint, arr(vec![solid(1.0, 0.75, 0.25)]))])]))]));+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![+ ("version", u(1)),+ (+ "overrides",+ arr(vec![record(+ 0,+ vec![+ ("size", xy(240.0, 240.0)),+ ("transform", at(0.0, 0.0)),+ ("vectorData", o(vec![("vectorNetworkBlob", u(1)), ("normalizedSize", xy(240.0, 240.0))])),+ ],+ )]),+ ),+ ]),+ );+ let mut msg = message(layer);+ set(&mut msg, "blobs", arr(vec![o(vec![("bytes", Kv::Bytes(triangle_blob()))]), o(vec![("bytes", Kv::Bytes(b"damaged".to_vec()))])]));+ let (doc, warnings) = import(&canvas(&board_schema(), &msg), "Outer shape outline").unwrap();+ let frame = named(&doc, "Board object");+ let background = doc.node(frame.children[0]).unwrap();+ let NodeKind::Vector { network } = &background.kind else { panic!("saved outer triangle must remain a vector") };+ assert_eq!(network.vertices.len(), 3, "{field}");+ assert_eq!(network.segments.len(), 3, "{field}");+ assert_eq!(background.fills[0].solid_color().unwrap().to_rgba8(), [255, 191, 64, 255]);+ assert!(frame.fills.is_empty());+ assert!(!warnings.iter().any(|w| w.contains("using its rectangle")), "{warnings:?}");+ }+}++/// A valid generated author cannot replace a missing, invalid or blank sticky body.+#[test]+fn outer_sticky_body_survives_alongside_the_generated_author() {+ for broken in 0..3 {+ let mut layer = board_node("STICKY");+ set(&mut layer, "textData", o(vec![("characters", s("Outer saved body"))]));+ set(&mut layer, "fontSize", f(30.0));+ let mut styles = vec![record(0, vec![("fillPaints", arr(vec![solid(1.0, 0.75, 0.25)]))]), record(2, text("Test Author", 12.0))];+ if broken != 0 {+ styles.push(record(1, text(if broken == 2 { " " } else { "Generated body" }, 24.0)));+ }+ set(&mut layer, "nodeGenerationData", o(vec![("overrides", arr(styles))]));+ set(+ &mut layer,+ "derivedImmutableFrameData",+ o(vec![+ ("version", u(1)),+ (+ "overrides",+ arr(vec![+ record(0, vec![("size", xy(240.0, 240.0)), ("transform", at(0.0, 0.0))]),+ record(1, vec![("size", xy(if broken == 1 { -1.0 } else { 200.0 }, 160.0)), ("transform", at(20.0, 20.0))]),+ record(2, vec![("size", xy(200.0, 16.0)), ("transform", at(20.0, 204.0))]),+ ]),+ ),+ ]),+ );+ let (doc, _) = imported(layer.clone());+ let frame = named(&doc, "Board object");+ assert_eq!(frame.children.len(), 3, "background, body and author survive (case {broken})");+ let texts: Vec<_> = frame.children.iter().filter_map(|id| doc.node(*id).and_then(|n| n.kind.text())).collect();+ assert_eq!(texts.len(), 2);+ let body = texts.iter().find(|t| t.characters == "Outer saved body").unwrap();+ assert_eq!(body.style.font_size, 30.0);+ let author = texts.iter().find(|t| t.characters == "Test Author").unwrap();+ assert_eq!(author.style.font_size, 12.0);+ for cap in 1..5 {+ let (json, _, _) = map::to_rest(&message(layer.clone()), "Author fallback budget", cap);+ let children = json["document"]["children"][0]["children"][0]["children"].as_array().map_or(0, Vec::len);+ assert_eq!(children + 1, cap);+ }+ }+}@@ -100,6 +100,15 @@ pub(super) fn adapt_warning(w: String) -> Option<String> { // ---- small readers ---- +/// A generated child is identified by one exact template GUID, not its array position.+fn generated_record<'a>(v: &View<'a>, field: &str, local_id: u32) -> Option<&'a Kv<'a>> {+ v.get(field)?.get("overrides")?.list().iter().find(|row| {+ row.get("guidPath").and_then(|path| path.get("guids")).map(Kv::list).is_some_and(|guids| {+ guids.len() == 1 && num(&guids[0], "sessionID") == Some(40_000_000.0) && num(&guids[0], "localID") == Some(f64::from(local_id))+ })+ })+}+ fn num(n: &Kv, k: &str) -> Option<f64> { n.get(k).and_then(Kv::f64) }@@ -58,7 +58,7 @@ impl<'a> Mapper<'a> { { return false; }- let Some(line) = connector_record(v, "derivedImmutableFrameData", 0) else { return false };+ let Some(line) = generated_record(v, "derivedImmutableFrameData", 0) else { return false }; if line.get("transform").and_then(matrix).is_none() || valid_size(line.get("size")).is_none() { return false; }@@ -76,7 +76,7 @@ impl<'a> Mapper<'a> { .and_then(|index| self.blobs.get(index as usize)) .and_then(|blob| network::decode(blob)) .is_some_and(|network| !network.segments.is_empty());- (geometry || network) && connector_record(v, "nodeGenerationData", 0).is_some()+ (geometry || network) && generated_record(v, "nodeGenerationData", 0).is_some() } pub(super) fn connector_snapshot_flatten(&mut self, out: &mut Obj, v: &View<'a>, rest_id: &str, space: Affine) {@@ -121,7 +121,7 @@ impl<'a> Mapper<'a> { /// Build the saved vector child or flattened terminal connector from the same child-only view. fn connector_snapshot_vector(&mut self, v: &View<'a>, rest_id: &str, space: Affine, nested: bool) -> Option<Obj> {- let (Some(line), Some(line_style)) = (connector_record(v, "derivedImmutableFrameData", 0), connector_record(v, "nodeGenerationData", 0))+ let (Some(line), Some(line_style)) = (generated_record(v, "derivedImmutableFrameData", 0), generated_record(v, "nodeGenerationData", 0)) else { return None; };@@ -156,19 +156,19 @@ impl<'a> Mapper<'a> { children.push(Value::Object(vector)); self.count += 1; - let Some(text_frame) = connector_record(v, "derivedImmutableFrameData", 1) else {+ let Some(text_frame) = generated_record(v, "derivedImmutableFrameData", 1) else { if connector_has_saved_label(v) { self.warn("connector label was skipped: derived text bounds are missing"); } return children; };- let Some(background) = connector_record(v, "derivedImmutableFrameData", 2) else {+ let Some(background) = generated_record(v, "derivedImmutableFrameData", 2) else { if connector_has_saved_label(v) || valid_size(text_frame.get("size")).is_some_and(|(w, h)| w > 0.0 && h > 0.0) { self.warn("connector label was skipped: derived background bounds are missing"); } return children; };- let Some(text_style) = connector_record(v, "nodeGenerationData", 1) else {+ let Some(text_style) = generated_record(v, "nodeGenerationData", 1) else { if valid_size(text_frame.get("size")).is_some_and(|(w, h)| w > 0.0 && h > 0.0) { self.warn("connector label was skipped: text style data is missing"); }@@ -200,7 +200,7 @@ impl<'a> Mapper<'a> { return children; } - let Some(background_style) = connector_record(v, "nodeGenerationData", 2) else {+ let Some(background_style) = generated_record(v, "nodeGenerationData", 2) else { self.warn("connector label background was skipped: style data is missing"); self.add_connector_text(&mut children, rest_id, characters, text_size, composed_text_transform, &text_view); return children;@@ -252,18 +252,9 @@ impl<'a> Mapper<'a> { } } -/// A generated connector child is identified by one exact template GUID, not its array position.-fn connector_record<'a>(v: &View<'a>, field: &str, local_id: u32) -> Option<&'a Kv<'a>> {- v.get(field)?.get("overrides")?.list().iter().find(|row| {- row.get("guidPath").and_then(|path| path.get("guids")).map(Kv::list).is_some_and(|guids| {- guids.len() == 1 && num(&guids[0], "sessionID") == Some(40_000_000.0) && num(&guids[0], "localID") == Some(f64::from(local_id))- })- })-}- pub(super) fn connector_has_saved_label(v: &View<'_>) -> bool { own_text(v).is_some()- || connector_record(v, "nodeGenerationData", 1)+ || generated_record(v, "nodeGenerationData", 1) .and_then(|r| r.get("textData")) .and_then(|d| d.get("characters")) .and_then(Kv::str)@@ -267,8 +267,12 @@ impl<'a> Mapper<'a> { } } if stand.is_some_and(|s| s.0 == "FRAME") {- kids.splice(0..0, self.shape_with_text(&mut o, &view, own, &rest_id));- kids.extend(self.inner_text(&o, &view, &rest_id, own == "STICKY"));+ if let Some(snapshot) = self.board_snapshot(&mut o, &view, own, &rest_id, depth) {+ kids.splice(0..0, snapshot);+ } else {+ kids.splice(0..0, self.shape_with_text(&mut o, &view, own, &rest_id));+ kids.extend(self.inner_text(&o, &view, &rest_id, own == "STICKY"));+ } } if !kids.is_empty() { o.insert("children".into(), Value::Array(kids));@@ -276,6 +280,85 @@ impl<'a> Mapper<'a> { Some(Value::Object(o)) } + /// FigJam notes and shapes keep their paints and text on generated template children,+ /// not on the outer node. Keep the saved layout as ordinary editable layers (including a+ /// note's author), without applying the background's opacity or transform to the wrapper.+ /// When no generated body survives, retain usable outer text alongside successful children.+ fn board_snapshot(&mut self, o: &mut Obj, v: &View<'a>, own: &str, rest_id: &str, depth: usize) -> Option<Vec<Value>> {+ if !matches!(own, "STICKY" | "SHAPE_WITH_TEXT") || v.get("nodeGenerationData").is_none() {+ return None;+ }+ if v.get("derivedImmutableFrameData").and_then(|d| num(d, "version")) != Some(1.0) {+ self.warn("note or shape generated layout is missing or unsupported; using its outer frame");+ return None;+ }+ let mut children = Vec::new();+ let mut has_body = false;+ for local_id in 0..if own == "STICKY" { 3 } else { 2 } {+ let style = generated_record(v, "nodeGenerationData", local_id);+ let bounds = generated_record(v, "derivedImmutableFrameData", local_id);+ let (Some(style), Some(bounds)) = (style, bounds) else {+ if style.is_some() || bounds.is_some() {+ self.warn("note or shape generated child is missing its style or bounds; child skipped");+ }+ continue;+ };+ let child = View::of(style).with([bounds]);+ let chars = own_text(&child);+ if local_id != 0 && chars.is_none() {+ continue;+ }+ if valid_size(child.get("size")).is_none() || child.transform().is_none() {+ self.warn("note or shape generated child has invalid bounds; child skipped");+ continue;+ }+ if self.count >= self.budget() || depth >= MAX_DEPTH {+ self.warn("note or shape generated children exceed the layer or nesting limit; remaining children skipped");+ break;+ }+ let mut layer = Obj::new();+ let ty = if local_id == 0 { "RECTANGLE" } else { "TEXT" };+ layer.insert("id".into(), json!(format!("{rest_id};generated{local_id}")));+ layer.insert("type".into(), json!(ty));+ layer.insert("name".into(), json!(chars.map_or_else(|| "Background".into(), |c| c.chars().take(40).collect::<String>())));+ self.common(&mut layer, &child, ty, Affine::IDENTITY, None);+ if local_id == 0 {+ // Network decoding is only enabled for vectors; choose that type before+ // geometry sees a saved network, then restore the rectangle if it is unusable.+ if child.get("vectorData").is_some() {+ layer.insert("type".into(), json!("VECTOR"));+ }+ self.geometry(&mut layer, &child);+ let outlined = |layer: &Obj| ["fillGeometry", "strokeGeometry", "vectorNetworkRef"].iter().any(|key| layer.contains_key(*key));+ if own == "SHAPE_WITH_TEXT" && !outlined(&layer) {+ self.geometry(&mut layer, v);+ }+ if outlined(&layer) {+ layer.insert("type".into(), json!("VECTOR"));+ } else {+ layer.insert("type".into(), json!("RECTANGLE"));+ if own == "SHAPE_WITH_TEXT" && !matches!(v.str("shapeWithTextType"), None | Some("SQUARE" | "ROUNDED_RECTANGLE")) {+ self.warn("shape generated outline is missing or damaged; using its rectangle");+ }+ }+ o.insert("fills".into(), json!([]));+ o.insert("strokes".into(), json!([]));+ } else {+ self.text(&mut layer, &child);+ if let Some(Value::Object(style)) = layer.get_mut("style") {+ style.insert("textAutoResize".into(), json!("NONE"));+ }+ }+ self.count += 1;+ has_body |= local_id == 1;+ children.push(Value::Object(layer));+ }+ if depth < MAX_DEPTH && !has_body {+ children.extend(self.inner_text(o, v, rest_id, own == "STICKY"));+ }+ Some(children)+ }+ /// A non-rectangular shape-with-text's shape, as a vector under its frame (which gives up its /// paints to it). fn shape_with_text(&mut self, o: &mut Obj, v: &View<'a>, own: &str, rest_id: &str) -> Option<Value> {@@ -1212,3 +1212,6 @@ fn dump_samples() { std::fs::write(format!("{out}/{stem}.rest.json"), serde_json::to_string_pretty(&rest).unwrap()).unwrap(); } }++#[path = "board_import_tests.rs"]+mod board;@@ -1722,6 +1722,10 @@ name = "English" "no bleed" = "no bleed" "nobody else here yet" = "nobody else here yet" "non-default slot settings are not represented and were skipped" = "non-default slot settings are not represented and were skipped"+"note or shape generated child has invalid bounds; child skipped" = "note or shape generated child has invalid bounds; child skipped"+"note or shape generated child is missing its style or bounds; child skipped" = "note or shape generated child is missing its style or bounds; child skipped"+"note or shape generated children exceed the layer or nesting limit; remaining children skipped" = "note or shape generated children exceed the layer or nesting limit; remaining children skipped"+"note or shape generated layout is missing or unsupported; using its outer frame" = "note or shape generated layout is missing or unsupported; using its outer frame" "now" = "now" "offer files to save if it asks to (you choose where each one goes)" = "offer files to save if it asks to (you choose where each one goes)" "only in a text style or variable" = "only in a text style or variable"@@ -1745,6 +1749,7 @@ name = "English" "set-variable actions with values that don't fit the variable were skipped" = "set-variable actions with values that don't fit the variable were skipped" "set-variable actions without a value were skipped" = "set-variable actions without a value were skipped" "set-variable-mode actions on collections or modes that aren't in the variables JSON were skipped" = "set-variable-mode actions on collections or modes that aren't in the variables JSON were skipped"+"shape generated outline is missing or damaged; using its rectangle" = "shape generated outline is missing or damaged; using its rectangle" "slot content assignment target is missing or is not slot content" = "slot content assignment target is missing or is not slot content" "slot content assignment uses the empty GUID sentinel and was skipped" = "slot content assignment uses the empty GUID sentinel and was skipped" "slot layers without a matching slot property were imported as frames" = "slot layers without a matching slot property were imported as frames"@@ -1,6 +1,6 @@ # File format parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-26 · **Change:** minor (Android Vector Drawable (XML) export; `.fig` export: files the incumbent imports, with component set properties, and grid track sizes at its field ids; Save and auto-save don't replace changes another app made to the open file (#1330); `.sketch` import, best effort, Sketch 48 and newer; the PNG row names ignore overlapping layers and where include bounding box is offered; the Fonts table's missing-font row describes the Missing fonts window; `.figcraft` carries the file kind (boards); `.fig` import: resized instances and variable modes by asset key; atomic saves; auto-save; SVG export clip of nested frames; SVG/PDF export depth refusal (#208); `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; `.fig` export: written files checked by opening them in other software; experimental `.fig` export; export and inspect behaviour suite and fixes; .fig import: editable vector networks and more layer kinds; embedded image colour profiles; `.fig` import, best effort; animated GIF fills and TIFF images; last major: created, formats from the installed Figma's Info.plist and help center, ours from source; REST import keeps slot layers and instances' slot content (#792); REST import reads grid track sizes (#465); `.fig` import fidelity from the community batches, budgets for large files, the import report, a `.fig` copy from Save as, paste from another design app; instance layers' size and resizing and Hug on import (#731, #732)) · **Target:** Figma Design (desktop app 126.10.7)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** minor (FigJam outer shape outlines and sticky body fallback beside author text (#1341, #1397); Android Vector Drawable (XML) export; `.fig` export: files the incumbent imports, with component set properties, and grid track sizes at its field ids; Save and auto-save don't replace changes another app made to the open file (#1330); `.sketch` import, best effort, Sketch 48 and newer; the PNG row names ignore overlapping layers and where include bounding box is offered; the Fonts table's missing-font row describes the Missing fonts window; `.figcraft` carries the file kind (boards); `.fig` import: resized instances and variable modes by asset key; atomic saves; auto-save; SVG export clip of nested frames; SVG/PDF export depth refusal (#208); `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; `.fig` export: written files checked by opening them in other software; experimental `.fig` export; export and inspect behaviour suite and fixes; .fig import: editable vector networks and more layer kinds; embedded image colour profiles; `.fig` import, best effort; animated GIF fills and TIFF images; last major: created, formats from the installed Figma's Info.plist and help center, ours from source; REST import keeps slot layers and instances' slot content (#792); REST import reads grid track sizes (#465); `.fig` import fidelity from the community batches, budgets for large files, the import report, a `.fig` copy from Save as, paste from another design app; instance layers' size and resizing and Hug on import (#731, #732)) · **Target:** Figma Design (desktop app 126.10.7) Every format Figma reads or writes, with FigCraft's support. Sources: `Info.plist` of `/Applications/Figma.app` (document types only; nothing inside the bundle's code was read), Figma's@@ -17,9 +17,9 @@ and prototype interactions are still unchecked there. | Format | Figma | FigCraft read | FigCraft write | Fidelity / testing | Hours | |---|---|---|---|---|---|-| `.fig` (Figma Design, `com.figma.document`, `application/x-figma`) | native (cloud; "Save local copy") | **yes, best effort** (`file.open`, `file.import`, drop, CLI, MCP) | **experimental** ([below](#export-to-fig-experimental)) | `.fig` files open (best effort): the zip, its deflate/zstd chunks and the kiwi schema are decoded generically and mapped by field name onto the REST importer, so pages, the layer tree, geometry, paints (styles resolved), strokes, effects, text with styled runs, vectors as editable vector networks (points, curved segments, filled areas with their winding, per-point corner radius and handle mirroring, end caps; outlines when the network is missing or damaged), auto layout (grid included; a flow that records no primary-axis sizing hugs on that axis, an instance that records no auto layout has its main's), constraints, ellipse arcs, boolean operations, components, sets (with their descriptions), instances (expanded from their main with overrides, derived layout and property values; the size and resizing their layers override stay overrides), styles, variables with modes and bindings, prototyping (set-variable, set-variable-mode and conditional actions included) and image fills from the archive come across; sticky notes, shapes with text, connectors, tables, code blocks, slides and similar layers come in as the closest frames, text layers and vectors, with a warning; anything else is a warning. Since 2026-10-17 (community batches #727, #728): an instance's own identity and the cached library components a file carries, overrides applied by key and order, local text values and instance overrides over a shared text style, grid track sizes (fixed, content-sized, fill), slot content, labels of connectors saved with their drawn path (a static snapshot; the ends aren't live), skip ink, paragraph options and hanging lists, list start numbers, vertical trim, per-point stroke joins, editable text on a path, image adjustments and images carried in the message. Budgets come from the file's own size (one value per compressed byte, 20M–128M, lower ceilings on 32-bit targets; the layer cap follows), so a 15.4 MB synthetic file with 300,000 layers opens whole; the file's bytes stay out of the command journal; an import report lists what was left out or changed once the file opens. Not read: elbowed or curved connectors without a saved path (drawn straight) and labels of connectors without a saved snapshot, table cells beyond their own layers, filled areas with their own fills, variables bound to fields the editor can't bind, video fills. Tested on fixtures generated in code (`crates/format/src/fig/tests.rs`, `tail_tests.rs` and the per-feature `*_tests.rs` beside them, fuzzed) and by reading back what the export writes; no real-world files yet | read tail 5–10, write: checks against real files 5–15 |+| `.fig` (Figma Design, `com.figma.document`, `application/x-figma`) | native (cloud; "Save local copy") | **yes, best effort** (`file.open`, `file.import`, drop, CLI, MCP) | **experimental** ([below](#export-to-fig-experimental)) | `.fig` files open (best effort): the zip, its deflate/zstd chunks and the kiwi schema are decoded generically and mapped by field name onto the REST importer, so pages, the layer tree, geometry, paints (styles resolved), strokes, effects, text with styled runs, vectors as editable vector networks (points, curved segments, filled areas with their winding, per-point corner radius and handle mirroring, end caps; outlines when the network is missing or damaged), auto layout (grid included; a flow that records no primary-axis sizing hugs on that axis, an instance that records no auto layout has its main's), constraints, ellipse arcs, boolean operations, components, sets (with their descriptions), instances (expanded from their main with overrides, derived layout and property values; the size and resizing their layers override stay overrides), styles, variables with modes and bindings, prototyping (set-variable, set-variable-mode and conditional actions included) and image fills from the archive come across; sticky notes and shapes with text keep their generated backgrounds, styled text, text paints, saved child bounds and sticky author lines as editable frame children, including saved vector networks without geometry paths, outer fill/stroke outlines when generated geometry is damaged, and outer body text when its generated child is unusable even if an author survives (#1341, #1397); connectors, tables, code blocks, slides and similar layers come in as the closest frames, text layers and vectors, with a warning; anything else is a warning. Since 2026-10-17 (community batches #727, #728): an instance's own identity and the cached library components a file carries, overrides applied by key and order, local text values and instance overrides over a shared text style, grid track sizes (fixed, content-sized, fill), slot content, labels of connectors saved with their drawn path (a static snapshot; the ends aren't live), skip ink, paragraph options and hanging lists, list start numbers, vertical trim, per-point stroke joins, editable text on a path, image adjustments and images carried in the message. Budgets come from the file's own size (one value per compressed byte, 20M–128M, lower ceilings on 32-bit targets; the layer cap follows), so a 15.4 MB synthetic file with 300,000 layers opens whole; the file's bytes stay out of the command journal; an import report lists what was left out or changed once the file opens. Not read: elbowed or curved connectors without a saved path (drawn straight) and labels of connectors without a saved snapshot, table cells beyond their own layers, filled areas with their own fills, variables bound to fields the editor can't bind, video fills. Tested on fixtures generated in code (`crates/format/src/fig/tests.rs`, `tail_tests.rs` and the per-feature `*_tests.rs` beside them, fuzzed) and by reading back what the export writes; the FigJam report sample from #1341 checked locally only; no representative real-world corpus yet | read tail 5–10, write: checks against real files 5–15 | | `.sketch` (Sketch 48 and newer) | import (file browser ▸ Import or drop, desktop app too; converted to a Figma file, symbols as components; per the help center) | **yes, best effort** (`file.open`, `file.import`, drop, CLI, MCP; Open With from Finder, Explorer and Linux file managers once installed; recent files show its `previews/preview.png`) | no (out of scope) | zip + JSON read from the public format description; Sketch 43–47 (text as binary property lists) and older (SQLite) files are refused with a message to resave them in a newer Sketch. Pages, artboards as frames with their background, groups; Sketch 2025 and newer: frames (clipping or not) with their style, graphics, stacks as auto layout (direction, gap, alignment, padding, wrap, hug/fill sizing, items ignoring the stack), corners in the style (rounded, smooth with its smoothing; angled, inside square and inside arc as paths), pins and sizing, per-side borders, lists of blurs (progressive background blurs, glass), inner shadows in the shadow list, tints (a graphic's, group's or instance's fill colouring its layers, and colour overrides), text colour and visibility overrides, text sized by its sizing; rectangles with corner radii, ovals, stars and polygons while their points are the generated ones, paths as editable vector networks, shape groups as their shape, as one compound path (children without an operation, by the group's winding rule) or as boolean operations (mixed operations nested from the left); open paths filled as if closed, edited ovals and rectangles as paths, bitmaps (with their colour adjustments as image filters), slices, hotspots; transforms (rotation, flips after it), resizing constraints; fills (solid, gradients with Sketch's geometry, image patterns), borders (the first enabled border's width and position), shadows, inner shadows, layer and background blurs, opacity and blend modes; clipping masks (an outline mask that shows its own style draws a copy under itself, as Sketch does; alpha masks only mask; broken mask chains wrapped), progressive opacity (Fade) as an alpha mask of its gradient; text with styled runs (UTF-16 ranges), paragraph and vertical alignment, lines placed by Sketch's line spacing behaviour, box sizing, fonts found by their PostScript names among the installed ones (else the family read from the name), variable font axes, Sketch's natural line (ascent and descent rounded, no line gap, a fifth more for classic Mac fonts) for text without a fixed line height; symbols as components (library copies on a page of their own) and instances carrying their masters' layers with overrides (text, nested swaps and hiding, images, layer and text styles, nested paths), laid out for their size the way Sketch does it (proportional sharing per pins from format 110, scaling before) and still live; master backgrounds in instances only where Sketch shows them; Apple's system fonts found under the names designs use, with the platform's tracking kept as letter spacing; shared layer styles as paint (fills, border colours) and effect styles, shared text styles as text styles; Color Variables (also library ones) as colour variables with bindings; prototype links, flow starts, export options, layout and square grids (hidden, as Sketch shows them only in its layout view). Instances of a stack laid out at their size and texts an override changed measured again on open. Warnings: noise fills, motion and zoom blurs (drawn as plain blurs), fonts embedded with their data (not used), Smart Layout (kept as laid out), locked overrides, scaled instances. Tested on fixtures built in code (`crates/format/src/sketch/*_tests.rs`, fuzzed) and locally (`FIGCRAFT_SKETCH_SAMPLES`) on one real Sketch 50 file and the public Apache-2.0 IBM Carbon Design Kit saved by Sketch 68 and 83 (70,000 layers open in ~3 s, debug build; its edition saved by Sketch 47 is refused, as it should be); compared artboard by artboard with Sketch 2026's own renders (`FIGCRAFT_SKETCHTOOL`, black-box): the Sketch 50 file's 73 artboards differ in at most 2.3% of their pixels (0.8% on average) (text metrics, fonts FigCraft doesn't find, antialiasing), Carbon 11's 69 1.1% on average and at most 4.4% (text in IBM Plex, which the file embeds and FigCraft doesn't use yet), a Sketch 64 file's 65 artboards 2.1% on average, a Sketch 2026 showcase file's 16 frames 0.9% on average (at most 1.9%) | 5–10 (Smart Layout as auto layout, motion and zoom blurs, several borders of different widths; fonts embedded in the file once `.figcraft` documents can carry fonts: until then they would only last the session) |-| `.jam` (whiteboards), `.deck` (Slides) | native to other Figma products | no | no | `.jam`: not read or written (boards are FigCraft files, see [boards-parity](boards-parity.md)); `.deck` out of scope | — |+| `.jam` (whiteboards), `.deck` (Slides) | native to other Figma products | no | no | direct `.jam` opening is not supported (#1342); its `canvas.fig` can be read best effort after renaming a copy to `.fig`, with generated sticky/shape backgrounds and text kept (#1341), as ordinary design layers rather than native board objects (see [boards-parity](boards-parity.md)); writing `.jam` is not supported; `.deck` out of scope | — | | REST API file JSON (`GET /v1/files/:key`) + local variables JSON + `images/` folder | the API's output | **yes** (`file.open`, `file.import`, CLI) | no | pages, layer tree, geometry, paints, strokes, effects, text runs, vectors, auto layout (sizing modes left out read as hug, as documented; grid track sizes from `gridColumnsSizing` / `gridRowsSizing`: px, fr, auto, `minmax(0, 1fr)`, `repeat()`), constraints, grids, components, sets, instances with overrides (sizes and resizing included), component properties, slots (`SLOT` layers bound to their slot property; an instance's slot keeps its content as the instance's own unless its property value is the main's default content; slot limits and preferred components are warnings), styles, prototyping (incl. conditionals and variable modes), variables with modes, aliases, scopes and bindings, image adjustments (the same tint sign as `.fig`); the import report after opening; warnings for what's skipped (video triggers and actions, modifier keys). Unit tests in `crates/format/src/rest/*_tests.rs` | — | | `.figcraft` (ours: zip of `document.json` + images, versions inside) | — | yes | yes | streamed JSON, 50k layers save ~0.09 s / load ~0.16 s (`cargo xtask bench`); old files keep opening (`large_tests.rs`); saves write a unique staging file and rename it into place (#284); optional auto-save of files with a path (`pref.autoSave`, #305); Save and auto-save refuse to write over a file another app (figcraft-cli, say) changed since it was opened or saved here, judged by its size and modification time: Revert to saved loads those changes, Save as keeps both, `file.save {overwrite: true}` replaces them (#1330); `kind: "board"` marks a board (left out for design files, so files from before boards are design files; the home screen reads it for the file's mark); board objects keep their `board` metadata on the layer; Dev Mode measurements are kept on the layer they start from (`measurements: [{to} | {side}]`, left out when there are none, so older files open with none) | — | | Local library files | team libraries in the cloud | yes (enable a `.figcraft` as a library) | yes (publish) | per-asset versions, updates with overrides kept | see [collaboration-parity](collaboration-parity.md) |@@ -181,6 +181,9 @@ each. | Date | Change | Summary | |---|---|---|+| 2026-10-27 | minor | M6, #1397: damaged generated FigJam shape geometry falls back to usable outer fill or stroke outlines before a rectangle; a surviving sticky author no longer suppresses the outer body-text fallback. Synthetic regressions cover both outlines, missing/invalid/blank bodies, author retention and layer budgets. Numbers unchanged. |+| 2026-10-26 | minor | M6, #1397: generated FigJam backgrounds read saved vector networks before rectangle fallback; missing or invalid generated text uses the outer text without discarding successful children or exceeding the layer budget. Regression tests cover both paths. Numbers unchanged. |+| 2026-10-26 | minor | FigJam generated sticky notes and shapes with text (#1341): backgrounds, text with its typography and paints, saved bounds and sticky author lines import as editable frame children; synthetic regressions and a local check of the report sample; native board metadata and direct `.jam` opening remain outside this fix. Numbers unchanged. | | 2026-10-26 | minor | Changes made to the open file by another app are no longer lost on save (#1330): the app now remembers the file's size and modification time when it opens, reverts or saves it, and Save and auto-save refuse while the file on disk differs, with a message pointing to Revert to saved or Save as (the tab stays unsaved; closing it stays open). Scripts pass `file.save {overwrite: true}` to replace the file anyway; Save as and a save to an explicit `path` write as before. Not detected: a change of the same size inside one modification-time tick of a coarse file system. No prompt with choices yet, and a change isn't noticed until a save (`save_disk_changes_tests`). Numbers unchanged | | 2026-10-25 | patch | PNG: the export settings were listed as "contents only" and "include bounding box (the layer's own box)"; the row now names ignore overlapping layers, on by default, and says that the Export section offers include bounding box for text layers (#1307), while `file.export` and `export.update` take it for any layer. Numbers unchanged | | 2026-10-24 | patch | Fonts: the missing-font row said "warnings only (REST import)"; it now names the Missing fonts window (#752), `text.missingFonts` and the `missing font` lines of `figcraft-cli info`. Replacing a missing font is still missing. Numbers unchanged |@@ -1,6 +1,6 @@ # Where FigCraft falls short of Figma -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** minor (gap 17: branches in live sessions, branch history entries, the list-merge rows brought up to date; gap 6: plugin widgets take text input and a property menu (plugin API 4); gap 24: board templates and tables; gap 24: a shared timer and voting sessions; gap 24: the board dot grid, connector ends dragged to re-attach, curved connectors; egui/eframe 0.37 verified for gap 18; known gaps from the #1311 review in gaps 4, 14, 15 and 16; gap 16: measurements kept on the canvas, a read-only layers panel in Dev Mode; gap 24: boards and their tail; Dev Mode tail: import lines in layer trees, compare with versions, an inspect-only canvas; gap 5: reviewed Turkish, Czech and Indonesian drafts, the Japanese draft completed; reviewed Russian catalog and integer plurals; `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; sharing with a join code; text box sizes measured against documents re-saved by other software; live sessions per document; .fig export checked by opening written files in other software; experimental .fig export; keyboard shortcut parity suite and bindings; Simplified Chinese draft catalog; Latin American Spanish overlay; prototyping tail: gamepad triggers, widgets in prototypes, mode lookups; plugin directory on figcraft-server; Japanese and Korean draft catalogs and CJK UI fonts; plugin widgets and the plugin panel tail; French, German and Brazilian Portuguese draft catalogs; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and edit tail; dev resources links; extended collections tail; branch version history and finer list merges; comments and version history behaviour suite and fixes; canvas navigation, guides and grids behaviour suite and fixes; `.fig` import: editable vector networks, more layer kinds, variable prototype actions; `.fig` import, best effort: gap 1 down to its tail; Windows QA pass: everyday workflows on Windows 11, eight fixes incl. unsaved work kept after a crash or a forced quit; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; localization layer with a draft Spanish catalog; hosting figcraft-server: wss in the desktop app, server releases, deployment guide; plugin panels and settings; canvas fixes: boolean hit testing on the result, group drags, frame outlines and slices; code connect; stretch and scatter brushes, pen pressure; text on a path and pattern fills; team libraries on the server and swap library; branches: create, update from main, review and merge; animated GIF fills and TIFF images; Open recent, outlines for the selection and mask outlines: menu breadth 100%; extended collections, variables import/export, gradient stop and variant bindings: gap 14 down to its tail; the 2026-10-17 landings: `.fig` import fidelity, budgets for large files, the import report, a `.fig` copy from Save as and paste from another design app (gap 1); menus, the Actions palette, editor fixes, Selection colors and smart-selection spacing (gap 4); catalog counts re-measured (gap 5); bounded canvas pan overscan; reviewed Russian catalog and integer plurals; `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; sharing with a join code; text box sizes measured against documents re-saved by other software; live sessions per document; .fig export checked by opening written files in other software; experimental .fig export; keyboard shortcut parity suite and bindings; Simplified Chinese draft catalog; Latin American Spanish overlay; prototyping tail: gamepad triggers, widgets in prototypes, mode lookups; plugin directory on figcraft-server; Japanese and Korean draft catalogs and CJK UI fonts; plugin widgets and the plugin panel tail; French, German and Brazilian Portuguese draft catalogs; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and edit tail; dev resources links; extended collections tail; branch version history and finer list merges; comments and version history behaviour suite and fixes; canvas navigation, guides and grids behaviour suite and fixes; `.fig` import: editable vector networks, more layer kinds, variable prototype actions; `.fig` import, best effort: gap 1 down to its tail; Windows QA pass: everyday workflows on Windows 11, eight fixes incl. unsaved work kept after a crash or a forced quit; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; localization layer with a draft Spanish catalog; hosting figcraft-server: wss in the desktop app, server releases, deployment guide; plugin panels and settings; canvas fixes: boolean hit testing on the result, group drags, frame outlines and slices; code connect; stretch and scatter brushes, pen pressure; text on a path and pattern fills; team libraries on the server and swap library; branches: create, update from main, review and merge; animated GIF fills and TIFF images; Open recent, outlines for the selection and mask outlines: menu breadth 100%; extended collections, variables import/export, gradient stop and variant bindings: gap 14 down to its tail) · **Target:** Figma Design (desktop app 126.10.7)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** minor (FigJam outer shape outlines and sticky body fallback beside author text (#1341, #1397); gap 17: branches in live sessions, branch history entries, the list-merge rows brought up to date; gap 6: plugin widgets take text input and a property menu (plugin API 4); gap 24: board templates and tables; gap 24: a shared timer and voting sessions; gap 24: the board dot grid, connector ends dragged to re-attach, curved connectors; egui/eframe 0.37 verified for gap 18; known gaps from the #1311 review in gaps 4, 14, 15 and 16; gap 16: measurements kept on the canvas, a read-only layers panel in Dev Mode; gap 24: boards and their tail; Dev Mode tail: import lines in layer trees, compare with versions, an inspect-only canvas; gap 5: reviewed Turkish, Czech and Indonesian drafts, the Japanese draft completed; reviewed Russian catalog and integer plurals; `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; sharing with a join code; text box sizes measured against documents re-saved by other software; live sessions per document; .fig export checked by opening written files in other software; experimental .fig export; keyboard shortcut parity suite and bindings; Simplified Chinese draft catalog; Latin American Spanish overlay; prototyping tail: gamepad triggers, widgets in prototypes, mode lookups; plugin directory on figcraft-server; Japanese and Korean draft catalogs and CJK UI fonts; plugin widgets and the plugin panel tail; French, German and Brazilian Portuguese draft catalogs; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and edit tail; dev resources links; extended collections tail; branch version history and finer list merges; comments and version history behaviour suite and fixes; canvas navigation, guides and grids behaviour suite and fixes; `.fig` import: editable vector networks, more layer kinds, variable prototype actions; `.fig` import, best effort: gap 1 down to its tail; Windows QA pass: everyday workflows on Windows 11, eight fixes incl. unsaved work kept after a crash or a forced quit; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; localization layer with a draft Spanish catalog; hosting figcraft-server: wss in the desktop app, server releases, deployment guide; plugin panels and settings; canvas fixes: boolean hit testing on the result, group drags, frame outlines and slices; code connect; stretch and scatter brushes, pen pressure; text on a path and pattern fills; team libraries on the server and swap library; branches: create, update from main, review and merge; animated GIF fills and TIFF images; Open recent, outlines for the selection and mask outlines: menu breadth 100%; extended collections, variables import/export, gradient stop and variant bindings: gap 14 down to its tail; the 2026-10-17 landings: `.fig` import fidelity, budgets for large files, the import report, a `.fig` copy from Save as and paste from another design app (gap 1); menus, the Actions palette, editor fixes, Selection colors and smart-selection spacing (gap 4); catalog counts re-measured (gap 5); bounded canvas pan overscan; reviewed Russian catalog and integer plurals; `.fig` export: instance sizes, variables with modes, shared styles, variable-width strokes; sharing with a join code; text box sizes measured against documents re-saved by other software; live sessions per document; .fig export checked by opening written files in other software; experimental .fig export; keyboard shortcut parity suite and bindings; Simplified Chinese draft catalog; Latin American Spanish overlay; prototyping tail: gamepad triggers, widgets in prototypes, mode lookups; plugin directory on figcraft-server; Japanese and Korean draft catalogs and CJK UI fonts; plugin widgets and the plugin panel tail; French, German and Brazilian Portuguese draft catalogs; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and edit tail; dev resources links; extended collections tail; branch version history and finer list merges; comments and version history behaviour suite and fixes; canvas navigation, guides and grids behaviour suite and fixes; `.fig` import: editable vector networks, more layer kinds, variable prototype actions; `.fig` import, best effort: gap 1 down to its tail; Windows QA pass: everyday workflows on Windows 11, eight fixes incl. unsaved work kept after a crash or a forced quit; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; localization layer with a draft Spanish catalog; hosting figcraft-server: wss in the desktop app, server releases, deployment guide; plugin panels and settings; canvas fixes: boolean hit testing on the result, group drags, frame outlines and slices; code connect; stretch and scatter brushes, pen pressure; text on a path and pattern fills; team libraries on the server and swap library; branches: create, update from main, review and merge; animated GIF fills and TIFF images; Open recent, outlines for the selection and mask outlines: menu breadth 100%; extended collections, variables import/export, gradient stop and variant bindings: gap 14 down to its tail) · **Target:** Figma Design (desktop app 126.10.7) Every known shortfall against Figma, one entry each, ranked by how much it stops a Figma user from doing real work in FigCraft. Agents: pick work from the top unless the owner says otherwise. The@@ -16,7 +16,7 @@ No alpha blockers: the alpha gate in [`roadmap.md`](roadmap.md#alpha-gate) passe |---|---|---|---|---| | 1 | `.fig` files: best-effort import with editable vector networks and stand-ins for non-design layers landed, then (2026-10-17) more fidelity on synthetic files, budgets for large files, an import report and paste from another design app; an experimental export, also as a copy from Save as (round trips through our own importer; written files opened in other software, where layers, fills, gradients, strokes, shadows, vectors, components and text draw as in FigCraft, instances keep their size and variables with modes and colour styles come across); real-file checks and the small tail left (**beta blocker** until checked on real files, gap 3) | File format | 5–10 | [file-format-parity](file-format-parity.md) | | 2 | Multiplayer and sharing are a preview, without accounts (**beta blocker**) | Feature | 42–84 | [collaboration-parity](collaboration-parity.md) |-| 3 | Nothing checked against real Figma files | Fidelity | 15–30 | [target-app-parity](target-app-parity.md) |+| 3 | No representative corpus checked against real Figma files | Fidelity | 15–30 | [target-app-parity](target-app-parity.md) | | 4 | Interaction fidelity not compared tool by tool | UI/UX | 40–60 | [ui-parity](ui-parity.md) | | 5 | Localization: English, reviewed Russian and Turkish, plus unreviewed Spanish (and Latin American Spanish), French, German, Brazilian Portuguese, Japanese, Korean, Simplified Chinese, Indonesian and Czech drafts; Turkish and Swedish catalogs | Localization | 29–51 | [localization-parity](localization-parity.md) | | 6 | Plugins: widgets without hover or timers, a self-hosted directory but no public catalogue; Figma's plugins don't run | Ecosystem | 6–22 | [target-app-parity](target-app-parity.md) |@@ -79,11 +79,18 @@ No alpha blockers: the alpha gate in [`roadmap.md`](roadmap.md#alpha-gate) passe `.figcraft` path. Layers copied from another design app paste (`edit.pasteDesignLayers`, and Cmd/Ctrl+V when the clipboard's HTML holds a `.fig` canvas): read like a `.fig` file, with its warnings, size-checked (256 MB) before decoding.+- **Fixed (2026-10-26, #1341):** generated FigJam sticky notes and shapes with text keep their+ background, text, typography, text paint and saved child bounds, including sticky author lines,+ as editable frame children. Synthetic fixtures cover generated records, missing bounds,+ unsupported versions, saved vector networks without geometry paths, outer fill/stroke outlines+ when generated geometry is damaged, outer body-text fallback beside a surviving author and+ layer budgets; the issue sample was checked locally only. Native+ board metadata and direct `.jam` opening (#1342) remain separate work. - **Missing:** elbowed or curved connectors without a saved path (drawn straight), labels of connectors without a saved snapshot, table cells beyond their own layers, filled areas of a vector with their own fills (#634, held for an owner decision on the document model), variables bound to fields the editor can't bind and video fills aren't read; text lays out again with- local fonts. Nothing has been checked against real-world files yet (gap 3): the 2026-10-17+ local fonts. Beyond the local FigJam regression check for #1341, there is no real-world corpus (gap 3): the 2026-10-17 changes were tested on files built in code, and paste from another design app on clipboard HTML made from our own export, never on a real clipboard. The export was checked in other software on our example documents and small test files only.@@ -127,7 +134,7 @@ No alpha blockers: the alpha gate in [`roadmap.md`](roadmap.md#alpha-gate) passe - **Estimate:** 42–84 h: accounts, teams and per-person permissions, shared comments and versions (numbers from before the server landed; re-measured next). -### 3. Nothing checked against real Figma files+### 3. No representative corpus checked against real Figma files - **Missing:** a corpus of real documents (design systems, app screens, prototypes) imported and compared with Figma's own PNG/SVG/PDF exports. - **Evidence:** every corpus in the repo is synthetic (`crates/svg/tests/corpus`, the synthetic@@ -136,6 +143,9 @@ No alpha blockers: the alpha gate in [`roadmap.md`](roadmap.md#alpha-gate) passe - **Impact:** unknown fidelity in auto layout sizing, text metrics, effects and component resolution on real files; the numbers in this repo can't be trusted beyond "estimated" until it exists.+- **Local regression check (2026-10-26):** the public FigJam issue sample in #1341 was read+ locally to check its generated backgrounds, text and author lines. It is not committed and+ does not establish representative design-file fidelity. - **Measured so far:** text box sizes and auto layout results of our own example documents, against the same documents re-saved by other software (which lays text out again). Three text rules explained every difference and are applied (whole-pixel line heights, advances on a@@ -519,6 +529,9 @@ No alpha blockers: the alpha gate in [`roadmap.md`](roadmap.md#alpha-gate) passe | Date | Change | Summary | |---|---|---|+| 2026-10-27 | minor | M6, #1397: damaged generated FigJam shape geometry falls back to usable outer fill or stroke outlines before a rectangle; a surviving sticky author no longer suppresses the outer body-text fallback. Synthetic regressions cover both outlines, missing/invalid/blank bodies, author retention and layer budgets. Numbers unchanged. |+| 2026-10-26 | minor | M6, #1397: generated FigJam backgrounds read saved vector networks before rectangle fallback; missing or invalid generated text uses the outer text without discarding successful children or exceeding the layer budget. Regression tests cover both paths. Numbers unchanged. |+| 2026-10-26 | minor | FigJam generated sticky notes and shapes with text (#1341): backgrounds, text with its typography and paints, saved bounds and sticky author lines import as editable frame children; synthetic regressions and a local check of the report sample; native board metadata and direct `.jam` opening remain outside this fix. Numbers unchanged. | | 2026-10-25 | minor | egui/eframe 0.37 verified for gap 18: the remaining limitations are unchanged. egui-wgpu 0.37 still picks an 8-bit sRGB surface with no colour-space option, so P3 colours outside sRGB still clip on screen; eframe 0.37 still gives only the main window an AccessKit adapter, so other windows have no screen-reader tree. Numbers unchanged | | 2026-10-25 | minor | Known gaps from the #1311 review: gap 4, the export preview follows a slice's first export setting; gap 14, the scopes a paint style's color takes are FigCraft's own rule; gap 15, `proto.linkNotice` from the palette or control channel isn't saved until the next preferences save; gap 16, the file name field still renames in Dev Mode (to check against Figma first). Ranking and hours unchanged | | 2026-10-24 | minor | Gap 24: the dot grid on board pages, dragging a connector's end to re-attach it, curved connectors and elbows around the objects they join landed; connector waypoints placed by hand stay missing. 30–60 h → 28–56 h; the ranking is unchanged |