Repository navigation
Studio Desktop: open the OS folder dialog to add a model folder - #13843
Conversation
Browse in the model picker's Custom Folders and in the Hub's on-device folders dialog now opens the native folder dialog on the desktop app, the same way Change download location already does. The web app, managed accounts, and a native dialog that fails to open keep the in-app browser. Fixes #6369
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex security review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #6369
Summary
On Unsloth Desktop, Browse for a model folder now opens the OS folder dialog (Explorer on Windows, Finder on macOS, the GTK / portal chooser on Linux) instead of the in-app folder browser. Desktop already does this for Change download location, Link a document folder and picking a GGUF file; the model folder buttons were the ones left on the in-app browser.
Covered buttons:
The picked folder goes through the same
addScanFoldercall as a typed path or the in-app browser, so the server keeps validating it exactly as before.What does not change
Changes
studio/src-tauri/src/native_intents.rs: newpick_native_model_foldercommand. It shares one helper withpick_hugging_face_cache_dir(dialog, canonicalize, folder check, Windows\\?\prefix stripped), so the two pickers return paths the same way. Same error strings as before.studio/src-tauri/src/main.rs: register the command.studio/frontend/src/features/native-intents/api.ts:pickNativeModelFolder(isOwner)returns the picked path,nullon cancel, orundefinedmeaning "use the in-app browser".pickers.tsxandon-device-folders-dialog.tsx: the Browse buttons call it and fall back to the in-app browser onundefined.studio/frontend/scripts/check-bundle-budget.ts: the eager picker code adds 235 B raw / 336 B transfer to the startup set (6,777,794 -> 6,778,029 B raw, 2,037,725 -> 2,038,061 B transfer against 199987c, one machine and build, Node 24, chunk count unchanged at 95); the budget is raised by that growth, like the entries above it. Main itself is already 2,897 B raw / 904 B transfer over at 199987c without this PR, sobundle:checkstays red until that is sorted on main.tests/native-model-folder-picker.test.ts: desktop owner gets the picked path, cancel adds nothing, web app and managed accounts never invoke the command, a failing dialog falls back, every Browse button is wired, and the command is registered.tauri-core-stub.mjsgains an optionalresultso a stubbedinvokecan return a value (existing users unaffected).Testing
cargo check --locked --all-targetsinstudio/src-tauri: clean (4 existing warnings in other files).npm run typecheckandnpm run build: pass.npm test: 12360 / 12360 pass, including the new file; the bundle budget tests pass (43 / 43).NO_REGRESSION(39 SAME, two 0 px DOM-only diffs on pages this PR does not touch); inference settingsNO_REGRESSIONon a Colab T4.diffusion_measured_peaks.pyencoding and calibration tests,test_diffusion_capability_labeled_image_video_gen) fail the same way on main at 199987c; this PR changes no Python.Desktop before / after
Real Desktop debug builds of the merge base and this branch, launched under Xvfb and driven over WebDriver on the staging runner: Model hub, Downloaded tab, Add folder, then Browse locations. Main opens the in-app folder browser; this branch opens the native folder dialog (GTK on Linux; there is no window manager under Xvfb, so it has no title bar, but the X window list shows it titled "Choose a model folder").