fix: seven fixes — token scan, variadic cleanup, TUI layout, compose secrets #118

Merged
lerko merged 1 commits from fix/small-fixes-batch8 into main 2026-06-12 13:43:40 +00:00
Owner

Summary

Seven fixes from the review-findings backlog.

  1. UpdateSite handles token-read Scan error — was silently ignoring all errors including real DB failures. Now surfaces non-ErrNoRows errors.
  2. RunCheck allowPrivate → real bool param — was variadic (both callers always passed a value). Dead maxRequestBody duplicate removed from sqlstore.go.
  3. Footer help documents [Space] — group collapse shortcut was undocumented.
  4. Unified cursor clampingadjustCursor now delegates to clampCursor instead of having two functions with different semantics.
  5. Compose example secrets annotated — cluster/probe compose files now say "EXAMPLE ONLY — rotate before use" on hardcoded secrets.
  6. huhForm.WithHeight out of View() — moved to handleResize. No longer mutates form state during render.
  7. maxTableRows recalcs on filter toggle — extracted recalcLayout(), called on / enter, Esc exit, and Enter exit. Was only recalculated on resize.

Test plan

  • go test -count=1 ./... — all pass
  • golangci-lint — 0 issues
## Summary Seven fixes from the review-findings backlog. 1. **UpdateSite handles token-read Scan error** — was silently ignoring all errors including real DB failures. Now surfaces non-ErrNoRows errors. 2. **RunCheck allowPrivate → real bool param** — was variadic (both callers always passed a value). Dead `maxRequestBody` duplicate removed from sqlstore.go. 3. **Footer help documents [Space]** — group collapse shortcut was undocumented. 4. **Unified cursor clamping** — `adjustCursor` now delegates to `clampCursor` instead of having two functions with different semantics. 5. **Compose example secrets annotated** — cluster/probe compose files now say "EXAMPLE ONLY — rotate before use" on hardcoded secrets. 6. **huhForm.WithHeight out of View()** — moved to `handleResize`. No longer mutates form state during render. 7. **maxTableRows recalcs on filter toggle** — extracted `recalcLayout()`, called on `/` enter, `Esc` exit, and `Enter` exit. Was only recalculated on resize. ## Test plan - [x] `go test -count=1 ./...` — all pass - [x] `golangci-lint` — 0 issues
lerko added 1 commit 2026-06-12 13:37:59 +00:00
fix: seven fixes — token scan, variadic cleanup, TUI layout, compose secrets
CI / test (pull_request) Successful in 1m54s
CI / lint (pull_request) Successful in 1m27s
CI / vulncheck (pull_request) Successful in 1m1s
6cf0efed9b
1. UpdateSite handles token-read Scan error instead of ignoring it.
   sql.ErrNoRows (nonexistent site) passes through; real DB errors
   surface.

2. RunCheck allowPrivate changed from variadic to real bool param.
   Dead maxRequestBody duplicate removed from sqlstore.go.

3. Footer help bar documents [Space] for group collapse.

4. adjustCursor unified with clampCursor — one clamping path
   instead of two with different semantics.

5. Compose cluster/probe example files annotate hardcoded secrets
   with "EXAMPLE ONLY — rotate before use".

6. huhForm.WithHeight moved from View() to handleResize — no longer
   mutates form state during render.

7. maxTableRows recalculated on filter enter/exit via recalcLayout()
   — was only recalculated on resize, causing off-by-one when the
   filter bar appeared/disappeared.
lerko merged commit 6cf0efed9b into main 2026-06-12 13:43:40 +00:00
lerko deleted branch fix/small-fixes-batch8 2026-06-12 13:43:40 +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#118