Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/tui/dialog/session_browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func NewSessionBrowserDialog(sessions []session.Summary) Dialog {
Escape: key.NewBinding(key.WithKeys("esc")),
Star: key.NewBinding(key.WithKeys("ctrl+s")),
FilterStar: key.NewBinding(key.WithKeys("ctrl+f")),
CopyID: key.NewBinding(key.WithKeys("ctrl+k")),
CopyID: key.NewBinding(key.WithKeys("ctrl+y")),
},
Comment on lines 76 to 80
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CopyID was rebound to ctrl+y, but the on-screen help in View() still advertises ctrl+k for "copy id" (see the AddHelpKeys(...) call). This will mislead users and also contradicts the new keymap; update the help text to match the new binding.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right — the AddHelpKeys call on line 293 was still showing ctrl+k. I had the fix locally but it was locked to another GitButler branch and didn't make it into the commit. Now fixed in 53e8d65.

openedAt: time.Now(),
}
Expand Down Expand Up @@ -290,7 +290,7 @@ func (d *sessionBrowserDialog) View() string {
AddSeparator().
AddContent(idFooter).
AddSpace().
AddHelpKeys("↑/↓", "navigate", "ctrl+s", "star", "ctrl+f", filterDesc, "ctrl+k", "copy id", "enter", "load", "esc", "close").
AddHelpKeys("↑/↓", "navigate", "ctrl+s", "star", "ctrl+f", filterDesc, "ctrl+y", "copy id", "enter", "load", "esc", "close").
Build()

return styles.DialogStyle.Width(dialogWidth).Render(content)
Expand Down
6 changes: 6 additions & 0 deletions pkg/tui/dialog/session_browser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ func TestSessionBrowserNavigationWithCtrl(t *testing.T) {
updated, _ = d.Update(ctrlK)
d = updated.(*sessionBrowserDialog)
require.Equal(t, 0, d.selected, "selection should be 0 after ctrl+k")

// Verify ctrl+y is bound to CopyID and doesn't collide with Up.
// We only assert key matching here to avoid clipboard side-effects in tests.
ctrlY := tea.KeyPressMsg{Code: 'y', Mod: tea.ModCtrl}
require.True(t, key.Matches(ctrlY, d.keyMap.CopyID), "ctrl+y should match keyMap.CopyID")
require.False(t, key.Matches(ctrlY, d.keyMap.Up), "ctrl+y should not match keyMap.Up")
}

func TestSessionBrowserViewShowsSelection(t *testing.T) {
Expand Down