Skip to content

Pick a folder like in Codex: search, Recent, Open folder browser, Add as project - #371

Merged
default-cybe merged 5 commits into
mainfrom
feat/folder-picker
Nov 19, 2026
Merged

default-cybe merged 5 commits into
mainfrom
feat/folder-picker

Conversation

@default-cybe

Copy link
Copy Markdown
Owner

Pick a folder like in the Codex app instead of typing a path.

What changes

Web: one folder menu (packages/web/src/features/home/FolderPicker.tsx) on the composer's folder chip (Where.tsx), Device and folder (pickers.tsx) and the phone place sheet (SessionStart.tsx):

  • Search folders… filters Recent and the projects on the device by name and path. A typed path (~/co, /srv, C:\) lists matching folders on the device and is checked as before (folderCheck.tsx: missing, Create folder, offline Use anyway).
  • No folder (checked when there is none).
  • Recent: folders of recent Code sessions on the device, deduped, newest first, at most 8. Each row is the project's name (or the folder's) over a muted path; the path shows only when two names clash or the path says more than ~/<name>.
  • Open folder… opens the folder browser.
  • On switch row, offline devices greyed. Members never see the hub (local), as in Windows: keep this PC online (bounded hello, watchdog, Reconnect) and fix 'unknown device local' #366.
  • Keyboard: arrows, Enter, Esc, and Tab to complete a matching path.

Folder browser over GET /api/devices/:device/files: a path bar (type + Go), Up, clickable breadcrumbs, quick jumps (Home, Desktop, Documents, the device's roots), folders only with Show hidden, New folder (the existing POST /api/devices/:device/folder), and Select this folder. A dialog on desktop, a 92dvh sheet on phones.

Add as project: in the browser footer with an editable name. New POST /api/projects -> ProjectsService.add: a git repository or synced folder is known by its history; a plain folder gets .conclave/project.json. The location is pinned. A folder that is already a project returns it.

Security

  • POST /api/projects is self in route-policy and checks that the device belongs to the caller (known -> scope ownDevice). A member gets 404 on another account's device (test).
  • GET/POST /api/devices/:device/folder and GET .../files now reject NUL/line breaks and paths over 4096 characters (pathString), like the projects routes.
  • No new daemon RPC: mkdir already exists in both daemons and keeps out of the hub's private folders (new TS + Rust tests).

Android: CodeWhereSheet Recent rows show name over muted path (Panel.recentRows, unit test), plus Browse…: a folder list sheet over the same files API with Up and Select this folder.

Desktop native dialog: not added. Neither tauri-plugin-dialog nor rfd is in Cargo.lock, so the desktop app uses the in-app browser.

Tests

  • web test/folder-check.test.tsx: Recent dedupe/order/name-path rule/project names, search, path detection, breadcrumbs/Up/names, menu rows, keyboard, typed path + Create folder, offline, device row + member, browser navigation/Show hidden/Select.
  • server folder-check.test.ts (bad paths; a member is refused browse, mkdir and add on the owner's device), projects-routes.test.ts (add route).
  • core projects/move.test.ts (add), machine/private.test.ts (mkdir refusals); daemon-rs private.rs mkdir_keeps_out_of_it.
  • Android PanelTest.recentRowsShowTheNameAndThePathOnlyWhenItSaysMore.

Screenshots: folderpick-*.png (1440 dark, 390 light) in the session outputs.

… as project

One FolderMenu (web features/home/FolderPicker.tsx) on the folder chip, Device
and folder and the phone place sheet: Search folders (typed paths list matching
folders on the device), No folder, Recent (project or folder name over a muted
path, deduped, newest first, at most 8), Open folder... and an "On <device>"
row. Open folder... is an in-app browser over GET /api/devices/:device/files
with breadcrumbs, Up, folders only, Show hidden, Home/Desktop/Documents/roots,
New folder (the existing POST /api/devices/:device/folder) and Select. A folder
that is no project yet can be added as one (new POST /api/projects, the
projects service's add: marker for a plain folder, pinned location).

The device folder routes now refuse NUL/line breaks like the projects routes.
Tests: menu, keyboard, browser, Recent/search rules, member refusal, mkdir
private-path checks in TS and Rust.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
Keep both sides in pickers.tsx: the folder menu, and a member's device list
without the hub (#366); the folder menu and chip hide the hub from members too.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
Android CodeWhereSheet: Recent rows show the folder's name over its muted
path (Panel.recentRows, deduped, newest first), and Browse… opens a folder
list over GET /api/devices/:device/files with Up and Select this folder.
Web mock: POST /api/projects for the Add as project screenshots.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
… clone

- ProjectsService.add runs one add per account, device and path at a time,
  so a double Select makes one project and one marker.
- The home folder and the root cannot become a project.
- A folder whose history is already a project becomes one of its places.
- projectOf picks the deepest place and skips a place at the root.
- Project names refuse C1 control and direction-override characters.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
CHANGELOG [Unreleased]: keep #368/#369's Fixed and this branch's Changed.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
@default-cybe
default-cybe merged commit 0c259f6 into main Nov 19, 2026
18 checks passed
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