feat(tui): move detail panel from bottom overlay to right side
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)
This commit is contained in:
+5
-14
@@ -155,16 +155,11 @@ func (m *Model) handleFormMsg(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
const detailInlineHeight = 12
|
||||
|
||||
func (m *Model) recalcLayout() {
|
||||
chrome := chromeBase
|
||||
if m.filterMode || m.filterText != "" {
|
||||
chrome++
|
||||
}
|
||||
if m.detailOpen {
|
||||
chrome += detailInlineHeight
|
||||
}
|
||||
m.maxTableRows = m.termHeight - chrome
|
||||
if m.maxTableRows < 1 {
|
||||
m.maxTableRows = 1
|
||||
@@ -259,7 +254,7 @@ func (m *Model) handleLogsFullscreen(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg.String() {
|
||||
case "esc", "q":
|
||||
m.state = stateDashboard
|
||||
m.focusedPanel = panelLogs
|
||||
m.focusedPanel = panelMonitors
|
||||
case "ctrl+c":
|
||||
return m, tea.Quit
|
||||
case "f":
|
||||
@@ -756,14 +751,10 @@ func (m *Model) handleDashboardKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
m.recalcLayout()
|
||||
}
|
||||
case "l":
|
||||
if m.focusedPanel == panelLogs {
|
||||
m.logsOpen = false
|
||||
m.focusedPanel = panelMonitors
|
||||
} else {
|
||||
m.logsOpen = true
|
||||
m.focusedPanel = panelLogs
|
||||
}
|
||||
m.recalcLayout()
|
||||
m.refreshLogContent()
|
||||
m.logViewport.GotoTop()
|
||||
m.state = stateLogs
|
||||
return m, nil
|
||||
case "up", "k":
|
||||
if m.focusedPanel == panelMaint {
|
||||
m.scrollMaintCursor(-1)
|
||||
|
||||
Reference in New Issue
Block a user