openpencil/packages/core/src/render
Anton A S 036f486571 Fix layout blowup from 100×100 text fallback, skip compute for read-only AI tools
Two fixes:

1. layout.ts: Add estimateTextSize() fallback (~0.6 × fontSize per char)
   for when MeasureFunc returns null (font not loaded) or CanvasKit is
   unavailable. Previously fell back to child.width/child.height which
   defaults to 100×100 for new nodes, blowing up every HUG container.

2. ai/tools.ts: Only call computeAllLayouts + requestRender + push undo
   for mutating tools (def.mutates). Read-only tools (describe, get_jsx,
   node_bounds, etc.) were triggering full layout recompute on every call,
   wasting cycles and potentially destabilizing layouts during AI sessions.
2026-03-13 10:17:07 +03:00
..
components.ts Fix auto-layout overflow, grid layout, AI chat UX (#86) 2026-03-10 15:43:04 +03:00
export-jsx.ts Fix lint warnings: eliminate any types, split oversized files 2026-03-12 15:13:30 +03:00
index.ts Pre-process render JSX in bridge where esbuild is available 2026-03-07 20:10:48 +03:00
jsx-runtime.ts Eliminate as Record<string, unknown> casts 2026-03-06 21:43:32 +03:00
mini-react.ts Lint all packages: fix 193 errors across core, mcp, acp 2026-03-09 13:18:08 +03:00
render-jsx.ts Fix auto-layout overflow, grid layout, AI chat UX (#86) 2026-03-10 15:43:04 +03:00
renderer.ts Fix layout blowup from 100×100 text fallback, skip compute for read-only AI tools 2026-03-13 10:17:07 +03:00
tailwind.ts Tailwind CSS v4 JSX export (#54) 2026-03-06 18:04:11 +03:00
tree.ts Eliminate as Record<string, unknown> casts 2026-03-06 21:43:32 +03:00