Skip to content

Commit c935536

Browse files
Iceberclaude
andcommitted
feat(ui): add keyboard shortcut hints to detail panel titles and footer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6fa56ba commit c935536

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

pkg/ui/views/container_detail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func (v *ContainerDetailView) updateFooter() {
365365
}
366366
switch v.activeTab {
367367
case DetailTabSummary:
368-
hints = append(hints, components.FooterHint{Key: "p/f", Action: "focus panes"}, components.FooterHint{Key: "e", Action: "toggle"})
368+
hints = append(hints, components.FooterHint{Key: "p/f/i", Action: "focus panes"}, components.FooterHint{Key: "e", Action: "toggle"})
369369
case DetailTabProcesses:
370370
hints = append(hints, components.FooterHint{Key: "s/g/t", Action: "process tabs"}, components.FooterHint{Key: "[/]", Action: "cycle"})
371371
case DetailTabFilesystem:

pkg/ui/views/detail_grid_view.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func NewDetailGridView(app *tview.Application) *DetailGridView {
8888
v.processTree = tview.NewTreeView()
8989
components.InitTreeView(v.processTree)
9090
v.processTree.SetBorder(true).SetBorderColor(components.ColorFgBorder)
91-
v.processTree.SetTitle(fmt.Sprintf(" %s ", components.Accent("Processes"))).SetTitleAlign(tview.AlignLeft)
91+
v.processTree.SetTitle(fmt.Sprintf(" %s%s ", components.Accent("Processes"), components.Dim("(p)"))).SetTitleAlign(tview.AlignLeft)
9292
v.processTree.SetBackgroundColor(components.ColorBg)
9393
v.processTree.SetRoot(components.NewTreeNode(components.Muted("No data")))
9494
v.processTree.SetChangedFunc(func(node *tview.TreeNode) {
@@ -99,7 +99,7 @@ func NewDetailGridView(app *tview.Application) *DetailGridView {
9999
v.fsPanel = tview.NewTreeView()
100100
components.InitTreeView(v.fsPanel)
101101
v.fsPanel.SetBorder(true).SetBorderColor(components.ColorFgBorder)
102-
v.fsPanel.SetTitle(fmt.Sprintf(" %s ", components.Accent("Filesystem"))).SetTitleAlign(tview.AlignLeft)
102+
v.fsPanel.SetTitle(fmt.Sprintf(" %s%s ", components.Accent("Filesystem"), components.Dim("(f)"))).SetTitleAlign(tview.AlignLeft)
103103
v.fsPanel.SetBackgroundColor(components.ColorBg)
104104
v.fsPanel.SetRoot(components.NewTreeNode(components.Muted("No data")))
105105
v.fsPanel.SetChangedFunc(func(node *tview.TreeNode) {
@@ -118,7 +118,7 @@ func NewDetailGridView(app *tview.Application) *DetailGridView {
118118
v.imagePanel = tview.NewTreeView()
119119
components.InitTreeView(v.imagePanel)
120120
v.imagePanel.SetBorder(true).SetBorderColor(components.ColorFgBorder)
121-
v.imagePanel.SetTitle(fmt.Sprintf(" %s ", components.Accent("Image"))).SetTitleAlign(tview.AlignLeft)
121+
v.imagePanel.SetTitle(fmt.Sprintf(" %s%s ", components.Accent("Image"), components.Dim("(i)"))).SetTitleAlign(tview.AlignLeft)
122122
v.imagePanel.SetBackgroundColor(components.ColorBg)
123123
v.imagePanel.SetRoot(components.NewTreeNode(components.Muted("No data")))
124124
v.imagePanel.SetChangedFunc(func(node *tview.TreeNode) {
@@ -240,8 +240,9 @@ func (v *DetailGridView) Refresh(ctx context.Context) {
240240
v.imagePanel.SetCurrentNode(currentImageNode)
241241
v.processTree.SetRoot(processRoot)
242242
v.processTree.SetCurrentNode(processRoot)
243-
v.processTree.SetTitle(fmt.Sprintf(" %s %s ",
243+
v.processTree.SetTitle(fmt.Sprintf(" %s%s %s ",
244244
components.Accent("Processes"),
245+
components.Dim("(p)"),
245246
components.Muted(fmt.Sprintf("%d total", count))))
246247
if v.focusPane == detailGridFocusFilesystem {
247248
v.updateDetailPanelForNode(detailGridFocusFilesystem, currentFSNode)

0 commit comments

Comments
 (0)