Skip to content

fix(settings): release explicitly deselected image models - #833

Merged
vastsa merged 1 commit into
vastsa:mainfrom
yuxino:codex/fix-image-model-deselection
Sep 22, 2026
Merged

vastsa merged 1 commit into
vastsa:mainfrom
yuxino:codex/fix-image-model-deselection

Conversation

@yuxino

@yuxino yuxino commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Unchecking Set as image model and saving still kept the old image default when its provider could run it. With only one model, that left the chat default unavailable even after reopening settings.

Clear the active binding when it is explicitly deselected, then choose a remaining runnable image candidate or leave the image default empty. Saving another provider still preserves the existing default. No settings schema or IPC changes.

The same real desktop steps reproduce the problem before the fix and restore chat selection afterward. This is a 1920×1080 screenshot sequence, not continuous video; waits are omitted. Captured on macOS with an isolated Host database and a local model-list fixture, without live model requests. Windows package verification was not performed.

Uncheck, save, reload, and select the released chat model

Fixes #826.

Validation and scope
  • Task candidate: 087d0eff4dcb2cd701f306f1438fc9640e5c751b.
  • Base main: 206085c07697771f857cab0421bc145e3af41e1d.
  • GitHub merge candidate: 4fa75ffedf8c76d8c170c32d1ffe90e2e0f21325; its tree exactly matches the tested head (ad6d34cb44677ca0417d689e57247e191ecb1129).
  • macOS arm64, Node 24.13.0; reused host dependencies and Cargo cache.
  • Old code fails four added regression cases and the same uncheck/save interaction; fixed code passes.
  • 38 relevant tests: node --test apps/desktop/test/image-generation-default.test.mjs apps/desktop/test/default-model-display.test.mjs apps/desktop/test/default-model-picker.test.mjs.
  • node scripts/e2e-image-generation-ui.mjs: English/Chinese cancel, save, reopen and chat selection passed using real components with an API fixture.
  • Isolated full desktop: real preload/Host settings persistence, reload and chat selection passed; before/after evidence above.
  • pnpm build:js, Desktop typecheck, pnpm lint, pnpm docs:check, architecture check, pnpm check:pr-base, and git diff --check passed.
  • Image-generation specification and E2E scenario updated in English and Chinese. No Rust or protocol changes; unrelated Rust suites were not run.

Continuous desktop recording

The following 17-second video continuously records the real desktop window at normal speed: uncheck Set as image model, save the provider, reload settings, and select the released model as the chat default. Only trailing idle footage is trimmed; English step labels and outlines identify the relevant controls. This is a native window recording, separate from the screenshot sequence above.

issue-826-continuous.mp4

Recorded on macOS arm64 from merged head 087d0eff4dcb2cd701f306f1438fc9640e5c751b, with an isolated profile/database, real preload and Host persistence, and a local model-list fixture. No paid model requests or personal data. The Host was rebuilt from that candidate and copied to a dedicated binary (SHA-256 e47f1bf2d7b44211e4b13a071009db55d2252aebecbdb38ed34545cbf303270c). Native source: 2624×1824; annotated delivery: 1920×1440, 30 fps. Windows package verification remains unperformed.

Saving an unchecked image model kept its runnable default binding, so
the model stayed excluded from chat choices even with no candidates.
Clear that binding before choosing a remaining runnable default, while
preserving defaults when other providers are saved.

fixes vastsa#826
@vastsa
vastsa merged commit 40a1e3c into vastsa:main Sep 22, 2026
4 checks passed
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] 取消生图模型后仍被占用,导致默认聊天模型不可用

2 participants