Repository navigation
fix: keep the selected file suggestion visible - #1448
RealBhupesh wants to merge 2 commits into
Conversation
File autocomplete always rendered the first five matches, so a selection past that page lost its highlight and Tab could insert an unseen path. Fixes Nano-Collective#1405
No changeset foundThis PR does not add a changeset, so it will not appear in the changelog or trigger a release. If the change is user-facing, add one: pnpm changesetPick a bump (patch / minor / major) and write the changelog entry in our usual voice ("Added X... Thanks to @you. Closes #123."), then commit the generated If this PR is docs-only or a chore that needs no release note, you can ignore this — or run |
nc-review: comments — 1 important, 3 nits@RealBhupesh — a few things worth a look, none blocking. The fix correctly resolves the highlight-vanishing bug by replacing the hard-coded 🟠 important · This is a user-visible bug fix in the TUI: previously, pressing Down past the fifth file match and then Tab would insert a path that was never rendered, which is observable and surprising. A ⚪ nit · The slash-command completion list at the same site shows a ⚪ nit · The new ⚪ nit · The new spec covers the extracted helper correctly and would fail if the centering regression returned. The follow-on concern is that 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
Biome rejected the object-literal spacing in the new window helper.
|
Thanks for this, @RealBhupesh, and sorry it sat so long. #1405 was already fixed on |
|
Thanks @will-lamerton, understood. Glad #1405 got fixed via #1426. I'll ask to be assigned first before picking up anything new. |
Fixes #1405.
File autocomplete always rendered
fileCompletions.slice(0, 5)and compared the highlight to that slice index. Moving past the fifth suggestion hid the selection, so Tab could insert a path that was not on screen. The list now windows around the selected index, the same way command completions already do.Test plan
completion-window.spec.tsMade with Cursor