feat(tui): persist bottom panel preference across restarts

Save bottom_panel pref (logs/maint/none) to store on toggle.
Restore on startup via InitialModel, same pattern as detail_open.
This commit is contained in:
2026-07-01 21:02:45 -04:00
parent a32a443a4a
commit 14cec4283d
3 changed files with 28 additions and 1 deletions
+11 -1
View File
@@ -243,6 +243,16 @@ func InitialModel(ctx context.Context, isAdmin bool, s store.Store, eng *monitor
detailPref, _ := s.GetPreference(ctx, "detail_open")
bp := bottomLogs
if bpPref, _ := s.GetPreference(ctx, "bottom_panel"); bpPref != "" {
switch bpPref {
case "none":
bp = bottomNone
case "maint":
bp = bottomMaint
}
}
return Model{
ctx: ctx,
state: stateDashboard,
@@ -257,7 +267,7 @@ func InitialModel(ctx context.Context, isAdmin bool, s store.Store, eng *monitor
theme: theme,
themeIndex: themeIdx,
st: newStyles(theme),
bottomPanel: bottomLogs,
bottomPanel: bp,
detailOpen: detailPref == "true",
demoMode: os.Getenv("UPTOP_DEMO") == "1",
version: version,