Skip to content

Studio: say why Sandbox High is unavailable when there is nothing to install - #13732

Merged
danielhanchen merged 4 commits into
mainfrom
studio-sandbox-high-reason
Oct 14, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
studio-sandbox-high-reason

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

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:

  • MXC is installed, the Windows sandbox is allowed and the PC is prepared, but MXC's live check still fails,
  • the PC is ARM64 (the MXC runtime is x64 only),
  • Windows is older than build 26100 (24H2).

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

  • When the popup has nothing else to offer (no install button, no command, no owner note, no running or finished setup, and the sandbox still unavailable), it shows the capability's reason.
  • Learn more opens Settings > Sandbox at the OS sandbox section ("This computer", plus the Windows rows below it) instead of Permissions, both from the chat and from inside Settings. The scroll waits for that section's first status read, since before it the section is too short to scroll to.

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.

High popup: before shows no reason, after shows the check's reason

Learn more: before stays on Permissions, after scrolls to This computer

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 the sandbox-os target. With the fix reverted, both tests fail (30 pass, 2 fail). With the fix in place, all pass.
  • Full frontend suite: 12123 / 12123 pass. npm run typecheck and i18n:check are clean.

…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.
@danielhanchen danielhanchen self-assigned this Oct 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T14:53:52.161044Z 5a61c24 Manual request
🔒 Security Review ✅ Completed 2026-10-14T14:06:46.919534Z 0518c7c Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0518c7c684

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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" }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +80 to +84
const deadEnd =
install === null &&
command === "" &&
!showOwnerOnly &&
!running &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: ffa8bce0fc

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 5a61c24961

ℹ️ 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".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026
@danielhanchen
danielhanchen merged commit 047fede into main Oct 14, 2026
@danielhanchen
danielhanchen deleted the studio-sandbox-high-reason branch October 14, 2026 16:48
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.

[Bug] Failure to enable Windows MXC Sandbox, unclear instructions

1 participant