Skip to content

Add keyboard shortcut hints to empty pane placeholder#123

Open
jsgrrchg wants to merge 3 commits into
mainfrom
empty-pane-shortcut-hints-119
Open

Add keyboard shortcut hints to empty pane placeholder#123
jsgrrchg wants to merge 3 commits into
mainfrom
empty-pane-shortcut-hints-119

Conversation

@jsgrrchg
Copy link
Copy Markdown
Owner

Summary

Extends the empty-pane placeholder to list each action alongside its keyboard shortcut, as requested in #119.

Before:

Open a file, start a chat or launch a terminal.

After:

Open a file ⌘O, browse commands ⌘K, start a chat ⌘⇧N, or launch a terminal ⌘R.

Details

  • New inline ShortcutHint component renders a <kbd>-styled badge using the existing design tokens.
  • Shortcuts are resolved at render time from the shortcut registry via formatShortcutAction(action, getDesktopPlatform()), so the hints stay accurate after rebinds and the platform modifier ( vs Ctrl) resolves correctly per OS.
  • Action → registry mapping:
    • Open a file → quick_switcher (⌘O / Ctrl+O)
    • browse commands → command_palette (⌘K / Ctrl+Shift+P)
    • start a chat → new_agent (⌘⇧N / Ctrl+Shift+N)
    • launch a terminal → new_terminal (⌘R / Ctrl+R) — matches the owner's clarification in the issue thread (Cmd+R/Ctrl+R).

Testing

  • vitest run for WorkspacePaneEmptyState.test.tsx — passing (asserts action phrases + resolved <kbd> labels)
  • tsc -b — clean
  • eslint on touched files — clean

Closes #119

The empty pane placeholder now lists each action alongside its keyboard
shortcut, resolved from the shortcut registry at render time so hints stay
accurate after rebinds and use the correct platform modifier (⌘ vs Ctrl).

Closes #119
@jsgrrchg jsgrrchg marked this pull request as draft May 21, 2026 16:44
@jsgrrchg
Copy link
Copy Markdown
Owner Author

Needs PR 118

@jsgrrchg jsgrrchg marked this pull request as ready for review May 21, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty pane: extend placeholder text with keyboard shortcut hints

1 participant