| 1 |
File tree |
FileTree web-component with search, expand, git status colors, rename decorations |
@pierre/trees/ssr preloadFileTree + serializeFileTreeSsrPayload |
Unit: assert serialized HTML contains all paths, git status attributes, search input. E2E: Playwright clicks a file, asserts diff scrolls into view. |
| 2 |
Diff rendering |
FileDiff web-component, split view, syntax highlight, hover highlight, line selection |
@pierre/diffs/ssr preloadPatchDiff per file or preloadMultiFileDiff |
Unit: assert prerenderedHTML contains changed lines, line numbers, syntax tokens. E2E: Playwright asserts split columns exist. |
| 3 |
Line selection |
onLineSelected / onGutterUtilityClick / onLineClick / onLineNumberClick callbacks → floating form |
Inline <form> below each diff file, or server-rendered <dialog>; data attributes on lines for minimal JS targeting |
Unit: POST /finding with line range → server stores finding. E2E: Playwright clicks line → form appears, fills, submits → finding visible in drawer. |
| 4 |
Finding form |
Floating <section> with severity, category, comment, notes |
Inline form or modal; POST to server |
Unit: validation tests (existing validateFinding route). E2E: submit form → finding appears in findings list. |
| 5 |
Findings list |
Drawer with numbered items, severity/category pills, remove button |
Server-rendered findings panel; remove via POST or htmx |
Unit: assert findings HTML renders pills. E2E: add finding → remove → count updates. |
| 6 |
Review notes |
<textarea id="notes"> |
<textarea name="notes"> in submit form |
Unit: POST /submit passes notes to onSubmit. E2E: fill notes → submit → payload contains notes. |
| 7 |
Search |
Client-side regex search across all diff lines, 200-result cap, keyboard nav, highlight animation |
Server endpoint GET /search?q=... returns HTML partial with links to file+line |
Unit: searchCode function extracted to shared module, tested in isolation. E2E: type query → results dropdown → click → jumps to line. |
| 8 |
Theme |
localStorage + matchMedia → CSS custom properties on :host |
light-dark() CSS + prefers-color-scheme media query; optional cookie toggle |
Unit: assert HTML contains color-scheme meta. E2E: toggle → background color changes. |
| 9 |
Pane resize/collapse |
Pointer events + localStorage layout state |
CSS grid with resize on <aside>; or minimal inline JS + localStorage |
E2E: drag splitter → width changes. Collapse button → pane hidden. |
| 10 |
Meta display |
Round chip, source label, file stats, skipped files |
Inline server-rendered <div> |
Unit: assert HTML contains round number, source label, stats. |
| 11 |
Carried findings |
renderAnnotations shows existing findings on diff lines |
Pass annotations array to preloadPatchDiff options |
Unit: assert preloaded HTML contains annotation chips. |
| 12 |
Heartbeat |
setInterval POST /api/heartbeat |
Unchanged — SPA JS still polls, or server SSE |
Unit: existing heartbeat test passes. |
| 13 |
Review polling / diff refresh |
setInterval GET /api/review, re-renders if hash changes |
HTMX poll or meta refresh, or manual refresh button |
Unit: refreshDiff called on submit. E2E: change file → refresh → diff updates. |
| 14 |
Submit |
POST /api/submit JSON → clears findings, shows status |
POST /submit form → redirects or returns success HTML |
Unit: onSubmit called with findings + notes. E2E: submit → success message. |
| 15 |
Cancel |
POST /api/cancel → window.close() hint |
POST /cancel → close page or redirect |
Unit: server closes, result promise resolves. |