Skip to content

DiffViewer component for inline file diffs #59

Description

@ryuhmanov-m

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions