Skip to content

fix(desktop): reseed new chats from profile defaults - #65326

Closed
deniqlab wants to merge 1 commit into
NousResearch:mainfrom
deniqlab:fix/65300-new-chat-model-default
Closed

deniqlab wants to merge 1 commit into
NousResearch:mainfrom
deniqlab:fix/65300-new-chat-model-default

Conversation

@deniqlab

@deniqlab deniqlab commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes the fresh-new-chat model seeding regression reported in #65300 / related #50821.

What changed

  • Force the fresh new-session draft sync path to reseed the composer model/provider from the profile/global default instead of reusing the prior sticky selection.
  • Add a regression test for the fresh-draft reseed path.
  • Strengthen the model-controls test to assert the provider reseeds too.

Verification

  • npm test -- src/app/contrib/hooks/use-background-sync.test.tsx src/app/session/hooks/use-model-controls.test.tsx
  • git diff --check
  • npm run lint -- src/app/contrib/hooks/use-background-sync.ts src/app/contrib/hooks/use-background-sync.test.tsx src/app/session/hooks/use-model-controls.test.tsx ✅ (repo-level warnings only)
  • npm run typecheck ❌ blocked by baseline missing/incompatible desktop dependencies in this environment
  • npm run build ❌ blocked by baseline missing/incompatible assistant-ui exports in this environment

Notes

This branch is published from fork/deniqlab due push permissions on the upstream repo.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jul 16, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused regression test and narrow implementation.

Problems

  • apps/desktop/src/app/contrib/hooks/use-background-sync.ts:132 changes a fresh draft to call refreshCurrentModel(true). On current main, force is intentionally reserved for profile swaps: apps/desktop/src/app/session/hooks/use-model-controls.ts:38-56 preserves a non-empty composer selection, while apps/desktop/src/app/session/hooks/use-session-actions/index.ts:210-215 explicitly keeps that selection for new chats.
  • The referenced #62055 also reports that a Settings-selected model can be missing from the composer picker. This change resets the selection but does not address that catalog/availability path.

Suggested changes

  • Keep the non-forced fresh-draft refresh unless maintainers choose to change the sticky-composer contract introduced in cb6b4127e.
  • If targeting #62055, re-scope to the composer model-options path and test that the Settings-selected model is available and usable there.

Automated hermes-sweeper review.

useEffect(() => {
if (gatewayState === 'open' && !activeSessionId && freshDraftReady) {
void refreshCurrentModel()
void refreshCurrentModel(true)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true overrides the deliberate sticky-composer contract: startFreshSessionDraft keeps the previous model/provider for new chats (apps/desktop/src/app/session/hooks/use-session-actions/index.ts:210-215), and refreshCurrentModel reserves force for profile swaps (apps/desktop/src/app/session/hooks/use-model-controls.ts:38-56). Please retain the non-forced call unless that product behavior is intentionally being changed.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 16, 2026
@OutThisLife

Copy link
Copy Markdown
Contributor

Closing as a duplicate of #67207 (same author, same fix for #65300 — reseed fresh new-chat composer model/provider from profile defaults).

Please continue on #67207; reopen this only if that PR is abandoned and this branch is the one to land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants