learning_ai_common_plat/packages/ai-ui/src
saravanakumardb1 839f3ff794 docs+chore: CC.6 ANTIPATTERNS.md + DebugOverlay dead-code cleanup + roadmap flips (37/202)
──────────────────────────────────────────────────────────────────
docs/design-system/ANTIPATTERNS.md  (CC.6 — new file)
──────────────────────────────────────────────────────────────────
Twelve anti-patterns codified, every product engineer + AI agent
should treat as a hard 'no':

  1.  Hard-coded colour / spacing / radius values
  2.  Bespoke skeleton / spinner / empty-state per surface
  3.  Bespoke tag editor / searchable select
  4.  Raw API responses inside React state
  5.  Hidden privacy / cost / refusal state
  6.  Motion without prefers-reduced-motion
  7.  SSR-unsafe ID generation (Math.random)
  8.  console.log / console.error in production
  9.  Cross-product imports
  10. `any` (especially in public API surfaces)
  11. Untested primitives in @bytelyst/*
  12. Animations that block keyboard focus

Each entry has Smell → Why it's wrong → Do this instead, with
canonical `@bytelyst/*` references.

──────────────────────────────────────────────────────────────────
packages/ai-ui/src/DebugOverlay.tsx  (audit cleanup)
──────────────────────────────────────────────────────────────────
Dropped dead `patchSingleChild` helper. It cloned the single child
unchanged, doing literally nothing — the click handler always lived
on the outer <span>. Replaced the call site with `{children}` and
removed 4 unused React imports (Children, cloneElement,
isValidElement, ReactElement).

Same 98/98 tests pass.

──────────────────────────────────────────────────────────────────
Roadmap flips (this commit + the prior unflag pass)
──────────────────────────────────────────────────────────────────
  9.E.1   <Markdown> + citation interop                ai-ui@0.6.0
  9.E.2   <CodeDiff> split + unified                   ai-ui@0.6.0
  9.E.3   <ExplainThis>                                ai-ui@0.6.0
  9.E.4   usePromptHistory                             ai-ui@0.6.0
  9.E.5   useTokenCount                                ai-ui@0.6.0
  9.E.6   /showcase/ai-ui/markdown                     showcase
  13.C.4  <ProvenanceDrawer>                           ai-ui@0.5.0+
  13.C.5  <DebugOverlay>                               ai-ui@0.5.0+
  13.C.6  <PrivacyBadge>                               ai-ui@0.5.0+
  13.D.1  <Parallax>                                   motion@0.2.1
  13.D.5  <TiltGallery>                                motion@0.2.1
  CC.6    ANTIPATTERNS.md                              docs
  MAG.8   /showcase/futurism/debug-overlay             showcase

§11.2 counter rewrote (37 / 202 done · 18%)
  Wave 9 Data:      9/42  → 15/42 (36%)
  Wave 13 Futurism: 9/39  → 17/39 (44%)
  Cross-cutting:    0/8   →  1/8  (13%)
  Magnet demos:     2/8   →  3/8  (38%)

Three MAG.* magnets are now live:
   MAG.1 spatial-hero    (Wave 13.D.6)
   MAG.3 trust-surfaces  (Wave 13.C.7)
   MAG.8 debug-overlay   (Wave 13.C.5)
2026-05-27 17:08:08 -07:00
..
__tests__ feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
AgentTimeline.tsx feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
ChatStream.tsx feat(ai-ui): Wave 2 MVP @bytelyst/ai-ui@0.1.0 2026-05-27 12:07:23 -07:00
CitationChip.tsx feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
CodeDiff.tsx feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
ConfidenceTag.tsx feat(ai-ui): @bytelyst/ai-ui@0.5.0 — Wave 13.C trust surfaces (CostMeter / ConfidenceTag / RefusalCard) 2026-05-27 16:45:07 -07:00
CostMeter.tsx feat(ai-ui): @bytelyst/ai-ui@0.5.0 — Wave 13.C trust surfaces (CostMeter / ConfidenceTag / RefusalCard) 2026-05-27 16:45:07 -07:00
DebugOverlay.tsx docs+chore: CC.6 ANTIPATTERNS.md + DebugOverlay dead-code cleanup + roadmap flips (37/202) 2026-05-27 17:08:08 -07:00
ExplainThis.tsx feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
index.ts feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
Markdown.tsx feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
MessageBubble.tsx feat(ai-ui): Wave 2 MVP @bytelyst/ai-ui@0.1.0 2026-05-27 12:07:23 -07:00
ModelPicker.tsx feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
PrivacyBadge.tsx feat(ai-ui): complete Wave 13.C — PrivacyBadge + ProvenanceDrawer + DebugOverlay 2026-05-27 16:53:03 -07:00
PromptComposer.tsx feat(ai-ui): Wave 2 MVP @bytelyst/ai-ui@0.1.0 2026-05-27 12:07:23 -07:00
ProvenanceDrawer.tsx feat(ai-ui): complete Wave 13.C — PrivacyBadge + ProvenanceDrawer + DebugOverlay 2026-05-27 16:53:03 -07:00
RefusalCard.tsx feat(ai-ui): @bytelyst/ai-ui@0.5.0 — Wave 13.C trust surfaces (CostMeter / ConfidenceTag / RefusalCard) 2026-05-27 16:45:07 -07:00
ToolCallCard.tsx feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
ToolPalette.tsx feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
types.ts feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00
useChat.ts feat(ai-ui): Wave 2 MVP @bytelyst/ai-ui@0.1.0 2026-05-27 12:07:23 -07:00
usePromptHistory.ts feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
useStreamingText.ts feat(ai-ui): Wave 2 MVP @bytelyst/ai-ui@0.1.0 2026-05-27 12:07:23 -07:00
useTokenCount.ts feat: Wave 9.E (ai-ui@0.6.0) + Wave 13.D.1/.5 (motion@0.2.1) 2026-05-27 16:59:28 -07:00
useToolCalls.ts feat(packages): Wave 2 v0.4 + Wave 3 v0.1 — ai-ui expanded, command-palette new 2026-05-27 12:43:23 -07:00