feat(tui): panel focus with click, scroll, and keyboard

Click any panel (Monitors, Logs, Detail) to focus it — accent border
follows focus. Mouse wheel scrolls the focused panel.

Keyboard: l toggles log panel focus. Arrow keys scroll logs when
focused, navigate monitors when not. Esc returns focus to monitors.

Log sidebar now supports scroll offset — tracks position across
renders without a viewport. Mouse wheel scrolls 3 lines, keyboard
scrolls 1.
This commit is contained in:
2026-06-20 19:44:35 -04:00
parent e5ac4a1fec
commit 7109b6fa1c
4 changed files with 110 additions and 18 deletions
+8
View File
@@ -96,6 +96,12 @@ const (
sectionUsers = 2
)
const (
panelMonitors = 0
panelLogs = 1
panelDetail = 2
)
type sessionState int
const (
@@ -124,6 +130,8 @@ type Model struct {
termWidth int
termHeight int
contentWidth int
focusedPanel int
logScrollOffset int
editID int
editToken string