Overview: "3 raised alert(s)" names nothing — the count is a bare number with no list of WHAT is raised, and drill-in lands on a tab, not the alerts #1724

Closed
opened 2026-09-22 05:54:32 +00:00 by ben · 3 comments
Owner

What Ben saw (Whakatōhea Demo 2026-09-22)

Overview → SYSTEM ALERT: ● 3 raised alert(s) · drill in. Ben: "I'm not sure what they are." Nothing on the Overview, and nothing at the drill-in, lists the three.

What is actually behind it (read on the gateway)

GET /api/v1/monitor/alert-count → {"count":3,"severity":"critical"} — that is the ENTIRE wire contract the Overview reads. GET /api/v1/monitor/status carries the facts but not as alerts: device gateway status document editing down (critical, "1 h — see alert"), service docs-editing up=false critical, backups "1 dataset needs attention". The panel literally cannot say what the three are: there is no /api/v1/monitor/alerts (404). (Whether three is even right — one service down counted on the device row, the service row and…? — is unknowable from outside.)

Fix

  • A list read: GET /api/v1/monitor/alerts → the raised alerts as rows: severity, one-line summary in the operator's words ("Document editing is down on gateway — since 04:52"), the subject (service/device/dataset), raised-at, and the drill-in target (the Services card / the Fleet device / the Backups dataset). The count endpoint is derived from this list, so the number and the rows can never disagree.
  • Overview's SYSTEM ALERT card shows the rows (up to N, then "and 2 more"), each row its own drill-in to the thing that is wrong; the bare count goes.
  • Duplicates: one cause = one alert (a service down must not count once on its device and once on itself).
  • P5 wireframes (docs/ux/wireframes/p5-monitoring/) updated in the same commit; unit test: count == rows.length; drive: the brand-reach / monitoring leg reads the list on a live gateway.

Found on the hand re-founding of Whakatōhea Demo. Related: #1718 (the docs-editing "down" is itself a false probe).

## What Ben saw (Whakatōhea Demo 2026-09-22) Overview → SYSTEM ALERT: **● 3 raised alert(s)** · drill in. Ben: "I'm not sure what they are." Nothing on the Overview, and nothing at the drill-in, lists the three. ## What is actually behind it (read on the gateway) `GET /api/v1/monitor/alert-count` → `{"count":3,"severity":"critical"}` — that is the ENTIRE wire contract the Overview reads. `GET /api/v1/monitor/status` carries the facts but not as alerts: device `gateway` status `document editing down` (critical, "1 h — see alert"), service `docs-editing` up=false critical, backups "1 dataset needs attention". The panel literally cannot say what the three are: there is no `/api/v1/monitor/alerts` (404). (Whether three is even right — one service down counted on the device row, the service row and…? — is unknowable from outside.) ## Fix - A list read: `GET /api/v1/monitor/alerts` → the raised alerts as rows: severity, one-line summary in the operator's words ("Document editing is down on gateway — since 04:52"), the subject (service/device/dataset), raised-at, and the drill-in target (the Services card / the Fleet device / the Backups dataset). The count endpoint is derived from this list, so the number and the rows can never disagree. - Overview's SYSTEM ALERT card shows the rows (up to N, then "and 2 more"), each row its own drill-in to the thing that is wrong; the bare count goes. - Duplicates: one cause = one alert (a service down must not count once on its device and once on itself). - P5 wireframes (`docs/ux/wireframes/p5-monitoring/`) updated in the same commit; unit test: count == rows.length; drive: the brand-reach / monitoring leg reads the list on a live gateway. Found on the hand re-founding of Whakatōhea Demo. Related: #1718 (the docs-editing "down" is itself a false probe).
Author
Owner

Ben 2026-09-22: alerts show as a badge on the tab where the problem lives (Backups / Services / Fleet), not repeated on Overview and Services; Overview keeps one compact line pointing at the tabs. Design decided together with #1725 (needs-design there); this ticket builds the list read + the per-tab counts the badges consume.

Ben 2026-09-22: alerts show as a **badge on the tab where the problem lives** (Backups / Services / Fleet), not repeated on Overview and Services; Overview keeps one compact line pointing at the tabs. Design decided together with #1725 (needs-design there); this ticket builds the list read + the per-tab counts the badges consume.

