Repository navigation
Studio: say why Sandbox High is unavailable when there is nothing to install - #13732
Conversation
…install When the OS sandbox cannot be set up from the High popup (Windows with MXC allowed and prepared but failing its live check, an ARM64 PC, or a build older than 24H2), the popup showed only its generic title with no reason, and Learn more scrolled back to Permissions, where High had just been picked. Show the check's reason in that case, and point Learn more at the OS sandbox status and setup section instead.
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 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0518c7c684
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| // Deferred past the dialog's focus restore. Inside Settings this only scrolls: the | ||
| // OS sandbox status and setup, since Permissions is where High was picked. | ||
| setTimeout( | ||
| () => openSettings("sandbox", { scrollTarget: "sandbox-os" }), |
There was a problem hiding this comment.
Route managed accounts to a mounted Learn more target
When a managed non-owner account chooses High, the capability response uses setupBlocked: "not_owner", so this dialog is reachable, but SandboxTab mounts OsSandboxSections—the only consumer of sandbox-os—only for owners (sandbox-tab.tsx:357-361). For managed users, clicking Learn more therefore just closes the popup and leaves an unconsumed scroll request with no visible navigation. Preserve the prior Permissions target for non-owners or otherwise route them to content that is actually mounted.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not a visible change: a managed account's Sandbox tab is Permissions plus a one-line note, and Settings opens that tab at the top, which is Permissions, so the old target scrolled to where the page already starts. The pending target is cleared when Settings closes.
| const deadEnd = | ||
| install === null && | ||
| command === "" && | ||
| !showOwnerOnly && | ||
| !running && |
There was a problem hiding this comment.
Exclude ready capabilities from the dead-end reason
If the OS sandbox becomes available between the picker’s capability check and this dialog’s fresh forced check—for example because another window finishes setup—then both isolation flags are true while the action and command are empty. This predicate consequently marks the capability as a dead end and renders a success reason such as “the selected Terminal passed…” under the “OS sandbox is not available” heading, instead of applying High or closing the now-obsolete popup. Gate this state on the capability still being unavailable, or handle a ready result when check() completes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ffa8bce: the reason now only shows while the sandbox is still unavailable, with a test for a check that passes in the meantime.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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 review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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 #13656
Problem
Picking Sandbox High opens the "OS sandbox is not available" popup. When Unsloth has nothing it can install or run on that PC, the popup showed only its generic title and description, with Learn more and Use Low sandbox, and no reason. That happens on Windows when:
In all three the backend returns no setup action and no command, so the popup had nothing to render. The reason was already in the capability response but the popup never displayed it.
Learn more also scrolled to Permissions. From Settings > Sandbox that is the section where High was just picked, so the button appeared to do nothing.
Change
The popup is unchanged whenever it already offers an install, a command or the owner note. Across all 27,648 combinations of capability, job and consent state, every field the popup reads is identical to main except the new reason. The reason appears in 768 of those combinations, all of them dead ends.
Before / after
The capability read is answered with the Windows state from the issue (MXC allowed and prepared, live check failing). Both sides get the same answer; only the frontend build differs.
Tests
tests/sandbox-setup.test.ts: a new test for the dead-end case (reason shown) and for the cases where it stays hidden, including a check that passes in the meantime. The Learn more test now expects thesandbox-ostarget. With the fix reverted, both tests fail (30 pass, 2 fail). With the fix in place, all pass.npm run typecheckandi18n:checkare clean.