feat(tui): rebuild TUI around hardware diagnostics (Health Check + two-column layout)
- Replace 12-item flat menu with 4-item main menu: Health Check, Export support bundle, Settings, Exit - Add Health Check screen (Lenovo-style): per-component checkboxes (GPU/MEM/DISK/CPU), Quick/Standard/Express modes, Run All, letter hotkeys G/M/S/C/R/A/1/2/3 - Add two-column main screen: left = menu, right = hardware panel with colored PASS/FAIL/CANCEL/N/A status per component; Tab/→ switches focus, Enter opens component detail - Add app.LoadHardwarePanel() + ComponentDetailResult() reading audit JSON and SAT summary.txt files - Move Network/Services/audit actions into Settings submenu - Export: support bundle only (remove separate audit JSON export) - Delete screen_acceptance.go; add screen_health_check.go, screen_settings.go, app/panel.go - Add BMC + CPU stress-ng tests to backlog - Update bible submodule - Rewrite tui_test.go for new screen/action structure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,17 +4,11 @@ import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
func (m model) handleExportTargetsMenu() (tea.Model, tea.Cmd) {
|
||||
if len(m.targets) == 0 {
|
||||
title := "Export audit"
|
||||
if m.pendingAction == actionExportBundle {
|
||||
title = "Export support bundle"
|
||||
}
|
||||
return m, resultCmd(title, "No removable filesystems found", nil, screenMain)
|
||||
return m, resultCmd("Export support bundle", "No removable filesystems found", nil, screenMain)
|
||||
}
|
||||
target := m.targets[m.cursor]
|
||||
m.selectedTarget = &target
|
||||
if m.pendingAction == actionNone {
|
||||
m.pendingAction = actionExportAudit
|
||||
}
|
||||
m.pendingAction = actionExportBundle
|
||||
m.screen = screenConfirm
|
||||
return m, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user