Repository navigation
Studio: lock the last enabled GPU switch instead of silently ignoring it - #7259
Conversation
There was a problem hiding this comment.
Code Review
This pull request ensures that at least one GPU remains selected in the chat settings panel. It introduces a singleGpuInUse check to disable the checkbox for the last selected GPU, preventing the user from unchecking all GPUs, and updates the corresponding UI hints and comments. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@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". |
Closes #7254
On a multi-GPU host, the GGUF GPU picker in Chat settings lets you uncheck GPUs to narrow which devices llama.cpp uses.
toggleGpukeeps at least one GPU selected (if (next.length === 0) return;), but the last-enabled switch was still rendered fully interactive. Clicking it did nothing and gave no feedback, so the switch read as broken.Fix
Disable the switch of the last-remaining selected GPU so the constraint is visible instead of silent. This mirrors the sibling Tensor Parallelism switch, which already greys out when only one GPU is in use. The
next.length === 0guard stays as the correctness backstop. This change is purely the missing visual affordance.The single-GPU-in-use predicate shared by both controls is extracted to
singleGpuInUse(previously inline intpDisabled), so the picker and TP gate can't drift apart.The InfoHint gains one sentence: "At least one GPU must stay selected."
Behavior boundaries
Verification
tsc -band eslint on the changed file pass with no new findings. The file's pre-existing lint warnings are untouched.