Skip to content

Commit de5472b

Browse files
gitcoder89431claude
andcommitted
fix: show screen-specific key bindings in footer
Footer was always rendering global shortcuts (ShortHelp) instead of the active screen's bindings. Now screens like Connect that define KeyBindings() (j/k, r, p, a, d) show those in the footer instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ca05a64 commit de5472b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/app/view.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ func (m Model) View() tea.View {
2424
active := m.screens[m.activeScreen]
2525

2626
head := header.View(header.Model{AppName: config.AppName, DeviceID: m.deviceID, DeviceName: m.deviceName, SyncStatus: m.syncStatus}, dims.Header.Width, dims.Header.Height, m.theme)
27-
foot := footer.View(m.keys.ShortHelp(), dims.Footer.Width, dims.Footer.Height, m.theme)
27+
footBindings := m.keys.ShortHelp()
28+
if screenBindings := active.KeyBindings(); len(screenBindings) > 0 {
29+
footBindings = screenBindings
30+
}
31+
foot := footer.View(footBindings, dims.Footer.Width, dims.Footer.Height, m.theme)
2832
mainFrameWidth, mainFrameHeight := m.theme.Main.GetFrameSize()
2933
mainWidth := max(0, dims.Main.Width-mainFrameWidth)
3034
mainHeight := max(0, dims.Main.Height-mainFrameHeight)

0 commit comments

Comments
 (0)