Skip to content

feat(history): a keyboard history picker over the editor - #601

Merged
EVWorth merged 1 commit into
mainfrom
feat/history-quick-open
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/history-quick-open

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Closes #591.

Stacked on #600 (→ #599 → #598 → #597 → #593 → #584). The commit to read here is the last one.

The moment you want a previous statement is while typing, and getting it meant leaving the keyboard for the sidebar. Ctrl+Shift+H opens a searchable picker over the editor; ↑↓ move, Enter inserts into the active tab, Escape closes. DataGrip binds a popup in the editor for exactly this.

Three choices worth naming

  • Shifted, not plain Ctrl+H. Ctrl+H is find-and-replace in Monaco; taking that from someone mid-edit is worse than the shortcut being one key longer.
  • It reads the history directly, not through historyStore. The panel's filters and sort belong to the panel — someone reaching for a statement mid-thought wants the whole history, not whatever slice the sidebar is showing. Tested.
  • Enter on an empty list inserts nothing. Inserting the search text because it was the only thing to hand would be a surprising thing to do with it.

One real bug the tests caught

scrollIntoView is now called through an optional guard. It isn't universal — jsdom has no layout and doesn't implement it — and the picker threw when arrowing past the fold before the guard went in. Losing the scroll is a far better outcome than the component crashing.

Also added to the Ctrl+? shortcuts dialog, so it's discoverable rather than folklore.

Verification

13 new tests. Full suite 1907 passing, 0 lint errors.

The moment you want a previous statement is while typing, and getting it
meant leaving the keyboard for the sidebar (#591). Ctrl+Shift+H opens a
searchable picker over the editor; ↑↓ move, Enter inserts into the active
tab, Escape closes.

Shifted rather than plain Ctrl+H because Ctrl+H is find-and-replace in
Monaco, and taking that from someone mid-edit is worse than the shortcut
being one key longer.

The picker reads the history directly rather than through historyStore.
The panel's filters and sort belong to the panel: someone reaching for a
statement mid-thought wants the whole history, not whatever slice the
sidebar happens to be showing.

Enter on an empty list inserts nothing. Inserting the search text because
it was the only thing to hand would be a surprising thing to do with it.

scrollIntoView is called through an optional guard. It is not universal —
jsdom has no layout and does not implement it — and losing the scroll is a
far better outcome than the picker throwing, which is what it did before
the guard.

Closes #591

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth force-pushed the feat/history-quick-open branch from f79d0a3 to e234d69 Compare September 10, 2026 00:10
@EVWorth
EVWorth merged commit 3cd1205 into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the feat/history-quick-open branch September 10, 2026 01:03
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.

[P2/ux] No way to reach history from the keyboard while editing

1 participant