feat(tui): classify error reasons on DOWN monitors #54

Merged
lerko merged 3 commits from feat/error-classification into main 2026-06-03 21:29:05 +00:00
Owner

Summary

  • Error classifier categorizes raw error strings into DNS/TCP/TLS/HTTP/ICMP/TMO/PRIV
  • Status column shows DOWN:DNS, DOWN:TLS, DOWN:HTTP, etc. for instant triage
  • Inline NAME column errors prefixed with category tag ([DNS] no such h...)
  • Detail panel shows connection chain checklist for HTTP monitors pinpointing failure layer
  • All display-side only — no database or model changes

Visual

Status column: DOWNDOWN:DNS / DOWN:TCP / DOWN:TLS / DOWN:HTTP / DOWN:TMO

Detail panel connection chain:

  ✓ DNS resolve
  ✓ TCP connect
  ✗ TLS handshake    certificate expired
  · HTTP response    (skipped)

Test plan

  • go build ./... passes
  • go test ./... — all pass, 0 regressions
  • 22 new test cases: TestClassifyError, TestCategoryTag, TestConnectionChain, TestFmtStatus_ErrorCategory
  • Manual TUI test: trigger DOWN monitor, verify status badge + inline error + detail chain
  • Verify narrow terminal (80 cols) renders correctly
## Summary - Error classifier categorizes raw error strings into DNS/TCP/TLS/HTTP/ICMP/TMO/PRIV - Status column shows `DOWN:DNS`, `DOWN:TLS`, `DOWN:HTTP`, etc. for instant triage - Inline NAME column errors prefixed with category tag (`[DNS] no such h...`) - Detail panel shows connection chain checklist for HTTP monitors pinpointing failure layer - All display-side only — no database or model changes ## Visual **Status column:** `DOWN` → `DOWN:DNS` / `DOWN:TCP` / `DOWN:TLS` / `DOWN:HTTP` / `DOWN:TMO` **Detail panel connection chain:** ``` ✓ DNS resolve ✓ TCP connect ✗ TLS handshake certificate expired · HTTP response (skipped) ``` ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` — all pass, 0 regressions - [x] 22 new test cases: `TestClassifyError`, `TestCategoryTag`, `TestConnectionChain`, `TestFmtStatus_ErrorCategory` - [x] Manual TUI test: trigger DOWN monitor, verify status badge + inline error + detail chain - [x] Verify narrow terminal (80 cols) renders correctly
lerko added 1 commit 2026-06-03 20:35:49 +00:00
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
3d7ab5a49e
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
lerko added 1 commit 2026-06-03 20:57:30 +00:00
fix(tui): remove error truncation from detail panel
CI / test (pull_request) Successful in 2m29s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 51s
c25614c098
Error row now word-wraps to terminal width instead of hard-truncating.
Probe results and state change errors show full text.
lerko added 1 commit 2026-06-03 21:24:34 +00:00
fix(tui): classify safedial "failed to connect" as TCP
CI / test (pull_request) Successful in 2m29s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 51s
CI / test (push) Successful in 2m41s
CI / lint (push) Successful in 56s
CI / vulncheck (push) Successful in 51s
c0ad51af9c
Error from safedial.go fell through to ErrCatUnknown, showing plain
DOWN instead of DOWN:TCP.
lerko merged commit c0ad51af9c into main 2026-06-03 21:29:05 +00:00
lerko deleted branch feat/error-classification 2026-06-03 21:29:05 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#54