feat(ui): allow free-text path input when selecting workspace folder#350
Open
pascalandr wants to merge 5 commits intoNeuralNomadsAI:devfrom
Open
feat(ui): allow free-text path input when selecting workspace folder#350pascalandr wants to merge 5 commits intoNeuralNomadsAI:devfrom
pascalandr wants to merge 5 commits intoNeuralNomadsAI:devfrom
Conversation
Expose the in-app directory browser (which already supports free-text path input) via a new "Enter path manually" link next to the Browse button on the folder selection view. On desktop, the OS-native picker does not allow typing arbitrary paths, so this gives users a way to enter UNC paths, WSL paths, or any absolute path without changing the default browse flow. Also make the existing path input in DirectoryBrowserDialog discoverable via placeholder + aria-label, and add the matching i18n keys across all supported locales. Closes NeuralNomadsAI#312 Closes NeuralNomadsAI#349
DirectoryBrowserDialog now accepts an optional initialPath prop. When opened from the folder selection view, it starts at the most recent folder (same heuristic already used for the native picker defaultPath), instead of always starting at the server workspace root. This lets users reopen a dialog already focused on a useful starting point instead of having to navigate from scratch each time.
Add optional 'rootDirs' option on FileSystemBrowser. When 2+ roots are configured in total (primary root + extras), the top-level browse view lists them as virtual entries (same pattern as the existing Windows drives view), and every absolute path must fall under one of the roots. Expose a new CLI flag '--workspace-roots' (comma-separated paths, also CLI_WORKSPACE_ROOTS env) alongside the existing '--workspace-root'. Single-root behaviour is strictly unchanged when the new option is absent. UI: directory-browser-dialog treats the new 'roots' pathKind like 'drives' — no current-path selection and no create-folder at that virtual level. Refs NeuralNomadsAI#312
Keep both dialogs usable when the server returns absolute entries or rejects an initial path, and document the additive --workspace-roots behavior to avoid confusion.
Contributor
Author
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
Contributor
|
Gatekeeper review for the latest PR state. What I reviewed
Findings
Verification
Verdict
-- |
Keep multi-root navigation stable when the browser returns absolute entries, disambiguate duplicate root labels, and reject relative --workspace-roots values up front.
Contributor
Author
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
Contributor
|
Updated gatekeeper review for the latest PR state. What I understood
Result
Remaining note
Verification
Verdict
-- |
Contributor
Author
|
comment corrected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DirectoryBrowserDialogdiscoverable by adding a translatedplaceholderandaria-label.--workspace-rootsso users with projects in several unrelated folders don't have to run multiple server instances.Why
The in-app
DirectoryBrowserDialogalready had a text field for the current path, but it was effectively unreachable and always started at the server's single root.What changed
UI
packages/ui/src/components/folder-selection-view.tsx: added an Enter path manually link below the Browse button that opensDirectoryBrowserDialog, and passesinitialPath={folders()[0]?.path}so the dialog opens on the most recent folder.packages/ui/src/components/directory-browser-dialog.tsx: new optionalinitialPathprop consumed byinitialize(); the current-folder<input>now hasplaceholderandaria-labeli18n strings.packages/ui/src/lib/i18n/messages/*/filesystem.ts/folderSelection.ts: 3 new keys across all 7 locales.Server
packages/server/src/filesystem/browser.ts+api-types.ts+index.ts:--workspace-rootsaccepts multiple comma-separated paths. When more than one is given, the picker shows them side by side at the top level (same mechanism already used for Windows drives). Omitting the flag keeps the current single-root behaviour unchanged.Validation
npm run build --workspace @codenomad/ui— typecheck + Vite build pass, PWA generated.npm run build --workspace @neuralnomads/codenomad— server build passes.Closes #349
Closes #312