hub v0.31.0: accept 'critical' severity at event ingest + UI badges/CSS; event_test.go (red-proofed); REUSE.md §1/§3 updated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
@@ -1,5 +1,28 @@
|
||||
# Felhom Hub — Changelog
|
||||
|
||||
## v0.31.0 — critical severity accepted at event ingest + visible in UI (2026-07-03)
|
||||
|
||||
Fixes the gotcha the REUSE sweep surfaced: `handleEvent` coerced any severity outside
|
||||
{info,warning,error} — including `"critical"` — to `"info"` at ingest, so a controller-POSTed
|
||||
critical event never notified even though the dispatcher (`severityNotifies`, v0.24.0) and
|
||||
`FormatOperatorEmail` already handle critical correctly.
|
||||
|
||||
- **Ingest (`internal/api/handler.go` `handleEvent`):** `"critical"` added to the severity case
|
||||
list. Unknown values (and case-variants like `"Critical"`) still coerce to `"info"` — the
|
||||
exact-match-lowercase coercion contract is kept and now locked by test.
|
||||
- **Hungarian label (`internal/notify/templates.go`):** `severityLabels["critical"] = "Kritikus hiba"`
|
||||
(was missing — customer emails would have shown the raw English word).
|
||||
- **UI counts:** dashboard consumer (`internal/web/server.go`) gains `EventCriticals`;
|
||||
`dashboard.html` renders the critical badge FIRST in the 24h count chain (guard extended);
|
||||
`customer_unified.html` gains the `{{.}} critical` summary badge before errors.
|
||||
- **style.css:** defines the previously-referenced-but-undefined `.severity-critical`
|
||||
(`--crit`/`--crit-dim` tokens) and `.severity-ok` (neutral, exception-color principle). No other
|
||||
restyle.
|
||||
- **Tests (`internal/api/event_test.go`, new):** critical preserved to store (companion red-proof:
|
||||
shown failing against the pre-fix switch — stored `"info"`); unknown severity → info; unknown
|
||||
event_type → 400 + nothing stored; no-auth → 401. First tests on the /event endpoint.
|
||||
- REUSE.md §1/§3 updated in the same commit (the maintenance rule's first outing).
|
||||
|
||||
## docs — REUSE.md introduced (2026-07-03)
|
||||
|
||||
Cross-repo reuse-map rollout (docs-only, no code change, no version bump). New `REUSE.md` at the
|
||||
|
||||
Reference in New Issue
Block a user