app/format, ui/jobs_view: DisplayStats summary + Statistics detail row (T2.6, T2.7)

Add DisplayStats to format.go: returns "No runs recorded" when RunCount is
zero, otherwise a one-line "N runs, M failed, last X ms, avg Y ms, max Z ms"
summary.  Wire a Statistics detail row into the jobs panel that refreshes via
updateDetails alongside the other runtime fields.

Tests: TestDisplayStats (nil/zero/normal/no-fail), TestUpdateStats (three
sequential fake runs through updateStats verifying all aggregate fields), and
five seed tests in runner/seed_test.go covering basic aggregation,
duration-less legacy logs, maxFiles capping, missing directory, and
unmatched log files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-24 08:24:48 +03:00
parent 6c69f323bd
commit 886d0d9caa
6 changed files with 231 additions and 2 deletions
+2 -2
View File
@@ -93,8 +93,8 @@ Done first because both share a compact, single-line record formatter.
- [x] T2.3 — `duration` log header
- [x] T2.4 — runtime aggregate + `executeRun` update
- [ ] T2.5 — seed stats from log files
- [ ] T2.6 — `DisplayStats` + Statistics row
- [ ] T2.7 — stats tests
- [x] T2.6 — `DisplayStats` + Statistics row
- [x] T2.7 — stats tests
### Phase 3 — Per-job run policy
- [ ] T3.1 — `Job.OverlapPolicy` field