Skip to content

Add a folder explorer to Index Project so nobody has to paste a path - #34

Merged
Phoenixrr2113 merged 1 commit into
mainfrom
feat/folder-picker
Aug 22, 2026
Merged

Phoenixrr2113 merged 1 commit into
mainfrom
feat/folder-picker

Conversation

@Phoenixrr2113

Copy link
Copy Markdown
Owner

What this adds

A Browse button on the Index Project flow that opens a server-backed folder explorer, replacing the copy-a-path-from-Finder routine. Browsers deliberately never reveal a folder's real path to a page, so a native picker or drag-and-drop cannot hand the server a directory; a localhost tool can browse the filesystem server-side instead.

API: GET /api/fs/directories

Lists immediate subdirectories of a path, or the browse roots without one (the home directory by default; CODEGRAPH_BROWSE_ROOTS can add more). Security posture, since this lists the filesystem: real paths resolved before containment checks; directories only, never files; hidden folders opt-in; out-of-root symlinks omitted from listings and refused if requested; traversal rejected; listings capped with a truncation flag; errors sanitized through the existing safe-error path. 16 route and helper tests against real temp directories.

Dashboard

A proper dialog (Radix semantics: focus trapped, Escape closes, focus returns to Browse) with breadcrumbs, keyboard descent, project markers badged so real projects stand out, a hidden-folder toggle, and honest loading, error, empty, and truncated states. The path field stays for pasting, and the last five indexed paths are one click away.

Verification

pnpm turbo build 21/21, test 36/36, typecheck 20/20. API suite 260 tests, dashboard suite with full dialog coverage including focus return and recent paths.

🤖 Generated with Claude Code

Browsers never reveal a folder's real path to a page, so a native
picker cannot hand a server a directory to index. Instead the API gains
a directory-listing endpoint locked to the user's home directory (and
any configured browse roots): real paths resolved before containment
checks, directories only, hidden folders opt-in, out-of-root symlinks
omitted and refused, traversal rejected, listings capped with a
truncation flag, errors sanitized. The dashboard's Index Project flow
gains a Browse button opening a proper dialog (Radix semantics, focus
trapped and restored) with breadcrumbs, keyboard descent, project
markers badged so real projects stand out, a hidden-folder toggle, and
honest loading, error, empty, and truncated states. The path field
stays for pasting, with the last five indexed paths one click away.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-landing-page-build Ready Ready Preview, v0 Aug 22, 2026 11:32am

@Phoenixrr2113
Phoenixrr2113 merged commit fd2e409 into main Aug 22, 2026
12 checks passed
@Phoenixrr2113
Phoenixrr2113 deleted the feat/folder-picker branch August 22, 2026 11:41

This branch was successfully deployed

1 active deployment
Preview — 6db8dda6 Deployed Aug 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant