feat(tui): persist detail panel state as user preference

Detail open/closed state saved via SetPreference on toggle and
restored on session start. Same pattern as theme persistence —
survives restarts and works per-user over SSH.
This commit is contained in:
2026-06-20 19:50:13 -04:00
parent 7109b6fa1c
commit 81f8c71b6f
2 changed files with 22 additions and 1 deletions
+3
View File
@@ -219,6 +219,8 @@ func InitialModel(isAdmin bool, s store.Store, eng *monitor.Engine, version stri
}
}
detailPref, _ := s.GetPreference(context.Background(), "detail_open")
return Model{
state: stateDashboard,
logViewport: vpLogs,
@@ -232,6 +234,7 @@ func InitialModel(isAdmin bool, s store.Store, eng *monitor.Engine, version stri
theme: theme,
themeIndex: themeIdx,
st: newStyles(theme),
detailOpen: detailPref == "true",
demoMode: os.Getenv("UPTOP_DEMO") == "1",
version: version,
sparkTooltipIdx: -1,