Skip to content

fix(dashboard): restore default chat model selection - #10663

Merged
Soulter merged 3 commits into
masterfrom
codex/fix-chat-default-model
Oct 21, 2026
Merged

Soulter merged 3 commits into
masterfrom
codex/fix-chat-default-model

Conversation

@Soulter

@Soulter Soulter commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Fixes #10637.

ChatUI now exposes a Default model option with the subtitle Follow the selected profile's default model so users can return to the selected profile’s configured model. Clearing removes the global provider/model keys and only the active conversation’s override; other conversations retain their choices. Selecting a conversation without an override restores the default instead of inheriting the previous conversation’s model. Logout clears all saved conversation overrides and the shared in-memory selection.

Modifications

  • Offer Default model in both chat model menus, with the subtitle Follow the selected profile's default model, and normalize an empty provider to an empty model. Configuration selectors retain their existing empty-selection labels. The new subtitle is translated in all four locales.
  • Remove the current session’s persisted selection when cleared, and use current reactive state when sending so stale child props or storage cannot restore the previous model.
  • Reset shared selection state and remove all session provider keys on logout. Guard browser storage access so an unavailable localStorage getter cannot block reset or logout.
  • Update the English and Chinese ChatUI instructions. Existing screenshots do not show this selector, and no navigation or page layout changed.
  • This is not a breaking change.

Verification

  • cd dashboard && node --test tests/*.test.mjs: 78 passed.
  • Additional local regression validation used a temporary Vue Node-renderer harness to exercise the selection composable, chat session/send functions, persistence watcher, and logout method: select → clear without sending, clear → immediate send with stale child props, A/B session isolation, reload, logout, and a throwing localStorage getter. All five scenarios failed against the original source and passed with this change. The harness is not included in the PR. No browser or Windows desktop test was run.
  • cd dashboard && pnpm i18n:check: passed for all four locales.
  • cd dashboard && pnpm typecheck: passed.
  • cd dashboard && pnpm build: passed.
  • cd docs && pnpm docs:build: passed.
  • ruff format .: 520 files unchanged; ruff check .: passed.
  • git diff --check: passed.

Checklist

  • Bug fix follows the behavior described in the issue and its session-isolation discussion; no new dependencies.
  • Verification results provided above.
  • Affected English and Chinese WebUI documentation reviewed and updated.
  • No backend API or schema changes; client regeneration is not needed.
  • No malicious code introduced.

Summary by Sourcery

Restore reliable default chat model selection while preserving conversation-specific overrides and safe logout behavior.

Bug Fixes:

  • Restore the configured default chat model when users clear a model selection or switch to a conversation without an override.
  • Prevent stale conversation, shared state, or persisted selections from overriding the current chat model.
  • Ensure logout clears shared and conversation-specific model selections without failing when browser storage is unavailable.

Enhancements:

  • Allow users to clear provider/model selections in the chat model menus and isolate overrides between conversations.

Documentation:

  • Document how to clear a ChatUI model override and restore the selected profile’s default model in English and Chinese.

@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Sorry @Soulter, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 55 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@Soulter
Soulter merged commit d6a67da into master Oct 21, 2026
23 checks passed
@Soulter
Soulter deleted the codex/fix-chat-default-model branch October 21, 2026 11:45
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] ChatUI 模型选择器选定后无法恢复默认模型:无「不选择」入口,且退出登录/任何 UI 操作都无法清除残留

1 participant