openpencil/tests/engine
Anton A S d46b4b11a4 Fix layout axis mismatch, reduce describe noise, add bail-out strategy
Engine:
- layoutSizingVertical/Horizontal setters now use child's own layout
  direction (not parent's) to map primary/counter axis — matches Yoga
- FILL on cross-axis uses alignSelf:Stretch instead of flexGrow
  (flexGrow only works on main axis, caused even distribution bug)
- FILL on main axis auto-sets layoutGrow=1 for leaf nodes

This fixes the 20-step debugging spiral where AI set FIXED heights
on HORIZONTAL children inside VERTICAL parent but Yoga ignored them
(wrote primaryAxisSizing via parent axis, Yoga read counterAxisSizing
via child axis — never saw the FIXED value).

Describe noise reduction:
- Suppress 'absolutely positioned inside flex' — intentional for
  decorative overlays (selection handles, badges)
- Suppress 'justify=between with HUG' when node fills parent width
- Suppress 'fixed size + grow' when sizing is FILL (standard pattern)
- 'Inconsistent padding' requires 3+ siblings (not 2)

Prompt:
- Bail-out: delete and re-render after 2 failed set_* attempts
- eval restricted to operations, not layout debugging
2026-03-13 10:21:46 +03:00
..
abspos-cache.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
acp-agent.test.ts Add ACP agent package with tests 2026-03-05 09:14:54 +03:00
clipboard.test.ts Add gold-preview.fig clipboard roundtrip tests 2026-03-12 17:05:00 +03:00
color.test.ts Centralize all color utilities in color.ts 2026-03-07 10:02:11 +03:00
copy.test.ts Fix copyFill missing gradientTransform/imageTransform, add copy tests 2026-03-09 08:50:28 +03:00
effects-and-resize.test.ts Fix effects rendering: shadows, blur, spread (#24) 2026-03-03 09:53:39 +03:00
eval-cli.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
export-jsx.test.ts CSS Grid layout mode (#73) 2026-03-08 18:23:53 +03:00
fig-export-worker.test.ts Perf: 5.4× faster file open, worker-based parsing, instance index (#96) 2026-03-12 14:49:28 +03:00
fig-import.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
fig-roundtrip.test.ts Fix text rendering with wrong fonts on file open 2026-03-12 22:05:59 +03:00
figma-api.test.ts Fix layout axis mismatch, reduce describe noise, add bail-out strategy 2026-03-13 10:21:46 +03:00
fonts.test.ts Fix text rendering with wrong fonts on file open 2026-03-12 22:05:59 +03:00
iconify.test.ts Add step budget warnings and Continue button for AI chat 2026-03-13 10:18:20 +03:00
image.test.ts Image drag-and-drop, clipboard paste, and paste-at-cursor (#92) 2026-03-11 07:52:04 +03:00
individual-strokes.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
label-cache.test.ts Perf: 5.4× faster file open, worker-based parsing, instance index (#96) 2026-03-12 14:49:28 +03:00
layout.test.ts Fix layout axis mismatch, reduce describe noise, add bail-out strategy 2026-03-13 10:21:46 +03:00
mcp-server.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
mcp.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
multi-selection.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
mutation.test.ts Add mutation unit tests: toggleBoldInRange, vectorNetworkBlob precision, SceneGraph+UndoManager integration 2026-03-07 23:11:03 +03:00
perf.bench.ts Fix copyFill missing gradientTransform/imageTransform, add copy tests 2026-03-09 08:50:28 +03:00
profiler.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
render-text.test.ts Fix text rendering with wrong fonts on file open 2026-03-12 22:05:59 +03:00
render.test.ts Optimize AI token usage: ~61% reduction in per-step context 2026-03-13 10:20:56 +03:00
renderer-effects.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
scene-graph.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
snap.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
style-runs.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
svg-export.test.ts SVG export (#52) 2026-03-05 10:31:02 +03:00
svg-path-parse.test.ts Add step budget warnings and Continue button for AI chat 2026-03-13 10:18:20 +03:00
tailwind-jsx.test.ts CSS Grid layout mode (#73) 2026-03-08 18:23:53 +03:00
text-editor.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
tools-ai-adapter.test.ts Unify tool definitions: define once, adapt for AI/CLI/MCP 2026-03-01 15:02:05 +03:00
tools-cli.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
tools.test.ts XPath query for node selection (#82) 2026-03-09 15:32:27 +03:00
undo.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
vector.test.ts Clean up tools/schema, add geometry.ts, isMixed helper, fix imports, add tests 2026-03-06 22:33:10 +03:00
xpath.test.ts XPath query for node selection (#82) 2026-03-09 15:32:27 +03:00