feat(tui): master-detail layout with sidebar SLA/history #163

Merged
lerko merged 5 commits from feat/master-detail-layout into main 2026-06-30 13:44:54 +00:00
Owner

Summary

  • Restructure dashboard from [Monitors 70% | Logs 30%] to [Monitors 45% | Detail 55%] master-detail layout
  • Detail panel sits beside the monitor list, updates on cursor movement — dashboard never leaves the screen
  • SLA and History render as switchable modes within the detail sidebar (s/h keys) instead of full-page takeovers
  • Enter on a site opens the detail sidebar; Enter on a group expands/collapses children
  • Logs move to a toggleable bottom strip via l key
  • Delete full-page detail, SLA, and history views plus all supporting dead code (-709 net lines)

Design basis

Research of lazygit, lazydocker, Uptime Kuma, btop, and monitoring dashboard UX principles (Shneiderman's information-seeking mantra, 5-second rule). Findings in tui-single-pane-polish.local.md.

Test plan

  • go build ./cmd/uptop compiles
  • golangci-lint run ./... — 0 issues
  • go test ./internal/tui/... — passes
  • Visual review: i toggles detail, j/k navigates + updates detail, s/h switch to SLA/History modes, Esc returns to default, l toggles logs strip, Enter opens detail on sites / expands groups, settings overlay still works
  • Test at terminal widths 80, 120, 160
## Summary - Restructure dashboard from `[Monitors 70% | Logs 30%]` to `[Monitors 45% | Detail 55%]` master-detail layout - Detail panel sits beside the monitor list, updates on cursor movement — dashboard never leaves the screen - SLA and History render as switchable modes within the detail sidebar (`s`/`h` keys) instead of full-page takeovers - Enter on a site opens the detail sidebar; Enter on a group expands/collapses children - Logs move to a toggleable bottom strip via `l` key - Delete full-page detail, SLA, and history views plus all supporting dead code (-709 net lines) ## Design basis Research of lazygit, lazydocker, Uptime Kuma, btop, and monitoring dashboard UX principles (Shneiderman's information-seeking mantra, 5-second rule). Findings in `tui-single-pane-polish.local.md`. ## Test plan - [x] `go build ./cmd/uptop` compiles - [x] `golangci-lint run ./...` — 0 issues - [x] `go test ./internal/tui/...` — passes - [x] Visual review: `i` toggles detail, `j/k` navigates + updates detail, `s`/`h` switch to SLA/History modes, `Esc` returns to default, `l` toggles logs strip, `Enter` opens detail on sites / expands groups, settings overlay still works - [x] Test at terminal widths 80, 120, 160
lerko added 5 commits 2026-06-30 13:34:14 +00:00
Restructure dashboard from [Monitors 70% | Logs 30%] to
[Monitors 45% | Detail 55%] master-detail layout. Detail panel
now sits beside the monitor list instead of below it, keeping
dashboard context visible during inspection.

- Detail panel renders in horizontal split (right of monitors)
- Logs sidebar removed; `l` key opens fullscreen logs directly
- recalcLayout no longer subtracts detail height from table rows
- Remove unused renderCompactLogLine/viewLogsSidebar (Phase 4 recreates)
Replace the old two-column/single-column inline detail with a
vertically stacked layout optimized for the right-side panel.

Content stack: status line, type details, uptime, error, latency
chart (3-row), 30d timeline, sparkline, min/avg/max stats, and
up to 5 state changes — all flowing top-to-bottom within the
~55% width detail panel.
SLA and History views now render inside the detail sidebar panel
instead of taking over the full screen. Press s/h to switch modes,
Esc to return to default detail view. Cursor movement resets to
default mode.

- Add detailMode state (detailDefault/detailSLA/detailHistory)
- SLA sidebar: period selector, uptime bars, daily breakdown
- History sidebar: sparkline density, transition list, stats
- Panel title shows "SLA · name" or "History · name" in sub-modes
- Period keys [1]-[4] work in SLA mode from dashboard state
Enter on a site now opens the detail sidebar instead of a
full-page takeover. Enter on a group expands/collapses children
(same as space). Logs panel moves to a toggleable bottom strip
via the l key with j/k scrolling when focused.
refactor(tui): remove full-page detail, SLA, and history views
CI / test (pull_request) Successful in 1m49s
CI / lint (pull_request) Successful in 1m16s
CI / vulncheck (pull_request) Successful in 56s
dc79e2baaa
All monitor detail content now lives in the sidebar panel.
Delete the full-page viewDetailPanel, viewSLAPanel, viewHistoryPanel,
handleDetailKey, handleSLAKey, handleHistoryKey, openSLAView, and
related dead code (histogram, sparkline tooltip, detailViewport).

Remove stateDetail, stateSLA, stateHistory session states.
Update tests to use detailOpen/detailMode instead of removed states.
lerko merged commit dc79e2baaa into main 2026-06-30 13:44:54 +00:00
lerko deleted branch feat/master-detail-layout 2026-06-30 13:44:54 +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#163