fada354df8
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ec9e11b243 |
feat(ai-ui): complete Wave 13.C — PrivacyBadge + ProvenanceDrawer + DebugOverlay
The remaining three trust surfaces ship in this commit, completing
Wave 13.C and unlocking MAG.8 (debug-overlay).
──────────────────────────────────────────────────────────────────
<PrivacyBadge> · Wave 13.C.6
──────────────────────────────────────────────────────────────────
packages/ai-ui/src/PrivacyBadge.tsx (new)
- 4 modes: on-device · cloud · hybrid · unknown
- Token-tinted (success/info/accent/neutral) — instant trust
signal without forcing the user into settings
- Optional `detail` line (model id, device name, routing policy)
- `iconOnly` variant for sidebar / tray placements
- role=status + composite aria-label
──────────────────────────────────────────────────────────────────
<ProvenanceDrawer> · Wave 13.C.4
──────────────────────────────────────────────────────────────────
packages/ai-ui/src/ProvenanceDrawer.tsx (new)
- Slide-in right drawer listing every step the model + tools took
- Pure presentation — host passes the event array straight through
- role=dialog + aria-modal + aria-labelledby
- Initial focus on close button; Esc + backdrop both close
- Body scroll lock while open (restores prior overflow value)
- Empty-state copy when events=[]
- Per-row <details> slot for inspecting full payload
──────────────────────────────────────────────────────────────────
<DebugOverlay> · Wave 13.C.5 (MAG.8 magnet)
──────────────────────────────────────────────────────────────────
packages/ai-ui/src/DebugOverlay.tsx (new)
- Wraps any child surface — Shift-click reveals a modal inspector
with the raw JSON payload
- Modifier configurable: shift (default) / alt / meta
- Production toggle: `disabled` short-circuits the wrapper (no
cursor-hint, no click interception)
- role=dialog + aria-modal + Esc to close + focus restore on close
- Stringifies payload safely (catches non-serialisable values)
- Cursor: help on the wrapper to hint discoverability
──────────────────────────────────────────────────────────────────
Quality gates
──────────────────────────────────────────────────────────────────
✓ pnpm -F @bytelyst/ai-ui test → 79/79 passing (was 67/67)
+12 new cases:
- PrivacyBadge (3)
- ProvenanceDrawer (5: closed-state · dialog semantics ·
backdrop · Escape · empty-state)
- DebugOverlay (4: plain-click ignored · Shift opens · disabled
bypass · alt modifier)
✓ Exports wired in src/index.ts (PrivacyBadge, ProvenanceDrawer,
DebugOverlay + all types)
──────────────────────────────────────────────────────────────────
Roadmap tracker (lands in subsequent commit)
──────────────────────────────────────────────────────────────────
13.C.4 ProvenanceDrawer shipped
13.C.5 DebugOverlay shipped
13.C.6 PrivacyBadge shipped
MAG.8 the debug-overlay magnet (showcase lands in paired commit)
Wave 13.C is now complete (7/7). Wave 13 Futurism: 9/39 → 12/39.
|