Rewrite the delivery trace page #126

Merged
jcoffey-dev merged 1 commits from phase4/trace into main 2026-10-19 04:17:36 +00:00
Owner

Phase 4 of the console rewrite, part 1: the delivery trace page.

Rewritten from what it does, with new tests written first. The page's logic now lives in plain, tested modules: trace.ts (grouping stages by attempt, the outcome, stage labels and details, elapsed times, the page's state) and stream.ts (opening the trace stream, with its two-minute limit). The types and the page are rewritten around them.

Two small fixes on the way:

  • "Started N s ago" now counts from when the trace started.
  • Cancelling before the trace token arrives no longer opens the stream anyway.

After this PR: 82.6% not upstream's (was 81.5%), 13,034 upstream lines left in 49 files, 37 dual headers. Tests: 724 → 756.

Visual check: on a local preview I screenshotted all 168 pages in light and dark, plus the open menus, command palette, a dialog, a select, a combobox and toasts, first on main and then on the tip of this stack, on the same data. Nothing changed; the only differences were live dashboard numbers, which also move between two runs of the same code. Each area also got a scripted run with fixed data, compared the same way: a delivery trace, all ten wizard screens, running and refused actions, live tracing from a fixed event stream, 17 dashboard states on a frozen clock (period change and chart zoom included), and 36 states of the editors (expression editing, two-factor setup with a fixed secret, a list filter). Every screen matched. This covers all six phase 4 PRs.

Typecheck, lint, i18n:check, tests, build and notice check pass locally. No new strings.

Phase 4 of the console rewrite, part 1: the delivery trace page. Rewritten from what it does, with new tests written first. The page's logic now lives in plain, tested modules: `trace.ts` (grouping stages by attempt, the outcome, stage labels and details, elapsed times, the page's state) and `stream.ts` (opening the trace stream, with its two-minute limit). The types and the page are rewritten around them. Two small fixes on the way: - "Started N s ago" now counts from when the trace started. - Cancelling before the trace token arrives no longer opens the stream anyway. After this PR: 82.6% not upstream's (was 81.5%), 13,034 upstream lines left in 49 files, 37 dual headers. Tests: 724 → 756. **Visual check:** on a local preview I screenshotted all 168 pages in light and dark, plus the open menus, command palette, a dialog, a select, a combobox and toasts, first on main and then on the tip of this stack, on the same data. Nothing changed; the only differences were live dashboard numbers, which also move between two runs of the same code. Each area also got a scripted run with fixed data, compared the same way: a delivery trace, all ten wizard screens, running and refused actions, live tracing from a fixed event stream, 17 dashboard states on a frozen clock (period change and chart zoom included), and 36 states of the editors (expression editing, two-factor setup with a fixed secret, a list filter). Every screen matched. This covers all six phase 4 PRs. Typecheck, lint, i18n:check, tests, build and notice check pass locally. No new strings.
jcoffey-dev added 1 commit 2026-10-19 04:14:20 +00:00
Rewrite the delivery trace page
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m14s
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 2m48s
b1d833bbe4
The trace's logic is now plain, tested code: trace.ts pairs each step's
start with its outcome, groups steps by delivery attempt, names and
describes them, and holds the trace's states as a reducer; stream.ts runs
the token and the event stream. The page only draws them, unchanged.

Two fixes on the way: "Started Ns ago" counts from the trace's own start
(it carried on from the previous trace before), and cancelling while the
token is still on its way no longer opens the stream afterwards.
jcoffey-dev merged commit 36c9a872e7 into main 2026-10-19 04:17:36 +00:00
jcoffey-dev deleted branch phase4/trace 2026-10-19 04:17:36 +00:00
Sign in to join this conversation.