Skip to content

fix(desktop): preserve selected model during session promotion#34466

Merged
Brendonovich merged 1 commit into
devfrom
fix-model-name-flash-after-submit
Jun 30, 2026
Merged

fix(desktop): preserve selected model during session promotion#34466
Brendonovich merged 1 commit into
devfrom
fix-model-name-flash-after-submit

Conversation

@usrnk1

@usrnk1 usrnk1 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #34466

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes a composer model picker flicker when submitting a new session with a non-default model selected.

During new-session promotion, the local draft model selection was cleared before the routed session state became available. That left the picker with no scoped selection for a moment, so it fell back to the configured default model, then switched back once the promoted session selection was restored.

This keeps the promoted model selection in an in-memory handoff state until the session route consumes it, so the picker continues showing the selected model throughout the transition.

How did you verify your code works?

  • bun run typecheck from packages/app
  • bun test src/components/prompt-input/submit.test.ts from packages/app

Screenshots / recordings

Before

Screenshot.2026-06-29.at.16.03.49.mp4

After

Screenshot.2026-06-29.at.19.06.55.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added contributor and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate found:

This PR appears to address the same issue—preserving the model selection in the composer/prompt input. The current PR (#34466) specifically targets the desktop context during session promotion, while #33858 may cover a related or overlapping scenario with draft model selection. You should check if #33858 already resolves this issue or if the fixes are complementary.

@usrnk1 usrnk1 marked this pull request as ready for review June 29, 2026 19:11
@usrnk1 usrnk1 requested review from Brendonovich and Hona as code owners June 29, 2026 19:11
@Brendonovich Brendonovich merged commit e34822d into dev Jun 30, 2026
14 checks passed
@Brendonovich Brendonovich deleted the fix-model-name-flash-after-submit branch June 30, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants