Skip to content

Commit ad07bb2

Browse files
branchseerclaude
andcommitted
ux: hint Escape key when no tasks match in interactive selector
When a user runs a non-existent task (e.g. `vp run zzzzz`), the interactive selector shows "No matching tasks." which can make users think the command is hanging. Adding "Press Escape to clear search." gives an actionable next step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e30409 commit ad07bb2

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)