Skip to content

Default-model picker in Settings spins on every switch #3827

Closed

Description

@liuxiaocs7

What happened

In Settings › 通用 (General) › 任务默认 › 默认模型 (Default model), switching
the default model shows a loading spinner on the picker trigger for the entire
duration of the save. The spinner is visually distracting, and while it spins
the trigger keeps showing the old model until setDefaultModel and the
connection refresh finish, then flips to the new one.

Expected: selecting a model reflects the choice immediately with no spinner —
the same quiet behavior as the adjacent 默认权限模式 (Default permission mode)
and 默认思考级别 (Default thinking level) selectors, which never spin.

How to reproduce

  1. Open Settings → 通用 (General).
  2. Under 任务默认, open the 默认模型 picker.
  3. Pick a model different from the current one.
  4. Observe the spinner on the trigger while the save is in flight (more
    noticeable when the Runtime Host round-trip is slow); the label updates only
    after the save resolves.
Image

Environment

  • Maka commit: d2754b1ee (main), running from source
  • OS: macOS 15.7.3 (Apple Silicon)
  • Surface: Desktop
  • Node.js: v24.14.0

Logs, screenshots, or additional context

No console errors. The spinner appears on the 默认模型 trigger immediately after
a selection and persists until the save resolves.

Likely root cause: ModelPicker (packages/ui/src/model-picker.tsx) drives
the Astryx Selector through its async changeAction prop. On that path the
Selector wraps the caller's save in a transition and keeps the trigger
aria-busy (rendering a <Spinner>) as long as its optimistic value differs
from the controlled value — i.e. for the whole setDefaultModel +
connection-refresh round-trip. The sibling permission-mode / thinking-level
selectors use the synchronous onChange path and therefore never spin.

I have a fix ready and will open a PR referencing this issue.

Activity

  1. added 2 commits that reference this issue on Aug 26, 2026
    b252396
    d3ceb83
  2. added 3 commits that reference this issue on Aug 26, 2026
    01f29eb
    86152c5
    8618fde
  3. added 4 commits that reference this issue on Aug 26, 2026
    e32bc4a
    0d4175e
    5c0140c
    1b72729
  4. added
    bug
    help wanted
    on Aug 29, 2026
  5. added theissue type on Aug 29, 2026
  6. liuxiaocs7 commented on Aug 29, 2026

    @liuxiaocs7
    MemberAuthor

    take

  7. added 10 commits that reference this issue on Aug 30, 2026
    7a8d9f6
    3e55f36
    0fdbe35
    00e1521
    0e9d4a4
    6f0f0c0
    bb7a35b
    8a475bd
    e8a0657
    6edcb91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issuehelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions