After an interval change the summary shows Reachable: 0/26 in red until the second round ends #140

Closed
opened 2026-10-14 16:08:45 +02:00 by clawbot · 1 comment
Collaborator

web/src/main.js lines 1549 to 1598 (the interval menu's handler), at v1.0.0-rc1: after choosing an interval, every host is reset to pending and updateSummary(state) runs (line 1583). wanStats (lines 355 to 364) then counts the hosts whose lastLatency is not null: none. So the summary reads "Reachable: 0/26", in red (line 1021: reachable === 0), although no host has been checked. It stays so through the discarded first round until the second round's last check ends: at the 60 s interval about two minutes of a red 0/26 with the network fine. At page load the same slot reads "--/--" in white (line 878), so the display after a change is both wrong and unlike the start.

How to see it: open the page, wait for a few rounds, choose 60s in the interval menu: the summary shows "Reachable: 0/26" in red at once (seen in headless Chrome 3 s and 33 s after the change; the health box says "Waiting for data..." and the rows "connecting..." meanwhile).

What is right: README.md Features: "Summary stats across WAN hosts only: how many answered"; nothing has answered or failed yet, so the slot should read "--/--" as at load, until the second round ends. The pause feature is designed with "no false outage" (README.md Features); the interval change should not make one.

Severity: medium. Every interval change shows it, for up to two intervals.

Definition of done

  • After an interval change, the summary's Reachable slot and its colour are as at page load ("--/--", not red) until the second round after the change has ended; the rest of the summary is unchanged.
  • A unit test in test/unit/main.test.js resets the hosts as the interval menu does, runs the summary update, and fails if the Reachable slot reads 0/26 or carries the red class.
  • TODO.md updated in the same commit; commit title ends (closes #N) with this issue's number.

Model: fable-5-1

`web/src/main.js` lines 1549 to 1598 (the interval menu's handler), at `v1.0.0-rc1`: after choosing an interval, every host is reset to `pending` and `updateSummary(state)` runs (line 1583). `wanStats` (lines 355 to 364) then counts the hosts whose `lastLatency` is not null: none. So the summary reads **"Reachable: 0/26"**, in red (line 1021: `reachable === 0`), although no host has been checked. It stays so through the discarded first round until the second round's last check ends: at the 60 s interval about two minutes of a red 0/26 with the network fine. At page load the same slot reads "--/--" in white (line 878), so the display after a change is both wrong and unlike the start. **How to see it**: open the page, wait for a few rounds, choose 60s in the interval menu: the summary shows "Reachable: 0/26" in red at once (seen in headless Chrome 3 s and 33 s after the change; the health box says "Waiting for data..." and the rows "connecting..." meanwhile). **What is right**: `README.md` Features: "Summary stats across WAN hosts only: how many answered"; nothing has answered or failed yet, so the slot should read "--/--" as at load, until the second round ends. The pause feature is designed with "no false outage" (`README.md` Features); the interval change should not make one. **Severity**: medium. Every interval change shows it, for up to two intervals. ## Definition of done - [ ] After an interval change, the summary's Reachable slot and its colour are as at page load ("--/--", not red) until the second round after the change has ended; the rest of the summary is unchanged. - [ ] A unit test in `test/unit/main.test.js` resets the hosts as the interval menu does, runs the summary update, and fails if the Reachable slot reads `0/26` or carries the red class. - [ ] `TODO.md` updated in the same commit; commit title ends ` (closes #N)` with this issue's number. Model: fable-5-1
clawbot self-assigned this 2026-10-14 16:08:45 +02:00
Author
Collaborator

Built in #164: while every WAN host is still waiting for its first check, the summary update writes the Reachable slot as at page load, --/-- in white, so after an interval change it reads so until the second round ends. A unit test resets the hosts as the interval menu does and checks the slot.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/netwatch/pulls/164: while every WAN host is still waiting for its first check, the summary update writes the Reachable slot as at page load, `--/--` in white, so after an interval change it reads so until the second round ends. A unit test resets the hosts as the interval menu does and checks the slot. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#140