diff --git a/pkg/tui/dialog/session_browser.go b/pkg/tui/dialog/session_browser.go index 29cf95e27..eecd0d0f4 100644 --- a/pkg/tui/dialog/session_browser.go +++ b/pkg/tui/dialog/session_browser.go @@ -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")), }, openedAt: time.Now(), } @@ -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) diff --git a/pkg/tui/dialog/session_browser_test.go b/pkg/tui/dialog/session_browser_test.go index fd82a720c..b2fdaed24 100644 --- a/pkg/tui/dialog/session_browser_test.go +++ b/pkg/tui/dialog/session_browser_test.go @@ -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) {