web: show per-visit changes and last-visit summary
Each visit's This run pane reports its own recorded capture: the File changes status line (with skipped/omitted counts and diagnostic) and its Changed files list with parseable stats. The Summary aggregate now keeps each path's last recorded step rather than summing visits, and is only rendered for a succeeded run; a failed run keeps its evidence in the visit panes. This is a deliberate divergence from Android, noted in R4.
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ Status legend: `todo` · `partial` (some of it works) · `done` (working + captu
|
||||
| R1 | Run history list with status roll-up | `list_runs` | done |
|
||||
| R2 | Filter by status, sort, "needs you" markers | client-side | done — status/pipeline/time filter + sort implemented and captured (`captures/09-runs-day-groups.png`–`captures/15-runs-sorted.png`); the "needs you" requirement is delivered exactly as the app does it: a bell/badge + sheet (R15), not a per-row mark. No other R2 work is outstanding |
|
||||
| R3 | Run detail: run fields, steps/visits, targets, sessions | `get_run` | done — tabbed Summary / Graph / Input / Output / Timeline; the Timeline opens a per-visit stage pane with the headline rows (Status, Outcome, Duration, Visit `{v} / {max}`, Model target, Target, Session), the Verdict block (option chip + reason with inline artifact links) and the visit sections Artifacts / Session / Output / Input / This run / Stage definition. Captured 2026-10-19: `captures/20-run-430-summary.png`, `captures/23-run-430-timeline.png`, `captures/24-run-430-stage-artifacts.png`, `captures/25-run-440-verdict.png` |
|
||||
| R4 | Summary tab incl. collapsible **Changes** viewer (raw + rendered diff) | `get_run` file changes | done — a collapsed-by-default **Changes** section in the Summary tab (`{N} file(s) changed · ±stat · partial capture`; the empty variants read `Changes · capture unavailable` / `capture pending` / `partial capture` / `not recorded for this run` / `capture incomplete` / `no changes observed`) whose rows open a full-screen diff viewer with **Rendered** (each `@@` hunk header on a raised surface, old/new gutter numbers, the shared `+`/`-`/space line language) and **Raw patch** forms, Previous/Next file paging (disabled at the ends), a raw-patch copy control, Escape/backdrop/Close close, and honest binary/truncated/no-patch messages instead of a fabricated diff. Pure logic in `src/changes.js`. Captured 2026-10-19: `captures/28-run-438-changes-collapsed.png`, `captures/29-run-438-changes-expanded.png`, `captures/30-run-438-changes-diff-rendered.png`, `captures/31-run-438-changes-diff-raw.png`, `captures/32-run-442-changes-binary.png`, `captures/33-run-450-changes-truncated.png`, `captures/34-run-455-changes-pending.png` |
|
||||
| R4 | Summary tab incl. collapsible **Changes** viewer (raw + rendered diff), plus each visit's own file-change record | `get_run` file changes | done — the Summary's collapsed-by-default **Changes** section describes the run's **final state**, not a sum: steps are read in numeric sequence order, each path keeps first-seen order and reports its **last recorded step's** kind, patch, `+A -D` stat, binary/truncated flags and before/after modes, while `changed by A → B` still lists every stage that touched it in run order. Header wording is unchanged (`{N} file(s) changed · ±stat · partial capture`; empty variants `Changes · capture unavailable` / `partial capture` / `not recorded for this run` / `capture incomplete` / `no changes observed`). The aggregate is rendered **only when the run status is `succeeded`**; a failed or running run has no settled final state and shows no Summary Changes section at all. This is a **deliberate divergence from Android**, which shows the aggregate for failed runs too — the browser keeps the evidence in each visit's pane instead. That pane's existing **This run** section now shows the selected visit's own capture: a `File changes` line with the honest status word, file count, skipped/omitted counts and diagnostic; a `Changed files` list of `{kind} {path}` plus the parseable `+A -D` stat and `(binary)`/`(truncated)` markers; and neither row when the step recorded no capture. Each visit therefore shows its own set even when a stage ran three times. Summary rows still open the full-screen diff viewer with **Rendered** (each `@@` hunk header on a raised surface, old/new gutter numbers, the shared `+`/`-`/space line language) and **Raw patch** forms, Previous/Next file paging (disabled at the ends), a raw-patch copy control, Escape/backdrop/Close close, and honest binary/truncated/no-patch messages instead of a fabricated diff. Pure logic in `src/changes.js` and `src/runDetail.js`; `showRunChangesSummary` gates the aggregate. Captured 2026-10-19: `captures/28-run-438-changes-collapsed.png`, `captures/29-run-438-changes-expanded.png` (final-state `+42 -12` for the twice-edited `internal/server/retry_test.go`, header `+934 -156`), `captures/30-run-438-changes-diff-rendered.png`, `captures/31-run-438-changes-diff-raw.png`, `captures/32-run-449-changes-binary.png`, `captures/33-run-450-changes-truncated.png`, `captures/78-run-438-implementer-visit-changes.png` (that visit's own `partial (1 files)` and one Changed files line), `captures/79-run-440-no-summary-changes.png` (failed run: no aggregate), `captures/80-run-440-visit-changes.png` (its visit's `File changes`, no recorded rows), `captures/81-run-442-failed-visit-changes.png` (a failed run's implementer visit keeps its own Changed files) and `captures/82-run-<id>-no-summary-changes.png` (a running run: no aggregate) |
|
||||
| R5 | Graph tab (per-stage panes, verdicts) | `get_run` | done — the run detail's Graph tab (between Summary and Input) mounts the shared `src/graph.js` renderer in run mode with the app's run note: a visited stage is executed (solid fill + border), an unvisited one hollow with a dashed muted border, a terminal executed only when a visit resolved to it, a route executed only when a visit produced that outcome (solid with an arrowhead; success first, error last, others alphabetical, `error*` for a fallback error route), the Executed / Not executed legend (runs only, never the definition view), and — while executing — the current stage's pulsing halo + elapsed badge (a static ring under `prefers-reduced-motion`; nothing for a finished run). Clicking a stage opens the existing visit pane at that stage's latest visit with its Verdict; Back/Escape close it and restore focus. The empty state is the exact `This server did not include the run graph.` (unit-tested; no live run currently carries a graph-less payload). Captured 2026-10-19: `captures/28-run-438-graph.png` (finished run 438: legend + executed styling + dashed untaken routes), `captures/29-run-438-graph-pane.png` (a graph-opened stage pane showing a Verdict), `captures/30-run-440-graph.png` (failed run 440: hollow/dashed not-executed stages) |
|
||||
| R6 | Input / Output field sections per stage | `get_run` | done — one collapsed section per recorded entry, expanded as a monospace block (primitives verbatim, arrays `, `-joined, objects `k=v` `, `-joined), empty states "No input recorded." / "No output recorded.". Captured 2026-10-19: `captures/21-run-430-input.png`, `captures/22-run-430-output.png`, `captures/27-run-output-empty.png` |
|
||||
| R7 | Timeline | `get_run` | done — one compact row per visit (`{stage} · visit {n}`, stage-outcome chip, paperclip when artifacts recorded, duration, description = first non-blank diagnostic line else `→ {target}`); empty state "No visits recorded.". Captured 2026-10-19: `captures/23-run-430-timeline.png`, `captures/26-run-428-timeline-empty.png` |
|
||||
|
||||
Reference in New Issue
Block a user