Parent issue: #37
Context
When the agent modifies files, changes are shown in the timeline but there's no visual diff. Users want to see what changed.
Scope
1. DiffViewer component
Create src/components/ui/DiffViewer.tsx:
- Accepts unified diff string as input
- Renders with syntax highlighting (green for additions, red for deletions)
- Supports collapsed/expanded state
- Lightweight — no heavy external dependencies (consider
react-diff-viewer-continued or custom with Tailwind)
2. File change chips in messages
- The
TimelineStep already tracks file_changes
- Surface changed file names as clickable chips below agent messages
- Clicking a chip opens the DiffViewer for that file's changes
References
- Timeline component:
src/components/chat/
- Existing UI components:
src/components/ui/
Parent issue: #37
Context
When the agent modifies files, changes are shown in the timeline but there's no visual diff. Users want to see what changed.
Scope
1. DiffViewer component
Create
src/components/ui/DiffViewer.tsx:react-diff-viewer-continuedor custom with Tailwind)2. File change chips in messages
TimelineStepalready tracksfile_changesReferences
src/components/chat/src/components/ui/