Skip to content

Add low-disk and failed-job conditions to the server tab badge (#754/#749)#1128

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/disk-job-badges
Jun 16, 2026
Merged

Add low-disk and failed-job conditions to the server tab badge (#754/#749)#1128
erikdarlingdata merged 1 commit into
devfrom
feature/disk-job-badges

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Problem

The per-server tab badge was driven only by blocking / deadlock / CPU / memory. A server whose only problem was a full volume or a failed Agent job showed no tab indicator — the alert surfaced only as a one-shot tray toast and an Alert-History row, so you couldn't tell which server was affected at a glance. (Reported after the low-disk re-fire fix — "low disk and failed agent jobs don't have badges, more half-done work.")

Fix (both apps)

A server's tab badge now lights up while it has an active low-disk breach or a failed Agent job in the lookback window; it auto-clears when the disk recovers / the failure ages out, and acknowledges/silences exactly like the other badges. This is the persistent-indicator complement to the low-disk re-fire fix (#1127): alert once, then stay quietly flagged instead of re-nagging.

  • Dashboard (clean — alert engine already feeds the badge): HasLowDiskAlert/HasFailedJobAlert on ServerHealthStatus, injected at the single UpdateTabBadge choke point from _activeLowDiskAlert/_activeFailedJobAlert, folded into HasAnyAlertCondition + the acknowledge AlertBaseline.
  • Lite (more plumbing): its badge is fed by the blocking/deadlock tab refresh, a separate path from the alert sweep — and the two use different server identities (GUID for tabs vs int DuckDB id for the sweep). The sweep resolves the ServerConnection via the existing deterministic-hash bridge, sets GUID-keyed badge flags, and re-renders via RefreshServerBadgeExtras with the last-known counts; UpdateAlertCounts ORs the two flags. Badge shows the blocking+deadlock count, or ! when the only live condition is disk/job.

Verification

  • AlertBadgeConditionTests — 5 cases (low-disk shows / failed-job shows / none hidden / acknowledge suppresses until a NEW condition / auto-clears on resolve). 5/5 pass.
  • Dashboard + Lite both build clean.
  • UI wiring is best verified live (especially the Lite identity bridge) — SQL2019's T: is an active 1% breach, so its tab should badge.

🤖 Generated with Claude Code

…749)

The per-server tab badge was driven only by blocking/deadlock/CPU/memory, so a
server whose only problem was a full volume or a failed Agent job showed no tab
indicator -- the alert surfaced only as a one-shot tray toast and an
Alert-History row. Both apps now fold the alert engine's active low-disk /
failed-job state into the badge: it lights while the condition is active,
auto-clears when the disk recovers or the failure ages out, and
acknowledges/silences like the other badges. Persistent-indicator complement to
the low-disk re-fire fix (#1127).

Dashboard: HasLowDiskAlert/HasFailedJobAlert on ServerHealthStatus, injected in
the UpdateTabBadge choke point from _activeLowDiskAlert/_activeFailedJobAlert,
folded into HasAnyAlertCondition + the acknowledge AlertBaseline.

Lite: its badge is fed by the blocking/deadlock tab refresh, a separate path
from the alert sweep -- which use different server identities (GUID for tabs vs
int DuckDB id for the sweep). The sweep resolves the ServerConnection via the
existing deterministic-hash bridge, sets GUID-keyed badge flags, and re-renders
via RefreshServerBadgeExtras with the last-known counts; UpdateAlertCounts ORs
the two flags.

Covered by AlertBadgeConditionTests (5 cases). Both apps build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 117b099 into dev Jun 16, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/disk-job-badges branch June 16, 2026 18:29
erikdarlingdata added a commit that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant