openpencil/apps/web/src
Fini 165fb94e44 feat(ai): add_chat_bubble_v0 — messaging bubble (67th tool)
Chat / messaging / customer-support UI message unit. Two variants
via the `side` enum:

  - side="left" (default): from-others bubble. Slate-100 fill,
    slate-900 text, alignItems=flex-start. Optional `author` text
    shown above the bubble (group-chat pattern).
  - side="right": from-self bubble. Accent-color fill (customizable
    via `accent_color`), white text, alignItems=flex-end. Author
    intentionally suppressed on this side — a self-bubble never
    carries "You:".

Optional `timestamp` below the bubble on either side.

Max-width mechanic: pen-core has no native max-width primitive, so
`max_width` becomes the bubble's fixed width (clamped 160..480).
Short messages get extra padding on one side — matches every real
chat client (iMessage / WhatsApp / Slack). Message text uses
`textGrowth: 'fixed-width'` + `width: 'fill_container'` to wrap
correctly inside the fixed-width surface.

Full wiring: pen-core builder + pen-mcp handler + schema (into
ext-2, shorter shard — 24 tools vs ext-1's 24 after this) + shim
+ SERVER_BUILDERS + parity CASES + contract allow-list +
elements.md decision tree + triggers + minimal usage for both
sides. Handler test covers 9 cases: registration, left defaults,
left+author, right with self-dropped-author, right+accent_color,
timestamp both sides, max_width clamps (low + high split into
separate tests to avoid cache-interference), textGrowth wiring,
bogus parent_id rejection.
2026-04-22 22:03:44 +08:00
..
__tests__ V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
canvas fix(canvas): require explicit role:'overlay' for layout-flow escape hatch 2026-04-16 21:07:40 +08:00
components feat(ai): detect sibling overlaps in snapshot_layout and guide fixes 2026-04-16 21:07:29 +08:00
constants V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
hooks V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
i18n V0.7.1 (#102) 2026-04-13 21:30:23 +08:00
lib V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
routes V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
services feat(ai): add_chat_bubble_v0 — messaging bubble (67th tool) 2026-04-22 22:03:44 +08:00
stores fix(core): design.md lives on PenDocument — kill cross-document leak 2026-04-20 00:37:31 +08:00
types V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
uikit V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
utils V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
variables V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
router.tsx V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
routeTree.gen.ts V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
styles.css V0.7.0 (#95) 2026-04-11 23:25:13 +08:00