Fleet event drawer — Forgejo/Cursor-grade diff review viewer #1009
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#1009
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As an operator reviewing an agent's diff in the right drawer's
Diff reviewtab, I want the diff viewer to match the visual quality and ergonomics of Forgejo's PR diff (or Cursor's inline diff) — file tree, syntax highlighting, sticky headers, word-level intra-line marks, expandable context — so that I can read multi-file diffs without losing context or eyeballing plain monospace text.Background
Current implementation:
apps/web/src/components/agent/run-diff-review.tsx(lines 240-340). Renders unified or split mode in a<table>with two line-number columns, a+/-marker column, and the line text. Background tintsbg-success/10/bg-error/10mark added/removed lines. No syntax highlighting, no file tree, no expand-context affordance, no word-level intra-line diff. LCS is capped at 1000 lines per side (line 36-77).Operator review (2026-05-09) called out the gap vs. Forgejo PR diff and Cursor's inline diff.
Acceptance criteria
File tree sidebar
mdbreakpoint (perapps/web/CLAUDE.mdmobile policy); replaced by an inline file dropdown.Hunk rendering
@@hunk separators rendered as a distinct row with the hunk header (@@ -A,B +C,D @@ context) intext-text-dim.tabular-nums), monospace; gutter background distinct from line background so it doesn't blend on long lines.Syntax highlighting
+/-/context lines without breaking the bg tint.Sticky file headers + collapse
position: sticky).?collapsed=path1,path2).Word-level intra-line diff
add/removeline pairs (within the same hunk segment), compute a word-level diff and highlight changed runs with a darker bg tint inside the line-level tint.\b, LCS on tokens, capped at 200 tokens per line.Soft-wrap toggle + copy line
prefers-reduced-motion(no transitions when disabled).Tests
< mdand≥ mdbreakpoints.Out of scope
run-diff-review.tsx:346, untouched.References
apps/web/src/components/agent/run-diff-review.tsx:240-340— current unified + split renderers.apps/web/src/components/agent/run-diff-review.tsx:36-77— LCS hunk builder + 1000-line cap.apps/web/CLAUDE.md— token utilities, mobile breakpoints, reduced-motion policy.