Skip to content

fix(client-runtime): typing a bare Windows drive lists its folders - #40682

Open
brunobola wants to merge 2 commits into
pingdotgg:mainfrom
brunobola:fix/windows-bare-drive-browse
Open

brunobola wants to merge 2 commits into
pingdotgg:mainfrom
brunobola:fix/windows-bare-drive-browse

Conversation

@brunobola

Copy link
Copy Markdown

Problem

On a Windows host, typing a drive as D: in the folder picker shows an empty list with no message. D:\ works. On Android there is no native picker to fall back on, so an empty list reads as "other drives are not supported".

Reproduce: phone connected to a Windows environment, New thread → Add project → Local folder, replace ~/ with D:.

The server is fine: filesystem.browse with D: returns the drive's folders (55 on my machine). getFilesystemBrowsePath("D:", "Win32") returns filterQuery: "D:", so the client filters that listing by a name no folder can have.

Change

getFilesystemBrowsePath treats a bare drive as its root: directoryPath: "D:\\", empty filter. Mobile already navigates from directoryPath, so it needs nothing else.

Two web callers appended the picked folder to the raw query. With the list no longer empty, that would produce D:work\, so the command palette (row and Tab completion) and Settings → Projects → Add folder now append to directoryPath. For every other query the two are the same directory.

Scope

Small fix for an obvious bug, so no issue. It only fixes a path the picker already accepts. It adds no drive list; that is #33421, which does not touch this function. #29375 changes how a bare C: is submitted, in a different file; this changes only what is listed.

Verification

Found while adding a project on a second drive from my Android phone.

  • Test first: added a D: case to the existing derives the browse target and navigation state test. It failed on main with directoryPath: "D:", filterQuery: "D:", and passes with the fix.
  • Android, real Windows 11 host: Android 17 emulator, nightly server 0.1.12-nightly.20261122.5071 on Windows. I ran the same native build (2.3.0, 813) with the JS bundle from main and then from this branch. T: is a subst drive with sample folders.
    • main: T: lists nothing.
    • This branch: T: lists archive and work. Tapping work goes to T:\work\, tapping website and Add project created the project, stored as T:\work\website.
  • vp run check:changed passed on Windows: format, lint, knip, typecheck of 7 packages, 73 tests, React Compiler.

Not checked: iOS, and the two web callers in a browser (covered by typecheck and existing tests only). The APK was repacked with a local key so its arm64 libraries load on an x86_64 emulator, and with OTA updates off; it was not a Play build.

Before: T: After: T: After: tapped work
Before: the list under T: is empty After: T: lists archive and work After: T:\work\ lists its folders

Model: Claude Opus 5.5, Claude Code in T3 Code.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2cbba45 and 331b8d4.

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

No actionable comments were generated in the recent review.

Walkthrough

Bare Windows drive queries now resolve to the drive root instead of using the drive prefix as a filter. Browse actions append selected and completed names to the parsed directory path.

Changes: Windows Drive Browse Path

Layer / File(s) Summary
Normalize bare drive queries
packages/client-runtime/src/state/filesystem.ts, packages/client-runtime/src/state/filesystem.test.ts
getFilesystemBrowsePath adds a backslash to a bare Windows drive query before deriving its directory and filter paths. A test checks the drive root, empty filter, and browse-up state.
Build browse paths from parsed directories
apps/web/src/components/CommandPalette.tsx, apps/web/src/components/settings/ProjectRepositoriesSettings.tsx
Browse navigation, Tab completion, and folder selection append names to browsePath.directoryPath.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · previous review 2cbba

Typing a bare Windows drive now lists that drive's folders, and selecting or adding folders builds correct paths. No actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a bare Windows drive such as "D:" now lists its folders instead of an empty list. The raw summary and objectives confirm the change in getFilesystemBrowsePath (treatin…
Description check Passed The description follows the template sections (Problem, Change, Scope, Verification). It explains the bug, the drive-root fix, and why the two web callers also change. It gives a clear scope justifica…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a bare Windows drive such as "D:" now lists its folders instead of an empty list. The raw summary and objectives confirm the change in getFilesystemBrowsePath (treating a bare drive as its root with an empty filter). The title is specific and follows the conventional commit format. It omits the web caller changes, which is acceptable because they are secondary.

Full details: Description check

Explanation

The description follows the template sections (Problem, Change, Scope, Verification). It explains the bug, the drive-root fix, and why the two web callers also change. It gives a clear scope justification for a small fix without an issue, plus a test-first result and a detailed Android check with a real Windows host. Remaining gaps are minor: the template asks for a linked issue or maintainer request, and the description gives a reason for omitting one. Unchecked areas (iOS, browser testing of web callers) are stated. The template's note about the agent model line is present.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f9b19a7 and 2cbba45.

Files selected for processing: 4

  • apps/web/src/components/CommandPalette.tsx
  • apps/web/src/components/settings/ProjectRepositoriesSettings.tsx
  • packages/client-runtime/src/state/filesystem.test.ts
  • packages/client-runtime/src/state/filesystem.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 22, 2026

This branch has not been deployed

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

Labels

size:S 10-29 changed lines (additions + deletions). takeover:in-progress A takeover lead is working on this PR vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants