openpencil/apps/web
Fini 522c09cf39 fix(ai): rank 4 builder + multi-page vision-validation hardening
ab-corpus rerun (gpt-5.5, ab-v3, 52 prompts × 2 arms): obvious-T M3
59.6% -> 91.5% (+31.9pp); composite-T 0% -> 40% (+40pp). Lift on top
of d5d1a8cd (Rank 1 schema coerce), 9e90cffe (Rank 2 prompt fail watch),
e34d9238 (Rank 3 vision toggle).

Builder fallback minima:
- chart-pie/line/bars-v1: values [1] -> [30,25,20,15,10] / [10,15,12,20,18]
  so chart-pie-slice (>=4) and chart-line-dot (>=7) corpus minima are met
- toolbar-v1: fallback items include a divider_after entry so toolbar-divider
  role emits even when the model passes only icons
- avatar-group-v1: entry-coerce items with 5 placeholder initials so the
  builder always emits avatar-group-{item,initial,overflow,overflow-count}
- combobox/data-table-row/share-row-v1: fallback arrays grown to 3 items
  matching the corpus shape minimums

Optional-content discipline (codex stop-time round 2):
- user-card-v1: name field fuzzy-coerce (required field, real fix for the
  "Element tool insert failed: I(null,...)" handler bug); the optional role
  text stays conditional, never invented. content empty-string was tried
  but rejected (empty text nodes still consume flex gap).
- image-placeholder-v1: label stays conditional for the same reason.

Prompt:
- elements.md fail-watch table extended with 5 components (chart legend,
  skeleton, inline-action, share-row, combobox) so models routing to
  batch_design at least know the role names.

Multi-page vision validation (codex stop-time round 1):
- design-validation.ts: countNodesInActivePage + buildNodeTreeDump now
  read getActivePageChildren(activePageId) instead of DEFAULT_FRAME_ID,
  so the size-gate and the LLM's tree dump both reflect the page the user
  is actually editing rather than the default page. Was a latent bug
  surfaced when VALIDATION_ENABLED flipped to true in e34d9238.

Tests: 4223/4223 pass; format:check + tsc clean. 12 files changed.
2026-05-08 15:00:00 +08:00
..
public V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
server fix(ai): image-proxy timeout covers body read, not just headers 2026-05-05 12:22:55 +08:00
src fix(ai): rank 4 builder + multi-page vision-validation hardening 2026-05-08 15:00:00 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
components.json V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
dev.ts V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
package.json fix(ai): proxy dispatcher uses ESM import, actually installs in dev path 2026-05-05 12:22:40 +08:00
tsconfig.json V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
vite.config.ts feat(ab-corpus): retry transient errors on ark + deepseek 2026-04-29 07:15:00 +08:00