Repository navigation
feat: browse Host folders from the phone when the computer uses the system chooser - #2392
Conversation
…oser DSH answers directoryPicker/list with directory-picker/unavailable on a Host that opens the OS folder dialog, so the phone could only type a path. The Host now lists folder names itself through botharness/folderBrowse (folders only, hidden flagged, capped, coded refusals) and the phone falls back to it, with Home and drives under "Other places". Adds `deepseekbot folder-browse`, a web stub for the Android-only dialog host so the Expo Web export loads again, and an e2e journey with a real model folder request. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzQmtMAahcsx9doCNJgFLe
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzQmtMAahcsx9doCNJgFLe
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
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. Comment |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Android phone result: PASS with one UX finding (Xiaomi, Android 16 / HyperOS 3, isolated QA Host, deepseek-v4.1-flash), Host from this branch at 5d4bf3a Screenshots: 2392-android-folders/phone (commit bcd5315)
The grant landed on the chosen empty test folder, then was revoked and the folder deleted. Finding: tapping the "already registered on this computer" row at the top jumps straight to the confirm sheet. Pressing Back from there leaves the browser on the parent folder, and the primary button then grants that parent. During QA this granted the parent folder by mistake (test Bot on the isolated Host); it was revoked within a minute and nothing under it changed. Back should return to the folder the sheet was opened from, or the primary button should be disabled until a folder is picked again. Generated by Claude Code |
Requested by Vain · project thread
Why the change
On a Host whose DSH picker is the OS folder dialog (Windows/macOS desktop),
directoryPicker/listanswersdirectory-picker/unavailable, so the phone's folder-grant sheet said "this computer uses the system folder picker" and only allowed typing a path. A Bot asking for a workspace from the phone was effectively blocked.Modeled on T3 Code's
filesystem.browse: the server lists directory names only, the phone navigates and picks, and the actual grant stays a separate confirmed step.Issue / Discussion: none (project thread request).
Special things to note
botharness/folderBrowse; the phone only calls it after DSH refuses. Security: the paired device already acts as the Host owner and can register any path withworkspace/create, so browsing adds discoverability, not authority. The endpoint returns folder names/paths only (never files, sizes or contents), flags hidden folders (the phone hides them), caps at 500 entries, refuses relative paths and returns coded refusals (folder-browse/invalid-path|not-found|not-directory|denied). Review focus:packages/core/src/workspaces/folder-browse.tsand the fallback inapps/mobile/src/host/bot-settings.ts.apps/mobile/src/ui/primitives/app-dialog-host.web.tsx: since feat(mobile): HIG and system-UI pass: glass sidebar, bottom search, chat soft edge, native dialogs and menus #2333 the Expo Web export crashed on load (resolveAssetSource.addCustomSourceTransformerfrom@expo/ui/jetpack-compose), which blocked every web screenshot journey. The web stub renders nothing, as the Android-only host already did off Android.deepseekbot folder-browse [<path>], documented indocs/bot-cli.md/.zh.md, tested, and run against a live Host (listing,invalid-path,not-found).pnpm lint(incl. CLI parity, feature map, ci-plan),pnpm format:check,pnpm typecheck; vitest corefolder-browse,bot-live-cli,bridge-rpc,plugin(73 pass); all mobile tests (936 pass).node scripts/e2e-mobile-folder-browse-web.mjson an isolated Host with a realdeepseek-v4.1-flashturn callingrequest_workspace_grant. The phone proxy answersdirectoryPicker/listwithdirectory-picker/unavailable(this Linux Host's DSH lists folders natively, so the system-chooser case is simulated). Resultpass: no typed-path fallback, home listed, subfolders only (noREADME.md, no.cache), Grant written on exactly the chosen folder.win32filesystem, not on a real Windows Host. Human QA on the Windows Host from the original report is needed.scripts/verification-inventory.jsonand referenced from the workspace-request feature map.Change outline
Before (reported on the phone): "This computer uses the system folder picker and cannot list folders on the phone. Pick a registered folder or type the path."
After, Expo Web export at 390×844 (layout evidence, not native):
UI reuses the existing sheet,
SettingsRow,Crumbsand section headings; the only new UI is an "Other places" section (Home plus/or each Windows drive). A Host too old forfolderBrowsekeeps the typed-path fallback, whose copy now suggests updating DeepSeekBot.Generated by Claude Code