Skip to content

fix(select): wrap arrow-key navigation at list boundaries - #715

Open
ywenhao wants to merge 2 commits into
voidzero-dev:mainfrom
ywenhao:fix/task-selector-wraparound
Open

fix(select): wrap arrow-key navigation at list boundaries#715
ywenhao wants to merge 2 commits into
voidzero-dev:mainfrom
ywenhao:fix/task-selector-wraparound

Conversation

@ywenhao

@ywenhao ywenhao commented Sep 9, 2026

Copy link
Copy Markdown

Motivation

The task selector opened by vp run / vpr stops at the first and last entries. Users switching from nr expect Up on the first task to select the last, and Down on the last task to select the first. This also makes tasks near the end of a long list quicker to reach.

Refs voidzero-dev/vite-plus#2638. The implementation belongs to the shared vt_select component in this repository.

Changes

  • Wrap State::move_up and State::move_down over the current selectable items and keep the selected row visible.
  • Preserve no-op behavior for empty results and single-item lists. Group headings remain non-selectable, and wrapping is limited to the current filtered results.
  • Add regression coverage for both boundaries, viewport scrolling, filtered results, grouped tasks, empty results, and a single result.

Vite+ will need to consume an updated Vite Task revision after this is merged. This does not change the separate top-level command picker opened by bare vp.

ywenhao and others added 2 commits September 9, 2026 15:51
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
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.

2 participants