Chunk 5: Citation rendering component with CitationCard, compact list, RTL support

↗ view on GitHub · Gadoes · 2026-05-02 · 3631a865

- Add McpCitation and McpCitationLiveness types to shared/types.ts
- Create CitationCard.tsx with SingleCitationCard, CompactRow, CitationList
  - ≤3 citations: expanded card view; ≥4: compact list with expand-on-click
  - RTL support for Arabic excerpts (dir=rtl on U+0600-U+06FF detection)
  - Liveness dot (grey/green/red), source badge with region glyph
  - "Verify & read" button stub (to be wired in Chunk 20)
- Add mcp_citations SSE event handler in useAssistantChat.ts
- Update AssistantMessage.tsx to render CitationList below message content
- Set up Vitest + React Testing Library; 22 component tests all passing
- npx tsc --noEmit passes with no errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Repository Gadoes/dispumike
Author Gadoes <62180984+Gadoes@users.noreply.github.com>
Authored
Parents 2797ac86
Stats 9 files changed , +2264 , -65
Part of Citation Data Model and Rendering

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-3631a865.md from inside the repo you want the change in.

⬇ Download capture-commit-3631a865.md