Skip to content

fix(ui): support keyboard selection in graph path pickers - #639

Merged
webfansplz merged 4 commits into
vitejs:mainfrom
SaKaNa-Y:fix/graph-path-keyboard
Nov 18, 2026
Merged

webfansplz merged 4 commits into
vitejs:mainfrom
SaKaNa-Y:fix/graph-path-keyboard

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Vite module graph and the Rolldown module and chunk graphs share a path picker. Keyboard users can search for a node but cannot select a visible match.

- Candidate visible → click to select
+ Focus search → highlight with arrow keys → Enter to select

Escape closes the list. Changing the search returns the virtual list to its first match. After selection, focus moves to the clear button so Tab can continue to the next field.

Evidence

  • Before: In the Rolldown module graph, with main.js visible in the candidate list, Arrow Down followed by Enter left the starting node empty. Clicking the same candidate selected it.
  • After: In Chrome, a 100-node fixture using the shared picker selected node-30 as Start and node-70 as End with the keyboard. Clearing Start reset both endpoints and returned focus to the Start field. After scrolling to the last option and searching again, clicking the first match selected node-99. The build covered all three graph pages.

Lint, typecheck and build passed. The full test suite passed 412 tests with two skipped.

Merge Danger

Door: Two-way

Reverting restores the previous path picker across all three graphs.

Blast Radius: Selection

The Vite module graph and the Rolldown module and chunk graphs share the picker. A focus or index error could select the wrong endpoint with the keyboard or pointer.

@SaKaNa-Y
SaKaNa-Y marked this pull request as draft November 13, 2026 14:33
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@639

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@639

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@639

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@639

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@639

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@639

commit: 2519dcd

Floating Vue can keep a menu open when the pointer moves toward it. Let the picker control the popup so Escape also dismisses it in that case.
Keep the selected endpoint on one line and let module candidates use their existing two-line layout. This keeps filenames visible when several paths share a long prefix.
@SaKaNa-Y
SaKaNa-Y marked this pull request as ready for review November 17, 2026 12:16
@SaKaNa-Y

Copy link
Copy Markdown
Collaborator Author

Fixed a bug that prevented users from selecting search results with the keyboard in the graph path picker.

@webfansplz
webfansplz merged commit 247ba8c into vitejs:main Nov 18, 2026
7 checks passed
@SaKaNa-Y
SaKaNa-Y deleted the fix/graph-path-keyboard branch November 18, 2026 11:08
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