swarm-claim host=matou-dev-server-01 run=29849
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=29849 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1724 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1724,
  "status": "success",
  "commits": [
    "d2a08db988939e1f0d917317435bc8c1df5c204b"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/monitoringClient.ts",
    "dashboard/src/lib/monitoring.ts",
    "dashboard/tests/fakes/monitoring.ts",
    "internal/controlapi/handler.go",
    "internal/controlapi/handler_test.go",
    "internal/monitor/monitor_test.go",
    "internal/monitor/status.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/monitor/ ./internal/controlapi/ ./internal/enrollwire/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#default --command pnpm --filter @idss/openapi-spec test",
      "exit_code": 0
    },
    {
      "command": "nix develop .#default --command pnpm --filter @idss/dashboard test",
      "exit_code": 0
    },
    {
      "command": "nix develop .#default --command pnpm run lint",
      "exit_code": 0
    },
    {
      "command": "nix develop .#default --command (cd dashboard && vue-tsc -p tsconfig.json --noEmit)",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A list read GET /api/v1/monitor/alerts returns raised alerts as rows (severity, one-line summary, subject, raised-at, drill-in target)": "internal/monitor/status.go Alerts()/AlertRow/alertRowLocked; internal/controlapi/handler.go route; packages/openapi-spec/openapi.yaml AlertsView/AlertRow; TestHandler_AlertsServesTheRaisedList",
    "The count endpoint is derived from this list so number and rows can never disagree; unit test count == rows.length": "AlertCount() derived from alertsViewLocked() (internal/monitor/status.go); TestAlerts_ListNamesEachRaisedConditionAndItsTab asserts v.Count == len(v.Alerts) and AlertCount agrees; TestHandler_AlertsServesTheRaisedList asserts count == len(rows)",
    "Duplicates: one cause = one alert (a service down must not count once on its device and once on itself)": "the standing-alert store is keyed by condition (Alert.ID); Alerts() iterates o.alerts once, one row per condition; TestAlerts_ListNamesEachRaisedConditionAndItsTab asserts count == 2 with one services row for the service-down",
    "Per-tab counts the badges consume (Backups / Services / Fleet)": "AlertsView.PerTab (per_tab) built in alertsViewLocked(); TestAlerts_ asserts per_tab services:1 fleet:1",
    "P5 wireframes / Overview SYSTEM ALERT card shows rows": "deferred to #1725 per Ben's ticket comment — badges live on the tab where the problem lives, designed together with #1725 (needs-design); this slice ships the list read + per-tab counts that design consumes"
  },
  "summary": "Added GET /api/v1/monitor/alerts list read (Orchestrator.Alerts) with the count derived from it (count == len rows), per-tab badge counts, and dedup by condition; AlertCount now derived from the same list.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1724 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1724, "status": "success", "commits": [ "d2a08db988939e1f0d917317435bc8c1df5c204b" ], "changed_files": [ "STATUS.md", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/monitoringClient.ts", "dashboard/src/lib/monitoring.ts", "dashboard/tests/fakes/monitoring.ts", "internal/controlapi/handler.go", "internal/controlapi/handler_test.go", "internal/monitor/monitor_test.go", "internal/monitor/status.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/monitor/ ./internal/controlapi/ ./internal/enrollwire/", "exit_code": 0 }, { "command": "nix develop .#default --command pnpm --filter @idss/openapi-spec test", "exit_code": 0 }, { "command": "nix develop .#default --command pnpm --filter @idss/dashboard test", "exit_code": 0 }, { "command": "nix develop .#default --command pnpm run lint", "exit_code": 0 }, { "command": "nix develop .#default --command (cd dashboard && vue-tsc -p tsconfig.json --noEmit)", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 } ], "criteria": { "A list read GET /api/v1/monitor/alerts returns raised alerts as rows (severity, one-line summary, subject, raised-at, drill-in target)": "internal/monitor/status.go Alerts()/AlertRow/alertRowLocked; internal/controlapi/handler.go route; packages/openapi-spec/openapi.yaml AlertsView/AlertRow; TestHandler_AlertsServesTheRaisedList", "The count endpoint is derived from this list so number and rows can never disagree; unit test count == rows.length": "AlertCount() derived from alertsViewLocked() (internal/monitor/status.go); TestAlerts_ListNamesEachRaisedConditionAndItsTab asserts v.Count == len(v.Alerts) and AlertCount agrees; TestHandler_AlertsServesTheRaisedList asserts count == len(rows)", "Duplicates: one cause = one alert (a service down must not count once on its device and once on itself)": "the standing-alert store is keyed by condition (Alert.ID); Alerts() iterates o.alerts once, one row per condition; TestAlerts_ListNamesEachRaisedConditionAndItsTab asserts count == 2 with one services row for the service-down", "Per-tab counts the badges consume (Backups / Services / Fleet)": "AlertsView.PerTab (per_tab) built in alertsViewLocked(); TestAlerts_ asserts per_tab services:1 fleet:1", "P5 wireframes / Overview SYSTEM ALERT card shows rows": "deferred to #1725 per Ben's ticket comment — badges live on the tab where the problem lives, designed together with #1725 (needs-design); this slice ships the list read + per-tab counts that design consumes" }, "summary": "Added GET /api/v1/monitor/alerts list read (Orchestrator.Alerts) with the count derived from it (count == len rows), per-tab badge counts, and dedup by condition; AlertCount now derived from the same list.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1724
No description provided.