AI-native design editor. Open-source Figma alternative.
Fix comparison: treat both-pill cornerRadius values as equal\n\nResult: {"status":"keep","total_diffs":85,"visibility":1,"text":0,"fills":10,"radius":0,"size":74,"unmatched":99}
Danila Poyarkov7fc3a64b64d0
diff --git a/autoresearch-compare.ts b/autoresearch-compare.tsindex 60f7e175f..656133545 100644--- a/autoresearch-compare.ts+++ b/autoresearch-compare.ts@@ -96,7 +96,13 @@ for (const [path, t] of truthMap) {if (o.visible !== t.visible) { visibility++; diffs++ }if (t.text && o.text !== t.text) { text++; diffs++ }if (t.fill && o.fill && t.fill.toLowerCase() !== o.fill.toLowerCase()) { fills++; diffs++ }- if (t.cr && t.cr > 0 && Math.abs((o.cr ?? 0) - t.cr) > 1) { radius++; diffs++ }+ if (t.cr && t.cr > 0) {+ const oCr = o.cr ?? 0+ // Both >= half the smaller dimension = fully rounded (pill), treat as equal+ const minDim = Math.min(t.width, t.height)+ const bothPill = oCr >= minDim / 2 && t.cr >= minDim / 2+ if (!bothPill && Math.abs(oCr - t.cr) > 1) { radius++; diffs++ }+ }if (t.visible && o.visible && (Math.abs(o.width - t.width) > 1 || Math.abs(o.height - t.height) > 1)) {size++; diffs++}diff --git a/autoresearch.jsonl b/autoresearch.jsonlindex 5da596732..6554826f7 100644--- a/autoresearch.jsonl+++ b/autoresearch.jsonl@@ -1,2 +1,3 @@{"type":"config","name":"Figma .fig import fidelity","metricName":"total_diffs","metricUnit":"","bestDirection":"lower"}{"run":1,"commit":"8a90594","metric":246,"metrics":{"visibility":1,"text":0,"fills":10,"radius":161,"size":74,"unmatched":99},"status":"keep","description":"Baseline: 246 diffs (1 vis, 0 text, 10 fills, 161 radius, 74 size, 99 unmatched)","timestamp":1773482910363,"segment":0}+{"run":2,"commit":"3746d1a","metric":99,"metrics":{"visibility":1,"text":0,"fills":10,"radius":14,"size":74,"unmatched":99},"status":"keep","description":"Fix comparison: read individual corner radii when independentCorners=true","timestamp":1773483304162,"segment":0}