Repository navigation
fix(desktop): lock manual model actions while Autopilot turns on - #1490
Merged
jonathan308 merged 1 commit intoOct 15, 2026
Merged
jonathan308 merged 1 commit into
jonathan308 merged 1 commit into
Conversation
With Autopilot off, Models shows the manual selection together with the Turn on Autopilot offer. Turning on runs as a model action (useModelActions' policy), whose "Turning on…" label lives in actions.working, but ManualModels only checked backend.busy. That stays false until the runtime reports the operation, so Apply selection, Download and Remove stayed enabled and could submit switch, download or remove on top of the turn-on. Pass ManualModels a busy flag that also covers in-flight model actions, as AutopilotModels already computes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jonathan308
had a problem deploying
to
benchmarks
October 14, 2026 20:09 — with
GitHub Actions
Error
jonathan308
merged commit Oct 15, 2026
72b06b5
into
codex/desktop-mac-preview-20261012
20 of 22 checks passed
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With Autopilot off, the Models page shows the manual selection under the Turn on Autopilot offer. After a click on Turn on Autopilot, the button read Turning on…, but Apply selection stayed enabled. A click sent
switchwith the manual selection on top of theautopilotturn-on. Download and Remove stayed enabled too.The turn-on is a model action (
useModelActions().policy), tracked inactions.working.ManualModelsonly checkedbackend.busy, which doesn't see that action. It only becomes true once the runtime reports a running operation, so it misses the account link check and the time before the runtime reports the operation.AutopilotModelsalready treatsbackend.busy || Object.keys(actions.working).length > 0as busy.Reproduction (jsdom with the mocked native API; the
autopilotaction held pending): select Qwen 3.5 9B, click Turn on Autopilot, then Apply selection. Before: Apply selection enabled, and the click submitsswitch. After: Apply selection, Download and Remove are disabled until the turn-on finishes.Found while reviewing the desktop app's flows in Storybook. Base:
codex/desktop-mac-preview-20261012(unmerged desktop stack: #1354 plus the signed preview packaging commits). The diff contains only this fix. The Desktop / frontend check on this base also needs #1455.Before / After
flowchart LR subgraph Before["Before"] direction TB B1(["Click Turn on Autopilot"]):::user --> B2["working.autopilot = 'Turning on…'"]:::code B2 --> B3["ManualModels: disabled = backend.busy"]:::bad B3 --> B4(["Apply selection enabled ·<br/>switch sent during turn-on"]):::bad end subgraph After["After"] direction TB A1(["Click Turn on Autopilot"]):::user --> A2["working.autopilot = 'Turning on…'"]:::code A2 --> A3["busy = backend.busy || model action in flight"]:::fix A3 --> A4(["Apply, Download, Remove disabled<br/>until the turn-on finishes"]):::good end classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb classDef code fill:#312e81,stroke:#a5b4fc,color:#eef2ff classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2 classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5 classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4Legend: blue = user action, indigo = existing code, red = defect, green = changed code / fixed outcome.
Changes
features/models/Models.tsx: passesbusy={backend.busy || Object.keys(actions.working).length > 0}toManualModels, the same checkAutopilotModelsuses.features/models/ManualModels.tsx: Apply selection / Start providing, Download and Remove use thatbusy. Selecting models only changes local state and stays enabled.tests/modelsManual.test.tsx: the reproduction above, failing on the base branch.Validation
Limitations
busyprop fromModels.tsx, so a trivial merge in that file is possible.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.