Skip to content

fix(quick-open): reset scroll and add padding so top result isn't clipped - #808

Merged
AmethystLiang merged 1 commit into
mainfrom
file-search-command-p-dialog-sometimes-the-top-r
Apr 19, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
file-search-command-p-dialog-sometimes-the-top-r

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Cmd+P dialog's first result sometimes appeared flush against (or behind) the input's bottom border.
  • Root cause: cmdk moves selection to the first result on query change but never resets the list's scrollTop. Additionally the list had no padding buffer between the input border and the first item.
  • Fix: reset scrollTop on query/visible change (mirrors WorktreeJumpPalette pattern) and add p-2 padding so the selection highlight never touches the border.

Test plan

  • Open Cmd+P, arrow down through results, then clear search — top result no longer clipped
  • Type new query after scrolling — list resets to top and first result is fully visible
  • No regression in other palettes (WorktreeJumpPalette, RepoCombobox, BrowserAddressBar) — change is local to QuickOpen

…pped

The Cmd+P dialog's first result sometimes appeared flush against (or
behind) the input's bottom border. cmdk moves selection to the first
result on query change but never resets the list's scrollTop, and the
list had no padding buffer between the input border and the first item.

- reset scrollTop on query/visible change (mirrors WorktreeJumpPalette)
- add p-2 padding so the selection highlight never touches the border
@AmethystLiang
AmethystLiang merged commit 756a7fa into main Apr 19, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…pped (stablyai#808)

The Cmd+P dialog's first result sometimes appeared flush against (or
behind) the input's bottom border. cmdk moves selection to the first
result on query change but never resets the list's scrollTop, and the
list had no padding buffer between the input border and the first item.

- reset scrollTop on query/visible change (mirrors WorktreeJumpPalette)
- add p-2 padding so the selection highlight never touches the border
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.

1 participant