feat(tui): classify error reasons on DOWN monitors
CI / test (pull_request) Successful in 2m30s
CI / lint (pull_request) Successful in 1m7s
CI / vulncheck (pull_request) Successful in 46s

Categorize raw error strings into DNS/TCP/TLS/HTTP/ICMP/TMO/PRIV
so users get instant triage from the monitor list without opening
the detail panel.

- Status column shows DOWN:DNS, DOWN:TLS, DOWN:HTTP, etc.
- Inline NAME column errors prefixed with category tag [DNS], [TLS]
- Detail panel shows connection chain checklist for HTTP monitors
  (✓ DNS → ✓ TCP → ✗ TLS → · HTTP) pinpointing failure layer
- All display-side only — no database or model changes
This commit is contained in:
2026-06-03 16:33:12 -04:00
parent 5d362fdbe6
commit 3d7ab5a49e
6 changed files with 464 additions and 8 deletions
+8 -2
View File
@@ -128,7 +128,7 @@ func fmtRetries(site models.Site) string {
return s
}
func fmtStatus(status string, paused bool, inMaint bool) string {
func fmtStatus(status string, paused bool, inMaint bool, errCategory ErrorCategory) string {
if paused {
return warnStyle.Render("PAUSED")
}
@@ -136,7 +136,13 @@ func fmtStatus(status string, paused bool, inMaint bool) string {
return maintStyle.Render("MAINT")
}
switch status {
case "DOWN", "SSL EXP":
case "DOWN":
label := "DOWN"
if errCategory != ErrCatUnknown {
label = "DOWN:" + string(errCategory)
}
return dangerStyle.Render(label)
case "SSL EXP":
return dangerStyle.Render(status)
case "LATE":
return warnStyle.Render(status)