openpencil/apps/web
Fini 7cf66af316 test(ai): icon name resolution coverage for element builders (21 cases)
Guards against builders hardcoding icon names that don't resolve at
runtime — a regression would render as an empty glyph or fallback
circle on canvas, silent-but-broken.

Three layers:

1. Per-builder (17 tests): collect every icon_font iconFontName
   from default output, assert lookupIconByName resolves each. Fail
   message names the specific builder + unresolved slugs.

2. Aggregate (2 tests): full cross-builder icon vocabulary resolves
   at runtime; icon set is non-trivial (≥10 distinct icons).

3. Invariants (2 tests): text-only builders emit zero icons;
   every icon_font node has iconFontFamily='lucide' (prevents a
   regression to a font-family the renderer doesn't bundle).

Note: uses lookupIconByName (not AVAILABLE_LUCIDE_ICONS directly)
because the dictionary has prefix/substring fallbacks that resolve
common names ("home", "more-vertical") even when the literal slug
isn't in the exported list. The lookup is the authoritative runtime
resolver, so matching its behavior is correct.
2026-04-22 02:07:17 +08:00
..
public V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
server test(ai): Nitro /api/mcp/exec-tool endpoint unit tests (12 cases) 2026-04-22 00:41:15 +08:00
src test(ai): icon name resolution coverage for element builders (21 cases) 2026-04-22 02:07:17 +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 chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
tsconfig.json V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
vite.config.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00