dashboard and status API show why a check failed (closes #225) #235

Merged
clawbot merged 1 commits from issue-225-show-failure-reason into next 2026-10-02 09:14:28 +02:00
Collaborator

Closes #225

/api/v1/status now gives error for each nameserver entry and each certificate entry whose status is error: the reason the state already kept (README, State File Format). An entry that did not fail has no error field, as in the state file.

The dashboard shows the reason in the entry's row. For a nameserver it takes the place of the records, so a failed nameserver no longer shows the - of one that answered with no records. For a certificate it fills one cell across CN, issuer and expiry, which a failed check leaves empty.

README "Web Dashboard" and "HTTP API" say so. Two handler tests serve real handlers over a state holding a failed nameserver, one that answered, and a failed certificate, and check the API response and the dashboard rows.

What the diff does not show:

  • The dashboard stylesheet static/css/tailwind.min.css is a trimmed build holding only classes the page already used. The new markup uses only those, so the stylesheet is unchanged; a class new to the page would do nothing.
  • A certificate reason is the whole TLS error, timestamps included, so it is long; it wraps at a width of 20rem (max-w-xs), so it does not narrow the Endpoint column.

Disclosures:

  • Not done: the log still does not carry the reason. The issue mentions it, but its definition of done does not ask for it.
  • Judgement call: the dashboard shows the reason whenever the entry has one, rather than testing status; every entry the watcher saves with error has status error.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/dnswatcher/issues/225 `/api/v1/status` now gives `error` for each nameserver entry and each certificate entry whose `status` is `error`: the reason the state already kept (README, State File Format). An entry that did not fail has no `error` field, as in the state file. The dashboard shows the reason in the entry's row. For a nameserver it takes the place of the records, so a failed nameserver no longer shows the `-` of one that answered with no records. For a certificate it fills one cell across CN, issuer and expiry, which a failed check leaves empty. README "Web Dashboard" and "HTTP API" say so. Two handler tests serve real handlers over a state holding a failed nameserver, one that answered, and a failed certificate, and check the API response and the dashboard rows. What the diff does not show: - The dashboard stylesheet `static/css/tailwind.min.css` is a trimmed build holding only classes the page already used. The new markup uses only those, so the stylesheet is unchanged; a class new to the page would do nothing. - A certificate reason is the whole TLS error, timestamps included, so it is long; it wraps at a width of 20rem (`max-w-xs`), so it does not narrow the Endpoint column. Disclosures: - Not done: the log still does not carry the reason. The issue mentions it, but its definition of done does not ask for it. - Judgement call: the dashboard shows the reason whenever the entry has one, rather than testing `status`; every entry the watcher saves with `error` has status `error`. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 08:02:45 +02:00
clawbot self-assigned this 2026-10-02 08:02:45 +02:00
Author
Collaborator
  • internal/handlers/templates/dashboard.html, the new certificate reason cell (colspan="3"): the cell has no width limit, so a long TLS reason takes width from the Endpoint column. With one failed certificate in the state, every endpoint in the Certificates table, healthy ones included, breaks mid-name over two or more lines at desktop width (for example 93.184.216.35:443:ok. then example.com), where on next each endpoint sits on one line. Acceptable: the Endpoint column keeps the width it has on next, and the reason wraps within the space of the CN, issuer and expiry columns. A width limit on the reason using a class the stylesheet already has (such as max-w-xs on an element around the text) does this.

Model: opus-5-5

- `internal/handlers/templates/dashboard.html`, the new certificate reason cell (`colspan="3"`): the cell has no width limit, so a long TLS reason takes width from the Endpoint column. With one failed certificate in the state, every endpoint in the Certificates table, healthy ones included, breaks mid-name over two or more lines at desktop width (for example `93.184.216.35:443:ok.` then `example.com`), where on `next` each endpoint sits on one line. Acceptable: the Endpoint column keeps the width it has on `next`, and the reason wraps within the space of the CN, issuer and expiry columns. A width limit on the reason using a class the stylesheet already has (such as `max-w-xs` on an element around the text) does this. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-02 08:18:42 +02:00
clawbot force-pushed issue-225-show-failure-reason from 8b816f82a0 to ec3c422afd 2026-10-02 08:45:53 +02:00 Compare
Author
Collaborator

The certificate reason now wraps in a block at most 20rem wide (max-w-xs), inside the CN, issuer and expiry columns, so the Endpoint column keeps the width it has on next; rebased onto current next.

Model: opus-5-5

The certificate reason now wraps in a block at most 20rem wide (`max-w-xs`), inside the CN, issuer and expiry columns, so the Endpoint column keeps the width it has on `next`; rebased onto current `next`. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-02 08:46:11 +02:00
Author
Collaborator

Review passed on ec3c422.

Model: opus-5-5

Review passed on ec3c422. Model: opus-5-5
clawbot added 1 commit 2026-10-02 09:14:06 +02:00
/api/v1/status now gives `error` for each nameserver entry and
certificate entry whose status is `error`, copied from the state, which
already kept it. The dashboard shows that reason in place of the records
for a failed nameserver, which used to show the same `-` as one that
answered with no records, and across the CN, issuer and expiry cells
for a failed certificate, wrapped at a width of 20rem so the long TLS
error does not narrow the Endpoint column. The dashboard stylesheet is a
trimmed build, so the new markup uses only classes the page already had.
README Web Dashboard and HTTP API say so.

Model: opus-5-5
clawbot force-pushed issue-225-show-failure-reason from ec3c422afd to 5fe5eb6836 2026-10-02 09:14:06 +02:00 Compare
clawbot merged commit 250f3dd687 into next 2026-10-02 09:14:28 +02:00
clawbot deleted branch issue-225-show-failure-reason 2026-10-02 09:14:28 +02:00
clawbot removed the needs-review label 2026-10-02 09:14:28 +02:00
Sign in to join this conversation.