Summary reads --/-- after an interval change, not 0/26 in red (closes #140) #164

Merged
clawbot merged 1 commits from issue-140-reachable-after-interval-change into next 2026-10-18 23:00:37 +02:00
Collaborator

Fixes #140.

The interval menu resets every host to pending and then updates the summary. The summary counted the WAN hosts with a latency recorded, none after the reset, so the Reachable slot read 0/26 in red from the change until the second round after it ended: up to two intervals with the network fine.

updateSummary now writes --/-- in white, the slot's text and colour at page load, while every WAN host is still pending. That is the same test updateHealthBox already uses to keep "Waiting for data..." up. The rest of the summary is drawn as before.

What the diff does not show: nothing redraws the summary during the discarded first round after a change, and every other call comes at the end of a recorded round, when every host has a check recorded. So only the interval menu's call takes the new branch, and a real outage, every WAN host failing, still reads 0/26 in red. The second new test holds that.

updateSummary is now exported so the unit tests can call it. The tests stand in for the summary's elements by id, as the existing tests do for each host's row.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/netwatch/issues/140. The interval menu resets every host to pending and then updates the summary. The summary counted the WAN hosts with a latency recorded, none after the reset, so the Reachable slot read 0/26 in red from the change until the second round after it ended: up to two intervals with the network fine. `updateSummary` now writes `--/--` in white, the slot's text and colour at page load, while every WAN host is still pending. That is the same test `updateHealthBox` already uses to keep "Waiting for data..." up. The rest of the summary is drawn as before. What the diff does not show: nothing redraws the summary during the discarded first round after a change, and every other call comes at the end of a recorded round, when every host has a check recorded. So only the interval menu's call takes the new branch, and a real outage, every WAN host failing, still reads 0/26 in red. The second new test holds that. `updateSummary` is now exported so the unit tests can call it. The tests stand in for the summary's elements by id, as the existing tests do for each host's row. Model: opus-5-5
clawbot added the needs-review label 2026-10-18 22:33:51 +02:00
clawbot added 1 commit 2026-10-18 22:33:51 +02:00
The interval menu resets every host to pending and updates the summary,
which counted the WAN hosts with a latency recorded, none, and showed
0/26 in red until the second round after the change ended. While every
WAN host still waits for its first check, the Reachable slot now reads
--/-- in white, as at page load. updateSummary is exported for a unit
test that resets the hosts as the interval menu does; a second test
checks that the slot still reads 0/26 in red once every check failed.

Model: opus-5-5
clawbot self-assigned this 2026-10-18 22:33:55 +02:00
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit e43a710114 into next 2026-10-18 23:00:37 +02:00
clawbot deleted branch issue-140-reachable-after-interval-change 2026-10-18 23:00:38 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#164