tick in src/main.js drew no row until the round's slowest check ended. Since #79 a check times out at 80% of the interval, so one target that never answers held every row back by 24 seconds at a 30-second interval. Each check now pushes its sample and redraws its row as it ends. When the last check ends, every row is redrawn and sorting, the summary, the health box and offline detection run once, as before.
What the diff does not show:
A check that ends while paused, or after its round is given up, still draws nothing, and the first round is still discarded as a whole. Each check now tests, as it ends, the conditions the round used to test once at its end; tickCount stays 0 for the whole first round. One unit test covers each condition.
The redraw of every row at the round's end clears "paused" from rows whose check ended before the user resumed; a unit test covers it.
The row is looked up when its check ends, as a pin click can re-sort the rows mid-round.
The tests import tick, AppState and greyOutUI, now exported, and run them against a stand-in page.
Judgement call: if the user pauses and resumes within one round, a check that ended while paused is discarded; its row shows its previous result once the round ends.
Pausing and resuming in the first round still leaves rows reading "paused" into the second round, as on next, since the first round draws nothing.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/netwatch/issues/91.
`tick` in `src/main.js` drew no row until the round's slowest check ended. Since https://git.eeqj.de/sneak/netwatch/pulls/79 a check times out at 80% of the interval, so one target that never answers held every row back by 24 seconds at a 30-second interval. Each check now pushes its sample and redraws its row as it ends. When the last check ends, every row is redrawn and sorting, the summary, the health box and offline detection run once, as before.
What the diff does not show:
- A check that ends while paused, or after its round is given up, still draws nothing, and the first round is still discarded as a whole. Each check now tests, as it ends, the conditions the round used to test once at its end; `tickCount` stays 0 for the whole first round. One unit test covers each condition.
- The redraw of every row at the round's end clears "paused" from rows whose check ended before the user resumed; a unit test covers it.
- The row is looked up when its check ends, as a pin click can re-sort the rows mid-round.
- The tests import `tick`, `AppState` and `greyOutUI`, now exported, and run them against a stand-in page.
- Judgement call: if the user pauses and resumes within one round, a check that ended while paused is discarded; its row shows its previous result once the round ends.
- Pausing and resuming in the first round still leaves rows reading "paused" into the second round, as on `next`, since the first round draws nothing.
Model: opus-5-5
TODO.md conflicts with current next (aa35625): both add an entry at the top of Completed Steps, this one and the one for #88. Acceptable: the branch rebased onto current next with both entries kept.
The new unit test does not cover the conditions this change moved into each check (test/unit/main.test.js, tick in src/main.js). It never gives a round up, never pauses, and starts on the third round, so removing any of signal.aborted, state.paused or state.tickCount === 0 from the test each check makes as it ends leaves every test passing. Without the first, a round given up by the recovery probe records its still-waiting checks as timeouts. Acceptable: tests on the mocked clock where a check is still waiting when (a) its round is given up, (b) the user pauses, and (c) it is in the first round; its row stays undrawn in each case. Each test fails when its condition is removed.
After a pause and resume within one round, rows stay "paused" past the end of the round (tick and togglePause in src/main.js). Rows that showed this round's result before the pause still read "paused" when the round ends, while the summary and health box are live again. They change only when each row's next check ends. A row whose check ended during the pause stays "paused" until its next result. On next, the end of the round redraws every row. Discarding the check that ended during the pause, the PR's judgement call, is fine. Acceptable: no row reads "paused" once the round that was running when the user resumed has ended, as on next.
Unverified in a browser: a round given up by the recovery probe. It is given up the same way as after an interval change, which was checked.
Model: opus-5-5
needs-rebase
1. `TODO.md` conflicts with current `next` (`aa35625`): both add an entry at the top of Completed Steps, this one and the one for https://git.eeqj.de/sneak/netwatch/issues/88. Acceptable: the branch rebased onto current `next` with both entries kept.
2. The new unit test does not cover the conditions this change moved into each check (`test/unit/main.test.js`, `tick` in `src/main.js`). It never gives a round up, never pauses, and starts on the third round, so removing any of `signal.aborted`, `state.paused` or `state.tickCount === 0` from the test each check makes as it ends leaves every test passing. Without the first, a round given up by the recovery probe records its still-waiting checks as timeouts. Acceptable: tests on the mocked clock where a check is still waiting when (a) its round is given up, (b) the user pauses, and (c) it is in the first round; its row stays undrawn in each case. Each test fails when its condition is removed.
3. After a pause and resume within one round, rows stay "paused" past the end of the round (`tick` and `togglePause` in `src/main.js`). Rows that showed this round's result before the pause still read "paused" when the round ends, while the summary and health box are live again. They change only when each row's next check ends. A row whose check ended during the pause stays "paused" until its next result. On `next`, the end of the round redraws every row. Discarding the check that ended during the pause, the PR's judgement call, is fine. Acceptable: no row reads "paused" once the round that was running when the user resumed has ended, as on `next`.
Unverified in a browser: a round given up by the recovery probe. It is given up the same way as after an interval change, which was checked.
Model: opus-5-5
Rebased onto next (aa35625); TODO.md keeps both entries, this one above the one for #88.
Three new tests in test/unit/main.test.js, one each for the round given up, the user pausing, and the first round, where the answering target's row stays undrawn; each fails without its condition in tick. The stand-in page now starts empty for every test.
tick again redraws every row once the round's last check ends, as on next, so no row reads "paused" after that round; the check that ended during the pause is still discarded.
Model: opus-5-5
Rework of https://git.eeqj.de/sneak/netwatch/pulls/92#issuecomment-117106:
1. Rebased onto `next` (`aa35625`); `TODO.md` keeps both entries, this one above the one for https://git.eeqj.de/sneak/netwatch/issues/88.
2. Three new tests in `test/unit/main.test.js`, one each for the round given up, the user pausing, and the first round, where the answering target's row stays undrawn; each fails without its condition in `tick`. The stand-in page now starts empty for every test.
3. `tick` again redraws every row once the round's last check ends, as on `next`, so no row reads "paused" after that round; the check that ended during the pause is still discarded.
Model: opus-5-5
TODO.md conflicts with current next (9e4d3fd): both add an entry at the top of Completed Steps, this one and the one for #34. Acceptable: the branch rebased onto current next with both entries kept.
No test covers the redraw of every row when the round's last check ends (tick in src/main.js, the "Redraw every row" step; test/unit/main.test.js). With that redraw removed every test still passes, and in a browser the rows read "paused" again after a pause and resume, the defect fixed since the first review. Acceptable: a test on the mocked clock where the user pauses and resumes during a round and, once its last check ends, no row reads "paused"; it fails when that redraw is removed.
README.md, the tick() bullet, says the rows are sorted once the last check ends. They are sorted only after the first round that is not discarded and then every tenth round. Acceptable: the bullet says when the rows are sorted, or no longer says they are sorted every round.
Model: opus-5-5
needs-rebase
1. `TODO.md` conflicts with current `next` (`9e4d3fd`): both add an entry at the top of Completed Steps, this one and the one for https://git.eeqj.de/sneak/netwatch/issues/34. Acceptable: the branch rebased onto current `next` with both entries kept.
2. No test covers the redraw of every row when the round's last check ends (`tick` in `src/main.js`, the "Redraw every row" step; `test/unit/main.test.js`). With that redraw removed every test still passes, and in a browser the rows read "paused" again after a pause and resume, the defect fixed since the first review. Acceptable: a test on the mocked clock where the user pauses and resumes during a round and, once its last check ends, no row reads "paused"; it fails when that redraw is removed.
3. `README.md`, the `tick()` bullet, says the rows are sorted once the last check ends. They are sorted only after the first round that is not discarded and then every tenth round. Acceptable: the bullet says when the rows are sorted, or no longer says they are sorted every round.
Model: opus-5-5
Rebased onto next (9e4d3fd); TODO.md keeps both entries, this one above the one for #34.
New test in test/unit/main.test.js: the user pauses and resumes after one target's check has ended, and once the round's last check ends no row reads "paused"; it fails with that redraw removed. It pauses through greyOutUI, now exported, since togglePause also needs the pause button, which the stand-in page does not have.
The README.mdtick() bullet now says the rows are sorted after the first round that is not discarded and every tenth round after that.
Model: opus-5-5
Rework of https://git.eeqj.de/sneak/netwatch/pulls/92#issuecomment-117481:
1. Rebased onto `next` (`9e4d3fd`); `TODO.md` keeps both entries, this one above the one for https://git.eeqj.de/sneak/netwatch/issues/34.
2. New test in `test/unit/main.test.js`: the user pauses and resumes after one target's check has ended, and once the round's last check ends no row reads "paused"; it fails with that redraw removed. It pauses through `greyOutUI`, now exported, since `togglePause` also needs the pause button, which the stand-in page does not have.
3. The `README.md` `tick()` bullet now says the rows are sorted after the first round that is not discarded and every tenth round after that.
Model: opus-5-5
PASS: the change meets #91, and both findings of #92 (comment) are resolved.
The branch needs a rebase onto current next (e4df415) before merging; the only conflict is in TODO.md, where both entries are kept.
Model: opus-5-5
PASS: the change meets https://git.eeqj.de/sneak/netwatch/issues/91, and both findings of https://git.eeqj.de/sneak/netwatch/pulls/92#issuecomment-117481 are resolved.
The branch needs a rebase onto current `next` (`e4df415`) before merging; the only conflict is in `TODO.md`, where both entries are kept.
Model: opus-5-5
State for whoever picks this up: branch issue-91-row-shows-on-check-end, last pushed 2b51eb1. The third review passed the change (#92 (comment)). Left: rebase onto current next keeping every TODO.md entry (the only conflict), confirm make check, squash-merge.
Model: opus-5-5
State for whoever picks this up: branch `issue-91-row-shows-on-check-end`, last pushed `2b51eb1`. The third review passed the change (https://git.eeqj.de/sneak/netwatch/pulls/92#issuecomment-117724). Left: rebase onto current `next` keeping every `TODO.md` entry (the only conflict), confirm `make check`, squash-merge.
Model: opus-5-5
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. When
the last check ends, every row is redrawn, so none still reads "paused"
after a pause and resume, and sorting, the summary, the health box and
offline detection run once. 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.
Unit tests run tick on the mocked clock against a stand-in page.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #91.
tickinsrc/main.jsdrew no row until the round's slowest check ended. Since #79 a check times out at 80% of the interval, so one target that never answers held every row back by 24 seconds at a 30-second interval. Each check now pushes its sample and redraws its row as it ends. When the last check ends, every row is redrawn and sorting, the summary, the health box and offline detection run once, as before.What the diff does not show:
A check that ends while paused, or after its round is given up, still draws nothing, and the first round is still discarded as a whole. Each check now tests, as it ends, the conditions the round used to test once at its end;
tickCountstays 0 for the whole first round. One unit test covers each condition.The redraw of every row at the round's end clears "paused" from rows whose check ended before the user resumed; a unit test covers it.
The row is looked up when its check ends, as a pin click can re-sort the rows mid-round.
The tests import
tick,AppStateandgreyOutUI, now exported, and run them against a stand-in page.Judgement call: if the user pauses and resumes within one round, a check that ended while paused is discarded; its row shows its previous result once the round ends.
Pausing and resuming in the first round still leaves rows reading "paused" into the second round, as on
next, since the first round draws nothing.Model: opus-5-5
needs-rebase
TODO.mdconflicts with currentnext(aa35625): both add an entry at the top of Completed Steps, this one and the one for #88. Acceptable: the branch rebased onto currentnextwith both entries kept.The new unit test does not cover the conditions this change moved into each check (
test/unit/main.test.js,tickinsrc/main.js). It never gives a round up, never pauses, and starts on the third round, so removing any ofsignal.aborted,state.pausedorstate.tickCount === 0from the test each check makes as it ends leaves every test passing. Without the first, a round given up by the recovery probe records its still-waiting checks as timeouts. Acceptable: tests on the mocked clock where a check is still waiting when (a) its round is given up, (b) the user pauses, and (c) it is in the first round; its row stays undrawn in each case. Each test fails when its condition is removed.After a pause and resume within one round, rows stay "paused" past the end of the round (
tickandtogglePauseinsrc/main.js). Rows that showed this round's result before the pause still read "paused" when the round ends, while the summary and health box are live again. They change only when each row's next check ends. A row whose check ended during the pause stays "paused" until its next result. Onnext, the end of the round redraws every row. Discarding the check that ended during the pause, the PR's judgement call, is fine. Acceptable: no row reads "paused" once the round that was running when the user resumed has ended, as onnext.Unverified in a browser: a round given up by the recovery probe. It is given up the same way as after an interval change, which was checked.
Model: opus-5-5
88e0d5116ftod35a3a8769d35a3a8769to6126a7f85cRework of #92 (comment):
next(aa35625);TODO.mdkeeps both entries, this one above the one for #88.test/unit/main.test.js, one each for the round given up, the user pausing, and the first round, where the answering target's row stays undrawn; each fails without its condition intick. The stand-in page now starts empty for every test.tickagain redraws every row once the round's last check ends, as onnext, so no row reads "paused" after that round; the check that ended during the pause is still discarded.Model: opus-5-5
needs-rebase
TODO.mdconflicts with currentnext(9e4d3fd): both add an entry at the top of Completed Steps, this one and the one for #34. Acceptable: the branch rebased onto currentnextwith both entries kept.No test covers the redraw of every row when the round's last check ends (
tickinsrc/main.js, the "Redraw every row" step;test/unit/main.test.js). With that redraw removed every test still passes, and in a browser the rows read "paused" again after a pause and resume, the defect fixed since the first review. Acceptable: a test on the mocked clock where the user pauses and resumes during a round and, once its last check ends, no row reads "paused"; it fails when that redraw is removed.README.md, thetick()bullet, says the rows are sorted once the last check ends. They are sorted only after the first round that is not discarded and then every tenth round. Acceptable: the bullet says when the rows are sorted, or no longer says they are sorted every round.Model: opus-5-5
6126a7f85cto2b51eb15bbRework of #92 (comment):
next(9e4d3fd);TODO.mdkeeps both entries, this one above the one for #34.test/unit/main.test.js: the user pauses and resumes after one target's check has ended, and once the round's last check ends no row reads "paused"; it fails with that redraw removed. It pauses throughgreyOutUI, now exported, sincetogglePausealso needs the pause button, which the stand-in page does not have.README.mdtick()bullet now says the rows are sorted after the first round that is not discarded and every tenth round after that.Model: opus-5-5
PASS: the change meets #91, and both findings of #92 (comment) are resolved.
The branch needs a rebase onto current
next(e4df415) before merging; the only conflict is inTODO.md, where both entries are kept.Model: opus-5-5
State for whoever picks this up: branch
issue-91-row-shows-on-check-end, last pushed2b51eb1. The third review passed the change (#92 (comment)). Left: rebase onto currentnextkeeping everyTODO.mdentry (the only conflict), confirmmake check, squash-merge.Model: opus-5-5
2b51eb15bbto695bf8665e