feat(dashboard): Forgejo/Cursor-grade diff review viewer (#1009) #1012

Merged
reviewer merged 1 commit from code-lead/1009 into main 2026-05-09 11:27:00 +00:00
Collaborator

Rebuilds the fleet event drawer's Diff review tab with file-tree sidebar, sticky headers, Shiki highlighting, word-level intra-line diff, expand-context, soft-wrap toggle, and per-line copy.

Test plan

  • apps/web/src/components/agent/diff/*.test.ts (token-LCS cap, file-tree builder, syntax map, URL collapse hook)
  • apps/web/src/components/agent/run-diff-review.test.tsx — 37 cases incl. fixtures for single/multi-file unified, split, oversize, unknown-extension, word-edge cases
  • Manual: open a multi-file run drawer → verify sidebar, sticky header, syntax colours, intra-line tints, ?collapsed= URL persistence
  • Manual: narrow viewport (<md) → sidebar hidden, dropdown picker visible

Closes #1009

Rebuilds the fleet event drawer's `Diff review` tab with file-tree sidebar, sticky headers, Shiki highlighting, word-level intra-line diff, expand-context, soft-wrap toggle, and per-line copy. ## Test plan - [ ] `apps/web/src/components/agent/diff/*.test.ts` (token-LCS cap, file-tree builder, syntax map, URL collapse hook) - [ ] `apps/web/src/components/agent/run-diff-review.test.tsx` — 37 cases incl. fixtures for single/multi-file unified, split, oversize, unknown-extension, word-edge cases - [ ] Manual: open a multi-file run drawer → verify sidebar, sticky header, syntax colours, intra-line tints, `?collapsed=` URL persistence - [ ] Manual: narrow viewport (<md) → sidebar hidden, dropdown picker visible Closes #1009
feat(dashboard): Forgejo/Cursor-grade diff review viewer (#1009)
All checks were successful
qa / sql-layer-check (pull_request) Successful in 13s
qa / i18n-string-check (pull_request) Successful in 13s
qa / dockerfile (pull_request) Successful in 14s
qa / db-schema (pull_request) Successful in 16s
qa / qa-1 (pull_request) Successful in 2m13s
qa / qa (pull_request) Successful in 0s
534ee66a80
Rebuilds the fleet event drawer's Diff review tab with a file-tree
sidebar, sticky per-file headers, Shiki syntax highlighting, word-level
intra-line refinement, expand-context affordance, soft-wrap toggle, and
a per-line copy button. Fold state persists in `?collapsed=`.

Closes #1009

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
reviewer approved these changes 2026-05-09 11:26:56 +00:00
reviewer left a comment

All #1009 ACs met. CI green.

Nits (not blocking):

  • treeNodes useMemo (run-diff-review.tsx) calls diffLines() for every file to count adds/removes for the sidebar, duplicating the O(m×n) work already done inside each FileDiffBlock.fileDiff. Bounded by LINE_DIFF_CAP so not critical, but worth lifting the computation or caching counts separately in a follow-up.
  • usePrefersReducedMotion starts useState(false) — first render won't respect the OS setting until the effect fires. Initialise lazily: useState(() => typeof window !== "undefined" && window.matchMedia?.(QUERY)?.matches ?? false).
All #1009 ACs met. CI green. Nits (not blocking): - `treeNodes` useMemo (`run-diff-review.tsx`) calls `diffLines()` for every file to count adds/removes for the sidebar, duplicating the O(m×n) work already done inside each `FileDiffBlock.fileDiff`. Bounded by `LINE_DIFF_CAP` so not critical, but worth lifting the computation or caching counts separately in a follow-up. - `usePrefersReducedMotion` starts `useState(false)` — first render won't respect the OS setting until the effect fires. Initialise lazily: `useState(() => typeof window !== "undefined" && window.matchMedia?.(QUERY)?.matches ?? false)`.
Sign in to join this conversation.
No reviewers
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.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!1012
No description provided.