Skip to content

fix: empty the command palette however it was closed - #187

Merged
moul merged 1 commit into
mainfrom
fix/palette-clears-on-close
Aug 2, 2026
Merged

fix: empty the command palette however it was closed#187
moul merged 1 commit into
mainfrom
fix/palette-clears-on-close

Conversation

@moul

@moul moul commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Running a command already cleared the query. Escape and clicking the backdrop did not, so ⌘K could reopen onto a stale query and a stale list of results for something you'd already finished doing.

Two ways out of the same dialog leaving it in two different states reads as a glitch, not a feature.

Found by accident while writing a production verification script: my own typing appended to the previous query and matched nothing — exactly what it would do to anyone else who reopened the palette expecting a fresh box.

e2e covers both exits (Escape and backdrop click) and was checked to fail without the fix:

Expected: ""
Received: "zoom"

420 unit, 79 e2e, all passing.

Running a command already cleared the query. Escape and clicking the
backdrop did not, so Cmd-K could reopen onto a stale query and a stale
list of results for something you had already finished doing.

Two ways out of the same dialog leaving it in two different states reads
as a glitch rather than as a feature. Found while writing a verification
script: my own typing appended to the previous query and matched nothing,
which is exactly what it would do to anyone else.

e2e covers both exits and was checked to fail without the fix.
@moul
moul merged commit d99412f into main Aug 2, 2026
9 checks passed
@moul
moul deleted the fix/palette-clears-on-close branch August 2, 2026 23: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.

1 participant