Skip to content

Commit 398a147

Browse files
branchseerclaude
andauthored
ux: hint Escape key when no tasks match in interactive selector (#235)
## Summary When a user runs a non-existent task (e.g. `vp run zzzzz`), the interactive selector pre-fills the search with the typo and shows an empty results list. Without additional context, users may think the command is hanging. This adds an actionable hint to the empty state message: ``` Select a task (↑/↓, Enter to run, type to search): zzzzz ┌── added ▼ No matching tasks. Press Escape to clear search. ``` This reminds users they are in a search state and gives them a clear next step to recover, rather than leaving them stuck on a seemingly unresponsive screen. ## Test plan - [x] E2E snapshot test updated and passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e30409 commit 398a147

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/vite_select/src/interactive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ pub fn render_items(writer: &mut impl Write, params: &RenderParams<'_>) -> anyho
434434

435435
// Empty state
436436
if !has_items {
437-
write!(writer, " No matching tasks.{line_ending}")?;
437+
write!(writer, " No matching tasks. Press Escape to clear search.{line_ending}")?;
438438
lines += 1;
439439
}
440440

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Select a task (↑/↓, Enter to run, type to search):
2525
@ expect-milestone: task-select:zzzzz:0
2626
Select a task (↑/↓, Enter to run, type to search): zzzzz
2727

28-
No matching tasks.
28+
No matching tasks. Press Escape to clear search.
2929
@ write-key: enter
3030
@ write-key: escape
3131
@ expect-milestone: task-select::0

0 commit comments

Comments
 (0)