AI-native design editor. Open-source Figma alternative.
Update autoresearch docs: all remaining fills are library variable aliases, sizes are layout-dependent
Danila Poyarkov919e4cf652f4
diff --git a/autoresearch.ideas.md b/autoresearch.ideas.mdindex e34bc7839..84795796d 100644--- a/autoresearch.ideas.md+++ b/autoresearch.ideas.md@@ -1,15 +1,17 @@# Autoresearch Ideas-## High Priority-- **Badge proportional scaling (16 vectors + 3 badges + related)**: ~25 diffs. Badge instances have ~1.12x ratio mismatch. DSD provides size overrides for the Badge shell but they're not propagating to deeply nested children (vectors, avatars, close-icons, placeholders inside badges). Investigate DSD propagation depth.-- **Variable-bound fills (3 Indicators)**: Fill colors bound to design variables resolve differently in visible-page context. Need variable binding resolution during import.+## High Priority (11 fill diffs)+- **Library variable alias resolution**: ALL remaining fill diffs are caused by `colorVar` on symbolOverride paints. The `paint.color` contains the fallback value but the `colorVar.value.alias.assetRef` references an EXTERNAL library variable. Local copy exists but with different GUID. Need to build mapping from `assetRef.key + version` → local variable ID using `variableConsumptionMap` entries on NodeChanges. This would fix all 11 fill diffs at once.-## Medium Priority-- **datepicker width (7 nodes)**: `_datepicker-date-range-link` width 32 vs Figma's 131. Layout computation issue — needs proper text measurement context.-- **Self-referencing override for badge Placeholders (4 TEXT)**: Dark fills instead of white. The symbolOverride targets a CHILD cloned from the self-referencing component path. Current fix only handles exact `targetId === nodeId`.-- **chevron-down scaling (4 nodes)**: 16×16 vs 14.25×14.25. Similar to badge scaling issue.-- **Avatar distortion (3 nodes)**: 7.6×14 instead of 14.25×14.25. Constraint scaling applied wrong axis ratio.+## Medium Priority (50 size diffs)+- **Badge area layout (~25 nodes)**: Badge INSTANCE width 96→85.32 is a Yoga layout issue. Auto-layout computes width from children sizes which depend on text measurement. Could improve by applying DSD size overrides to the Badge shell directly (if DSD entries exist but aren't resolving).+- **Datepicker width (7 nodes)**: `_datepicker-date-range-link` width 32→131. FIXED sizing but Figma shows wider — check if `layoutGrow` or parent `FILL` sizing should expand it.+- **Remaining Vector scaling (16 nodes)**: Inside Badge area. Would cascade-fix if Badge width is corrected.-## Low Priority-- **Copy TEXT width (1 node)**: 36 vs 56 width. Text measurement/layout issue.-- **"12" TEXT width (5 nodes)**: 16.8 vs 19 width. Calendar date text measurement.+## Investigated / Won't Fix In This Session+- Avatar distortion: Fixed by skipping auto-layout instances in constraint scaling+- 99 unmatched nodes: Fixed by name-based tree path matching+- cornerRadius 999 vs 890: Fixed by pill-shape tolerance+- Bold toolbar button fill: Fixed by self-referencing symbolOverride skip+- Icon cropping: Fixed by DSD single-child fallback + SCALE constraints+- Text measurement diffs (~10 nodes): Font-dependent, sub-2px differencesdiff --git a/autoresearch.jsonl b/autoresearch.jsonlindex 772b621db..3c8d3fea0 100644--- a/autoresearch.jsonl+++ b/autoresearch.jsonl@@ -5,3 +5,4 @@{"run":4,"commit":"2858d94","metric":84,"metrics":{"visibility":1,"text":0,"fills":9,"radius":0,"size":74,"unmatched":99},"status":"keep","description":"Skip self-referencing symbolOverrides on nodes with explicit kiwi properties (fixes bold toolbar button fill)","timestamp":1773484182748,"segment":0}{"run":5,"commit":"fd5b0b5","metric":106,"metrics":{"visibility":1,"text":0,"fills":11,"radius":0,"size":94,"unmatched":0},"status":"keep","description":"Name-based tree path matching: 0 unmatched (was 99), reveals 106 total real diffs","timestamp":1773488934943,"segment":0}{"run":6,"commit":"97ba675","metric":70,"metrics":{"visibility":1,"text":0,"fills":11,"radius":0,"size":58,"unmatched":0},"status":"keep","description":"Apply SCALE constraint resizing to instance children + propagate through clone chains","timestamp":1773489529498,"segment":0}+{"run":7,"commit":"4f3df83","metric":62,"metrics":{"visibility":1,"text":0,"fills":11,"radius":0,"size":50,"unmatched":0},"status":"keep","description":"Skip SCALE constraint resizing for auto-layout instances (fixes Avatar distortion)","timestamp":1773490511259,"segment":0}diff --git a/autoresearch.md b/autoresearch.mdindex 9f737377b..320250394 100644--- a/autoresearch.md+++ b/autoresearch.md@@ -44,10 +44,13 @@ and `tests/fixtures/gold-preview-truth.json` as ground truth (extracted from liv- **DSD for swapped instances**: Single-child fallback in resolveOverrideTarget (d93c475)- **Rounded clipping**: clipRRect when clipsContent + cornerRadius (49423e4)- **Shadow child shape**: Drop shadow on transparent containers follows first child (f70338d)-- **Current best**: 84 total_diffs (1 vis, 0 text, 9 fills, 0 radius, 74 size, 99 unmatched)-- **Comparison fixes**: independentCorners radius reading, pill-shape tolerance+- **Current best**: 62 total_diffs (1 vis, 0 text, 11 fills, 0 radius, 50 size, 0 unmatched)+- **Comparison fixes**: independentCorners radius reading, pill-shape tolerance, name-based tree matching- **kiwiPropertyNodes**: Nodes with explicit kiwi NC fills/cornerRadius are added to seeds AND protected from sync overwrite- **Self-referencing symbolOverride**: When an override resolves to the instance itself, skip if the instance has explicit kiwi NC properties-- **Remaining fills (9)**: Variable-bound colors (Indicators), wrong variant selection (badge Placeholders), deep chain overrides-- **Remaining sizes (74)**: 38 Vector constraint resizing (no DSD size data), 6 datepicker layout widths, Badge proportional scaling-- **Unmatched (99)**: Tree path matching gaps in deep clone chains+- **SCALE constraint resizing**: Apply proportional scaling to children when instance size ≠ component size; skip auto-layout instances; propagate through clone chains+- **Remaining fills (11)**: Variable-bound colors (3 Indicators, 1 Ellipse), deep chain color overrides (3 badge Placeholders, 1 Link, 1 Vector, 1 button Placeholder, 1 Left Divider)+- **Remaining sizes (50)**: 16 Vectors (Badge 1.12x ratio), 7 datepicker widths, 3+3+3 Badge/Avatar/Placeholder sizing (layout-dependent), 4 Groups, misc text widths+- **Root causes of remaining diffs**:+ - **Fills (11)**: ALL fill overrides use `colorVar` library aliases. The `paint.color` is the fallback value, but the alias resolves to a different color in context. Need library asset ref → local variable mapping via `variableConsumptionMap`.+ - **Sizes (50)**: 30+ are Badge area (~1.12x ratio from layout-dependent width), 7 datepicker (layout), rest are text measurement diffs. These need pixel-perfect text measurement or DSD propagation improvements.