Support wrap-around arrow-key navigation in the vp run / vpr task selector
まだ誰も着手していません。
評価
調査の方向性
crates/vt_select/src/interactive.rs の State::move_up と State::move_down から始め、sample package.json を使って、提供されている vpr または vp run の再現手順を実行します。完了条件は、Up と Down がフィルタリングされた選択可能なタスク内でラップアラウンドし、見出しをスキップし、新しい選択項目を表示範囲にスクロールし、空のリストや結果が 1 件だけのリストでも安全に動作することです。
索引モデルが issue の本文から書いたものです。
説明
Description
Please support wrap-around arrow-key navigation in the interactive task selector opened by vp run / vpr without a task name.
Currently, pressing Up on the first task leaves the selection on the first task, and pressing Down on the last task leaves it on the last task. nr from @antfu/ni already allows moving directly between the first and last entries this way. Matching that behavior would make it quicker to reach tasks near the end of a long list and preserve familiar keyboard navigation when switching from nr to vpr.
I intend to submit a small implementation PR to the shared vt_select component in voidzero-dev/vite-task and link it here.
Suggested solution
- Up on the first selectable task selects the last selectable task.
- Down on the last selectable task selects the first selectable task.
- Wrap within the current search results, not the unfiltered list.
- Skip non-selectable workspace/group headings and scroll the newly selected task into view.
- Empty results and a single result remain safe no-ops.
Reproduction
Create a directory containing only this package.json (no dependency installation is needed):
{
"name": "task-picker-wrap-repro",
"private": true,
"scripts": {
"alpha": "echo alpha",
"beta": "echo beta",
"gamma": "echo gamma"
}
}
- Run
vpr(orvp run) in an interactive terminal. - With
alphahighlighted, press Up. It remains onalpha; the requested behavior is to selectgamma. - Press Down until
gammais highlighted, then press Down once more. It remains ongamma; the requested behavior is to selectalpha. - Press Ctrl+C to exit without running a task.
Alternative
Repeated arrow presses or typing a search query work, but require more input than wrapping directly at the list boundary.
Additional context
Reproduced with Vite+ 0.3.1 on Linux x86_64 in a real pseudo-terminal. The comparison command is @antfu/ni 30.5.0.
The boundary checks are in State::move_up and State::move_down in vt_select. This request concerns the vp run task selector, not Vite, Vitest, tsdown, Rolldown, or Oxc.
Validations
- Read the contributing guidelines.
- Searched existing issues and PRs in both
vite-plusandvite-taskand did not find the same request. - This concerns the Vite+ task-selection workflow.
- 主要言語
- Rust
- スター
- 5.8k
- フォーク
- 263
- 平均マージ
- 22時間 44分
- マージ済み PR(30日)
- 134
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/vite-plus のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
voidzero-dev/vite-plus#2097 · コメント 10 件 · リアクション 2 件 ·
-
bug enhancement
voidzero-dev/vite-plus#2746 · コメント 3 件 · リアクション 1 件 · 担当者 1 名 ·
-
pending triage
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
voidzero-dev/vite-plus#2735 ·
-
voidzero-dev/vite-plus#2728 · コメント 1 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
voidzero-dev/vite-plus#2703 · 担当者 1 名 ·
voidzero-dev/vite-plus の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100