fix: six small fixes — rate limiter leak, DST SLA, probe sort, TUI cleanup #117

Merged
lerko merged 1 commits from fix/small-fixes-batch7 into main 2026-06-12 13:26:56 +00:00
Owner

Summary

Six independent small fixes from the review-findings backlog.

  1. Rate limiter goroutine leak — cleanup goroutine now stoppable via `Stop()` channel. Was looping forever with no exit path.
  2. Dead WindowSizeMsg branch — removed from `handleFormMsg`. Top-level Update handles resize first.
  3. Probe results sorted — node IDs sorted before rendering. Map iteration was reordering rows every frame.
  4. fmtAlertConfig takes AlertConfig — instead of anonymous struct built inline by the caller.
  5. Backspace no longer triggers delete — only `d` opens the delete confirm. Prevents accidental delete on habitual backspace.
  6. DST-safe SLA buckets — `time.Date(y, m, d-i)` instead of `Add(-i*24h)`. Lands on midnight correctly across DST transitions.

Test plan

  • `go test -count=1 ./...` — all pass
  • `golangci-lint` — 0 issues
  • Existing SLA tests pass with calendar day arithmetic
## Summary Six independent small fixes from the review-findings backlog. 1. **Rate limiter goroutine leak** — cleanup goroutine now stoppable via \`Stop()\` channel. Was looping forever with no exit path. 2. **Dead WindowSizeMsg branch** — removed from \`handleFormMsg\`. Top-level Update handles resize first. 3. **Probe results sorted** — node IDs sorted before rendering. Map iteration was reordering rows every frame. 4. **fmtAlertConfig takes AlertConfig** — instead of anonymous struct built inline by the caller. 5. **Backspace no longer triggers delete** — only \`d\` opens the delete confirm. Prevents accidental delete on habitual backspace. 6. **DST-safe SLA buckets** — \`time.Date(y, m, d-i)\` instead of \`Add(-i*24h)\`. Lands on midnight correctly across DST transitions. ## Test plan - [x] \`go test -count=1 ./...\` — all pass - [x] \`golangci-lint\` — 0 issues - [x] Existing SLA tests pass with calendar day arithmetic
lerko added 1 commit 2026-06-12 13:21:38 +00:00
fix: six small fixes — rate limiter leak, DST SLA, probe sort, TUI cleanup
CI / test (pull_request) Successful in 1m55s
CI / lint (pull_request) Successful in 1m27s
CI / vulncheck (pull_request) Successful in 56s
9115ab720c
1. Rate limiter cleanup goroutine now stoppable via Stop() channel
   instead of looping forever. Prevents goroutine leak in tests.

2. Dead WindowSizeMsg branch in handleFormMsg removed — top-level
   Update handles resize before forms see it.

3. Probe results sorted by node ID — map iteration no longer
   reorders rows every render.

4. fmtAlertConfig takes models.AlertConfig directly instead of an
   anonymous struct the caller builds inline.

5. Backspace no longer aliases delete — d is the documented key.
   Prevents accidental delete-confirm on habitual backspace.

6. SLA daily buckets use time.Date day arithmetic instead of
   Add(-i*24h) — lands on midnight correctly across DST transitions.
lerko merged commit 9115ab720c into main 2026-06-12 13:26:56 +00:00
lerko deleted branch fix/small-fixes-batch7 2026-06-12 13:26:57 +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#117