Skip to content

fix(desktop): lock manual model actions while Autopilot turns on - #1490

Merged
jonathan308 merged 1 commit into
codex/desktop-mac-preview-20261012from
fix/desktop-apply-during-autopilot
Oct 15, 2026
Merged

jonathan308 merged 1 commit into
codex/desktop-mac-preview-20261012from
fix/desktop-apply-during-autopilot

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

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 switch with the manual selection on top of the autopilot turn-on. Download and Remove stayed enabled too.

The turn-on is a model action (useModelActions().policy), tracked in actions.working. ManualModels only checked backend.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. AutopilotModels already treats backend.busy || Object.keys(actions.working).length > 0 as busy.

Reproduction (jsdom with the mocked native API; the autopilot action held pending): select Qwen 3.5 9B, click Turn on Autopilot, then Apply selection. Before: Apply selection enabled, and the click submits switch. 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:#f0fdf4
Loading

Legend: blue = user action, indigo = existing code, red = defect, green = changed code / fixed outcome.

Changes

  • features/models/Models.tsx: passes busy={backend.busy || Object.keys(actions.working).length > 0} to ManualModels, the same check AutopilotModels uses.
  • features/models/ManualModels.tsx: Apply selection / Start providing, Download and Remove use that busy. Selecting models only changes local state and stays enabled.
  • tests/modelsManual.test.tsx: the reproduction above, failing on the base branch.

Validation

cd desktop-app
npx vitest run tests/modelsManual.test.tsx   # base: 1 failed | 4 passed; here: 5 passed
npx vitest run --maxWorkers=4   # 66 files, 426 tests passed
npx tsc --noEmit
npx prettier --check src scripts tests *.ts *.json
make docs-impact-check BASE=origin/codex/desktop-mac-preview-20261012   # coverage OK

Limitations

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 14, 2026 8:10pm UTC
d-inference-console-ui-dev Ready Ready Preview Oct 14, 2026 8:10pm UTC
d-inference-landing Ready Ready Preview Oct 14, 2026 8:10pm UTC
darkbloom-status Ready Ready Preview Oct 14, 2026 8:10pm UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 14, 2026 8:10pm UTC

Request Review

This branch was successfully deployed

5 active deployments
Preview – d-inference-console-ui-dev — f1e242e2 Deployed Oct 14, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — f1e242e2 Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference-landing — f1e242e2 Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference — f1e242e2 Deployed Oct 14, 2026 by vercel[bot]
Preview – darkbloom-status — f1e242e2 Deployed Oct 14, 2026 by vercel[bot]
benchmarks — f1e242e2 Deployed Oct 14, 2026 by jonathan308 via E2E Benchmarks #2657
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.

1 participant