dashboard: aggregated multi-file diff review pane (Cursor 3 style) for an agent run #971

Closed
opened 2026-05-08 12:16:47 +00:00 by claude-desktop · 1 comment
Collaborator

User story

As a reviewer-operator approving an agent run's PR, I want a single consolidated review pane showing every file the agent touched in one scroll, with hunk navigation and per-file accept/reject affordances, so I can audit the whole edit set without flipping between Forgejo and the dashboard.

Context

Cursor 3 aggregated diff view: "evaluate the entire edit set from an agent run" in one pane. Pairs well with the reviewer agent's mergeability check.

Acceptance criteria

  • <RunDiffReview> pane in the drawer / dedicated route. Lists every Edit / Write / Delete tool call in the run, grouped by file path.
  • Per-file unified diff via react-diff-view (Tokyo Night theme via Shiki). Hunk navigation (j / k).
  • Per-hunk "accept" / "reject" affordances (UI only initially; an optional follow-up wires the reject path to /agents/runs/:id/revert-edit/:event_id).
  • "Scroll to first change" auto-action when the pane opens (Copilot Workspace behaviour).
  • Side-by-side toggle (default unified). Auto-fall-back to unified at <960 px viewport width.
  • Performance: 50-file diff with 5k LOC must scroll smoothly (test fixture committed).

Out of scope

  • Reverting edits (separate ticket linked above).
  • Cross-run diff aggregation (different concept).

Dependencies

  • Depends on <ToolCard> ticket (each file row composes from existing <EditToolCallView>).
  • Depends on #954 (typed widgets).

References

## User story As a reviewer-operator approving an agent run's PR, I want a single consolidated review pane showing every file the agent touched in one scroll, with hunk navigation and per-file accept/reject affordances, so I can audit the whole edit set without flipping between Forgejo and the dashboard. ## Context Cursor 3 [aggregated diff view](https://cursor.com/changelog/3-0): "evaluate the entire edit set from an agent run" in one pane. Pairs well with the reviewer agent's mergeability check. ## Acceptance criteria - [ ] `<RunDiffReview>` pane in the drawer / dedicated route. Lists every `Edit` / `Write` / `Delete` tool call in the run, grouped by file path. - [ ] Per-file unified diff via `react-diff-view` (Tokyo Night theme via Shiki). Hunk navigation (`j` / `k`). - [ ] Per-hunk "accept" / "reject" affordances (UI only initially; an optional follow-up wires the reject path to `/agents/runs/:id/revert-edit/:event_id`). - [ ] "Scroll to first change" auto-action when the pane opens (Copilot Workspace behaviour). - [ ] Side-by-side toggle (default unified). Auto-fall-back to unified at <960 px viewport width. - [ ] Performance: 50-file diff with 5k LOC must scroll smoothly (test fixture committed). ## Out of scope - Reverting edits (separate ticket linked above). - Cross-run diff aggregation (different concept). ## Dependencies - Depends on `<ToolCard>` ticket (each file row composes from existing `<EditToolCallView>`). - Depends on #954 (typed widgets). ## References - Cursor 3 changelog: https://cursor.com/changelog/3-0 - GitHub diff perf: https://github.blog/engineering/architecture-optimization/the-uphill-climb-of-making-diff-lines-performant/ - Unified vs split: https://matklad.github.io/2023/10/23/unified-vs-split-diff.html - `react-diff-view`: https://www.npmjs.com/package/react-diff-view
Collaborator

🤖 Auto-assigned to dev (heuristic: area:dashboard + body 1842 bytes (≤ 2 KB) — code role). Reply /unassign to reroute.

🤖 Auto-assigned to **dev** (heuristic: area:dashboard + body 1842 bytes (≤ 2 KB) — code role). Reply `/unassign` to reroute.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
charles/claude-hooks#971
No description provided.