Each target's row shows its result as soon as its check ends (closes #91)
check / check (push) Successful in 1m52s

tick drew no row until the round's slowest check ended, up to 24
seconds at a 30-second interval since checks time out at 80% of it.
Each check now pushes its sample and redraws its row as it ends;
sorting, the summary, the health box and offline detection still run
once, after the last check. A check that ends while paused or after its
round is given up draws nothing, and the first round is still discarded
as a whole. The row is looked up when the check ends, as a pin click
can re-sort the rows mid-round.

The new unit test runs tick on the mocked clock against a stand-in
page.

Model: opus-5-5
This commit is contained in:
2026-10-03 14:58:53 +00:00
parent aa35625d47
commit d35a3a8769
4 changed files with 102 additions and 32 deletions
+6 -5
View File
@@ -104,9 +104,10 @@ code lives in `src/main.js` with a class-based architecture:
color-coded line segments, error regions, and DPR-aware scaling
- **UI functions**: `buildUI()` constructs the DOM, `updateHostRow()` /
`updateSummary()` / `updateHealthBox()` handle incremental updates
- **`tick()`**: Main loop — measures all hosts in parallel via `Promise.all`,
pushes samples, redraws UI. When paused, pushes blank markers (no probes, no
false outage)
- **`tick()`**: Main loop — measures all hosts in parallel, pushing each host's
sample and redrawing its row as soon as its check ends, then sorts and redraws
the summary and health box once the last check ends. When paused, pushes blank
markers (no probes, no false outage)
- **`Reporter`**: Posts collected samples to the backend
### Reporting
@@ -144,8 +145,8 @@ have all finished before the next round is due. When no WAN host answers, a
recovery probe checks 4 random WAN hosts every half second, giving up the checks
it started half a second before. As soon as one answers, a new round starts at
once, as it does after an interval change. A round started early gives up the
last round's checks if they are still waiting, and that round records nothing,
so rounds never overlap. IPv4 only.
last round's checks if they are still waiting, and that round records nothing
more, so rounds never overlap. IPv4 only.
### Color coding