feat(web): add Tab completion to path browser#4257
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR adds a new user-facing feature (Tab completion for path navigation) which introduces new interactive behavior. While the implementation is self-contained with good test coverage, new features changing user interaction patterns warrant human review. You can customize Macroscope's approvability policy. Learn more. |
493ac39 to
3accacf
Compare
9db2544 to
81d4357
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 81d4357. Configure here.
3add2a7 to
62f304d
Compare
62f304d to
ee5da25
Compare
# Conflicts: # apps/web/src/components/CommandPalette.logic.test.ts # apps/web/src/components/CommandPalette.tsx
Adds pingdotgg#4590 to the thread-picker group rather than the main manifest: it edits the same CommandPalette trio, and specifically the browse/submit region that pingdotgg#4257 and pingdotgg#4426 also touch, so the combination resolves once against upstream main instead of being re-derived every refresh. Group rebuilt (reproduce) to b15922f and repinned in stack.toml; main stack refreshed. The group rebuild reproduced tree bad6ae3 across two independent runs, and the assembled tree keeps every pingdotgg#4590 gating site plus the composer path-search error. The one non-mechanical resolution: the group had already extracted the palette empty-state ternary into `contextualEmptyStateMessage` + `resolveCommandPaletteEmptyStateMessage`, so pingdotgg#4590's inline branch was rewritten onto that helper instead of taking either side verbatim.

Summary
Why
The add-project and clone-destination path inputs already display matching directories, but Tab moved focus out of the input instead of accepting a suggestion. This makes the picker behave like a directory autocomplete and addresses #2160.
Validation
pnpm exec vp test run apps/web/src/components/CommandPalette.logic.test.tspnpm --filter @t3tools/web typecheckvp fmt --checkandvp linton the three changed filesCloses #2160
Exact-head evidence
Revalidated at 83ce1aa on current main (9a0a071): focused tests, vp check, and vp run typecheck passed. The capture uses only disposable local projects.
Note
Low Risk
Localized command-palette keyboard and path-browse UX; no auth, data, or API surface changes.
Overview
Tab in the command palette path browser now accepts directory suggestions instead of moving focus out of the input (closes #2160).
A new
resolveBrowseTabCompletionhelper picks what Tab should do: go to the parent when..is highlighted, enter the highlighted folder, prefer a case-sensitive exact name match, or—only when the user has typed a leaf filter—fall back to the first filtered directory. Without a leaf filter, Tab does not auto-enter the first child.CommandPaletteintercepts plain Tab in browse mode (preventDefault), calls that helper, and runsbrowseUp/browseTo. Tab is ignored while browse results are loading or a relative path needs an active project.Reviewed by Cursor Bugbot for commit ee5da25. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Tab key completion to path browser in Command Palette
resolveBrowseTabCompletionin CommandPalette.logic.ts to determine the Tab action while browsing: goes up when the parent-directory item is highlighted, enters the highlighted directory, falls back to an exact match, or enters the first filtered entry when a leaf filter is present.Macroscope summarized ee5da25.