Skip to content

Add Tab completion to Add Project path picker - #2552

Closed
aShanki wants to merge 4 commits into
pingdotgg:mainfrom
aShanki:ashank/add-project-tab-completion
Closed

aShanki wants to merge 4 commits into
pingdotgg:mainfrom
aShanki:ashank/add-project-tab-completion

Conversation

@aShanki

@aShanki aShanki commented May 6, 2026 •

Copy link
Copy Markdown

What changed

  • Adds Tab completion in the Add Project filesystem browse input.
  • Extracts the completion decision into resolveBrowseTabCompletion.
  • Adds unit coverage for single-match, common-prefix, and highlighted-entry completion.
  • Adds a browser scenario for typing a path and completing nested directories with Tab.
  • Fixes the Windows desktop dev/build wrapper by not launching process.execPath through shell mode, which broke on C:\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 fmt
  • bun lint
  • bun typecheck
  • bun run build
  • bun run test src/components/CommandPalette.logic.test.ts
  • Manually verified in the desktop app on Windows

Note

Low Risk
UI-only path completion plus a targeted Windows build spawn change; no auth, data, or server API surface changes.

Overview
Tab completion in the command palette’s Add Project path browse input: pressing Tab (without Shift) completes directory names—either entering a single/highlighted match or extending the typed leaf to the longest common prefix across multiple matches. Logic lives in new resolveBrowseTabCompletion and completeBrowsePathFromTab in the palette UI.

Tests cover the resolver cases and an end-to-end browser flow (~/Dev → ~/Development/, then into codex/).

Windows dev/build: the server CLI build subcommand no longer spawns process.execPath with shell mode, fixing failures when Node lives under paths with spaces (e.g. C:\Program Files\...).

Reviewed by Cursor Bugbot for commit 48df459. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Tab completion to the command palette directory path picker

  • Adds resolveBrowseTabCompletion in CommandPalette.logic.ts that returns a structured action: enter a single/preferred directory, or replace the current leaf with the longest common prefix across matches.
  • Pressing Tab in the browse input (without Shift) triggers completeBrowsePathFromTab in CommandPalette.tsx, which applies the resolved action and refreshes browse results.
  • Unit tests cover the four resolution cases (single match, common prefix, ambiguous, highlighted preference) in CommandPalette.logic.test.ts, and an integration test in ChatView.browser.tsx verifies end-to-end Tab completion behavior.

Macroscope summarized 48df459.

@coderabbitai

coderabbitai Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 022777d5-389e-469c-b556-25345c7328dd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list. labels May 6, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ 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.

@macroscopeapp

macroscopeapp Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR adds a new user-facing feature (Tab completion for path picking) that introduces new interactive behavior. While well-tested and self-contained, new UI capabilities warrant human review to ensure the interaction model meets expectations.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Closing as part of backlog cleanup: this PR is stale, currently conflicting with main, has no approval, and has not had active remediation for 30+ days. If the change is still relevant, please rebase onto current main and request reopening or submit a focused current diff. Thank you for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: [KBD shortcut] Tab in add new project modal feels misaligned

2 participants