refactor(tui): move maintenance from sidebar to bottom strip #167

Merged
lerko merged 3 commits from refactor/maint-bottom-strip into main 2026-07-01 03:20:27 +00:00
Owner

Summary

  • Replace cramped 22-char maint sidebar with full-width bottom strip
  • Bottom panel is modal: l for logs, m for maint, same key toggles closed
  • Maint strip uses lipgloss/table with zebra striping and selection highlight matching monitors table
  • Click anywhere in a row to select (monitors and maint strip) — no longer limited to name text
  • New bottomPanel enum replaces logsOpen/maintOpen booleans
  • m key no longer gated behind wideBreakpoint

Files changed

  • internal/tui/tui.gobottomPanel enum, remove logsOpen/maintOpen/maintOffset
  • internal/tui/update.go — key handlers, panel-level click with Y offset row detection
  • internal/tui/view_dashboard.go — remove maint sidebar from layout, bottom strip switches on mode
  • internal/tui/view_maint_sidebar.goviewMaintStrip() with table layout, monitorNameByID() helper

Test plan

  • Press m — maint strip appears at bottom, full width
  • Press m again — closes
  • Press l — switches to logs
  • Press m while logs open — switches to maint
  • Navigate maint items with j/k, Enter for detail overlay
  • Click anywhere in a monitor row — selects that row
  • Click anywhere in a maint row — selects that row
  • Detail sidebar still works at 60/40 split
  • n from maint strip opens creation form
## Summary - Replace cramped 22-char maint sidebar with full-width bottom strip - Bottom panel is modal: `l` for logs, `m` for maint, same key toggles closed - Maint strip uses `lipgloss/table` with zebra striping and selection highlight matching monitors table - Click anywhere in a row to select (monitors and maint strip) — no longer limited to name text - New `bottomPanel` enum replaces `logsOpen`/`maintOpen` booleans - `m` key no longer gated behind `wideBreakpoint` ## Files changed - `internal/tui/tui.go` — `bottomPanel` enum, remove `logsOpen`/`maintOpen`/`maintOffset` - `internal/tui/update.go` — key handlers, panel-level click with Y offset row detection - `internal/tui/view_dashboard.go` — remove maint sidebar from layout, bottom strip switches on mode - `internal/tui/view_maint_sidebar.go` — `viewMaintStrip()` with table layout, `monitorNameByID()` helper ## Test plan - [x] Press `m` — maint strip appears at bottom, full width - [x] Press `m` again — closes - [x] Press `l` — switches to logs - [x] Press `m` while logs open — switches to maint - [x] Navigate maint items with j/k, Enter for detail overlay - [x] Click anywhere in a monitor row — selects that row - [x] Click anywhere in a maint row — selects that row - [x] Detail sidebar still works at 60/40 split - [x] `n` from maint strip opens creation form
lerko added 3 commits 2026-07-01 03:11:55 +00:00
Replace the cramped 22-char maint sidebar with a full-width bottom
strip in the same position as logs. Bottom panel is modal: l for logs,
m for maint, same key again to close. Maint strip shows one row per
window with icon, title, affected monitors, and status/time remaining.

Removes maintSidebarW constant and maintOffset field. Introduces
bottomPanel enum (bottomNone/bottomLogs/bottomMaint) replacing
logsOpen and maintOpen booleans. m key no longer gated behind
wideBreakpoint.
Use rune-based padding instead of fmt %-*s which miscounts ANSI escape
sequences. Remove outer lipgloss width wrapper that added extra lines.
feat(tui): click anywhere in row to select monitor or maint item
CI / test (pull_request) Successful in 1m56s
CI / lint (pull_request) Successful in 1m22s
CI / vulncheck (pull_request) Successful in 56s
f0d97f5562
Use panel zone Pos() to compute clicked row from Y offset instead of
per-cell zone matching. Monitors and maint strip both support full-row
click selection.
lerko merged commit f0d97f5562 into main 2026-07-01 03:20:27 +00:00
lerko deleted branch refactor/maint-bottom-strip 2026-07-01 03:20:27 +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#167