Skip to content

feat(web): add Tab completion to path browser#4257

Open
colonelpanic8 wants to merge 4 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/directory-path-tab-completion
Open

feat(web): add Tab completion to path browser#4257
colonelpanic8 wants to merge 4 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/directory-path-tab-completion

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • complete the highlighted directory when Tab is pressed in the path browser
  • fall back to the first matching directory when no result is highlighted
  • keep focus in the path input while matches are loading or unavailable
  • preserve Tab navigation to the highlighted parent-directory entry

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.ts
  • pnpm --filter @t3tools/web typecheck
  • focused vp fmt --check and vp lint on the three changed files
  • isolated exact-head browser verification of Tab completion against a disposable project (see evidence below)

Closes #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.

Tab completes the entered folder path


Note

Low Risk
Localized command-palette keyboard handling and pure selection logic; no auth, data, or API changes.

Overview
Tab in the command palette path browser now accepts a directory suggestion instead of moving focus out of the input.

While browsing, plain Tab is intercepted and routed through new resolveBrowseTabCompletion: highlighted row (including .. → parent) wins, then a case-sensitive exact name match on the filter, then the first filtered directory. browseUp / browseTo apply the choice; Tab does nothing when matches are still loading or a relative path needs an active project.

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

Note

Add Tab key completion to the path browser in Command Palette

  • Pressing Tab while browsing in the Command Palette now completes the current path instead of moving focus to the next UI element.
  • Completion priority: highlighted entry > exact case-sensitive match > first filtered entry; pressing Tab on the parent-directory row triggers browseUp.
  • Adds resolveBrowseTabCompletion in CommandPalette.logic.ts with full unit test coverage in CommandPalette.logic.test.ts.
  • Behavioral Change: default Tab focus behavior is suppressed whenever the palette is in browse mode.

Macroscope summarized dc90a36.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

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: 14e7984d-183c-4d49-927b-2a203ce6960c

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/CommandPalette.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (Tab completion in the path browser) that changes how users interact with the command palette. New interactive capabilities warrant human review even when well-tested and self-contained.

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

@colonelpanic8
colonelpanic8 force-pushed the t3code/directory-path-tab-completion branch 4 times, most recently from 493ac39 to 3accacf Compare July 22, 2026 16:22
Comment thread apps/web/src/components/CommandPalette.tsx

@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 using high effort and found 1 potential issue.

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 a7ae59d. Configure here.

Comment thread apps/web/src/components/CommandPalette.logic.ts
@colonelpanic8
colonelpanic8 force-pushed the t3code/directory-path-tab-completion branch from 83ce1aa to dc90a36 Compare July 22, 2026 23:41
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 PR 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

1 participant