@@ -77,6 +77,12 @@ func (m model) updateDashboardNormal(msg tea.Msg) (tea.Model, tea.Cmd) {
7777 return m , textinput .Blink
7878 case "i" :
7979 return m .startImportFlow ()
80+ case "h" :
81+ if m .healthChecking {
82+ return m , nil
83+ }
84+ m .healthChecking = true
85+ return m , healthCheckAllCmd (m .store .Hosts , m .encKey )
8086 case "j" , "down" :
8187 if m .hostCursor < len (m .filtered )- 1 {
8288 m .hostCursor ++
@@ -356,6 +362,9 @@ func (m model) viewDashboard() string {
356362 }
357363
358364 view := title + "\n " + searchLine + "\n \n " + panels
365+ if m .healthChecking {
366+ view += "\n " + hintStyle .Render (" Running health check across all saved hosts..." )
367+ }
359368
360369 if m .connErr != "" {
361370 errBanner := errorStyle .Render (" ✗ " + m .connErr )
@@ -377,7 +386,7 @@ func (m model) renderHostList(maxW, maxH int) string {
377386 }
378387
379388 // Column widths — adapt to available space.
380- available := maxW - 3
389+ available := maxW - 6
381390 if available < 10 {
382391 available = 10
383392 }
@@ -402,6 +411,7 @@ func (m model) renderHostList(maxW, maxH int) string {
402411
403412 for i := offset ; i < end ; i ++ {
404413 h := m .filtered [i ]
414+ indicator := m .healthIndicator (m .hostHealth (h .ID ))
405415
406416 cursor := " "
407417 style := lipgloss .NewStyle ().Foreground (text )
@@ -420,7 +430,7 @@ func (m model) renderHostList(maxW, maxH int) string {
420430 }
421431 hostColStr := lipgloss .NewStyle ().Width (colHost ).MaxWidth (colHost ).Render (hostStr )
422432
423- line := fmt .Sprintf ("%s%s %s" , cursor , aliasStr , hostColStr )
433+ line := fmt .Sprintf ("%s%s %s %s " , cursor , indicator , aliasStr , hostColStr )
424434 b .WriteString (style .Render (line ))
425435 if i < end - 1 {
426436 b .WriteByte ('\n' )
@@ -469,6 +479,7 @@ func (m model) renderDetails() string {
469479 }
470480
471481 lines := []string {
482+ render ("Health" , healthLabel (m .hostHealth (h .ID ))),
472483 render ("Alias" , h .Alias ),
473484 render ("Host" , h .Hostname ),
474485 render ("Users" , strings .Join (users , ", " )),
@@ -502,9 +513,9 @@ func (m model) renderCommands(maxW int) string {
502513 return " " + pad (cmd ("/" , "Search" ), col ) + cmd ("l" , "Lock Session" ) + "\n " +
503514 " " + pad (cmd ("a" , "Add" ), col ) + cmd ("c" , "Change Master Key" ) + "\n " +
504515 " " + pad (cmd ("e" , "Edit" ), col ) + cmd ("y" , "Duplicate" ) + "\n " +
505- " " + pad (cmd ("d" , "Delete" ), col ) + cmd ("⏎ " , "Connect " ) + "\n " +
516+ " " + pad (cmd ("d" , "Delete" ), col ) + cmd ("h " , "Health Check " ) + "\n " +
506517 " " + pad (cmd ("x" , "Export Backup" ), col ) + cmd ("i" , "Import Backup" ) + "\n " +
507- " " + cmd ("q" , "Quit" )
518+ " " + pad ( cmd ( "⏎" , "Connect" ), col ) + cmd ("q" , "Quit" )
508519}
509520
510521func (m model ) updateUserSelect (msg tea.Msg ) (tea.Model , tea.Cmd ) {
0 commit comments