Add Tab completion to Add Project path picker#2552
Add Tab completion to Add Project path picker#2552aShanki wants to merge 1 commit intopingdotgg:mainfrom
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 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)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 31ad61b. Configure here.
| } | ||
|
|
||
| const firstEntry = input.filteredEntries[0]; | ||
| return firstEntry ? { _tag: "enterDirectory", name: firstEntry.name } : null; |
There was a problem hiding this comment.
Ambiguous Tab picks first directory
Medium Severity
resolveBrowseTabCompletion enters the first filtered directory when multiple matches have no longer common prefix and nothing is highlighted. In browse mode no item is auto-highlighted, so an ambiguous Tab can replace the user's path with an arbitrary directory instead of leaving it unchanged.
Reviewed by Cursor Bugbot for commit 31ad61b. Configure here.
|
|
||
| function completeBrowsePathFromTab(): boolean { | ||
| if (!isBrowsing || relativePathNeedsActiveProject || isBrowsePending) { | ||
| return false; |
There was a problem hiding this comment.
Pending Tab still blurs input
Medium Severity
completeBrowsePathFromTab returns false while browse results are loading, so handleKeyDown allows the browser’s default Tab behavior. On slower filesystem browse requests, pressing Tab after typing a path can move focus out of the input instead of keeping the path picker ready for completion.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 31ad61b. Configure here.
| function handleKeyDown(event: KeyboardEvent<HTMLInputElement>): void { | ||
| if (event.key === "Tab" && completeBrowsePathFromTab()) { | ||
| event.preventDefault(); | ||
| return; |
There was a problem hiding this comment.
Shift Tab triggers completion
Low Severity
handleKeyDown treats Shift+Tab the same as plain Tab. When a completion is available, reverse tabbing mutates the browse path instead of moving focus backward, which breaks expected keyboard navigation in the dialog.
Reviewed by Cursor Bugbot for commit 31ad61b. Configure here.
ApprovabilityVerdict: Needs human review New feature adding Tab completion to the path picker with 3 unresolved review comments identifying bugs (ambiguous Tab behavior, pending state handling, Shift+Tab issue). These substantive issues warrant human review before merging. You can customize Macroscope's approvability policy. Learn more. |


What changed
resolveBrowseTabCompletion.process.execPaththrough shell mode, which broke onC:\Program Files\....Fixes #2160.
Why
The Add Project path picker already provides directory suggestions, but pressing Tab moved focus out of the input. This makes keyboard-only path entry awkward compared with normal shell completion.
With this change, users can type paths like:
~/Dev+ Tab ->~/Development/~/Development/co+ Tab ->~/Development/codex/Validation
bun fmtbun lintbun typecheckbun run buildbun run test src/components/CommandPalette.logic.test.tsNote
Medium Risk
Moderate risk: changes keyboard handling in the command palette browse input and alters the server build CLI process spawning on Windows, which could affect navigation or build behavior across platforms.
Overview
Adds Tab completion to the command-palette “Add project → Local folder” path picker so Tab no longer shifts focus and instead completes the currently typed directory path.
Completion logic is factored into
resolveBrowseTabCompletion(single match/selected entry enters the directory; multiple matches extend to a common prefix), with new unit tests and a browser scenario test covering nested completion. Separately removes Windowsshellspawning for the serverbuildCLI bundle step to avoid failures under paths likeC:\\Program Files\\....Reviewed by Cursor Bugbot for commit 31ad61b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Tab completion to the command palette path picker when adding a project
resolveBrowseTabCompletionfunction in CommandPalette.logic.ts, which returns a typedBrowseTabCompletionaction (enterDirectoryorreplaceLeaf) consumed by CommandPalette.tsx.filesystemBrowseresponses.Macroscope summarized 31ad61b.