Show whether the status on / and /status is fresh (closes #152) #180

Merged
clawbot merged 1 commits from issue-152-freshness-spinner into next 2026-10-27 04:24:53 +01:00
Collaborator

Closes #152.

/ and /status now show whether the status is fresh. Next to the status, a one-character braille spinner turns one frame each time a stats answer counts more messages than the answer before. Its colour cycles through six colours, as rtnetmon's does.

When no such answer has come for three refresh periods, the spinner gives way to "stale for Ns" in the page's disconnected colour. That is 15 seconds on / and 6 on /status. A failed request is not a fresh answer. The check runs on its own one-second timer, so a request that hangs still leads to "stale". The spinner comes back with the next fresh answer.

Each page keeps its own copy of the script, with the same constant names. A Go test renders each page and checks that the indicator follows the status element.

I ran the image from make docker against the live feed and watched both pages in a headless browser. I stopped the container and saw "stale" appear on both pages. I started it again and saw the spinner return.

What the diff does not show:

  • After a restart the message count starts lower, so the spinner returns with the second answer.
  • Until the first fresh answer, the time counts from when the page loaded.

Disclosures:

  • Judgement call: on / the status card has no room beside "Connected", so the indicator sits on the line under it, in a smaller font.
  • README unchanged: it does not describe these pages' fields.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/routewatch/issues/152. `/` and `/status` now show whether the status is fresh. Next to the status, a one-character braille spinner turns one frame each time a stats answer counts more messages than the answer before. Its colour cycles through six colours, as rtnetmon's does. When no such answer has come for three refresh periods, the spinner gives way to "stale for Ns" in the page's disconnected colour. That is 15 seconds on `/` and 6 on `/status`. A failed request is not a fresh answer. The check runs on its own one-second timer, so a request that hangs still leads to "stale". The spinner comes back with the next fresh answer. Each page keeps its own copy of the script, with the same constant names. A Go test renders each page and checks that the indicator follows the status element. I ran the image from `make docker` against the live feed and watched both pages in a headless browser. I stopped the container and saw "stale" appear on both pages. I started it again and saw the spinner return. What the diff does not show: - After a restart the message count starts lower, so the spinner returns with the second answer. - Until the first fresh answer, the time counts from when the page loaded. Disclosures: - Judgement call: on `/` the status card has no room beside "Connected", so the indicator sits on the line under it, in a smaller font. - README unchanged: it does not describe these pages' fields. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 04:11:34 +01:00
clawbot self-assigned this 2026-10-27 04:11:34 +01:00
clawbot added 1 commit 2026-10-27 04:11:34 +01:00
Each page's script turns a one-character braille spinner next to the
status whenever a stats answer counts more messages than the one
before. Its colour cycles as rtnetmon's does. A separate check runs
every second. Once no such answer has come for three refresh periods,
15 seconds on / and 6 on /status, it shows "stale" and the seconds
since, in the page's disconnected colour. A failed or hung request
counts as no fresh answer. On / the card has no room beside
"Connected", so the indicator sits on the line under it. A test renders
both pages and checks the indicator follows the status element.

Model: opus-5-5
Author
Collaborator

PASS: the change meets #152 and is ready to merge into next.

Judgement call: the issue has no written definition of done, so the change was gated against the owner's words in it and the rtnetmon spinner they name.
Judgement call: the new test checks only that the indicator follows the status element; the script's rules have no automated test, because the repo's tests cannot run page scripts, as in #164.
Judgement call: on / the indicator sits under "Connected", not beside it, which is accepted because "Connected" already fills the card's width on a desktop screen.
Judgement call: the PR body, at about 255 words, is counted as within the limit of about 250.

Model: opus-5-5

PASS: the change meets https://git.eeqj.de/sneak/routewatch/issues/152 and is ready to merge into `next`. Judgement call: the issue has no written definition of done, so the change was gated against the owner's words in it and the rtnetmon spinner they name. Judgement call: the new test checks only that the indicator follows the status element; the script's rules have no automated test, because the repo's tests cannot run page scripts, as in https://git.eeqj.de/sneak/routewatch/pulls/164. Judgement call: on `/` the indicator sits under "Connected", not beside it, which is accepted because "Connected" already fills the card's width on a desktop screen. Judgement call: the PR body, at about 255 words, is counted as within the limit of about 250. Model: opus-5-5
clawbot merged commit a5bff4e13c into next 2026-10-27 04:24:53 +01:00
clawbot deleted branch issue-152-freshness-spinner 2026-10-27 04:24:53 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#180