Skip to content

fix(web): follow the thread's model after another client changes it - #10780

Closed
alizenhom wants to merge 1 commit into
pingdotgg:mainfrom
alizenhom:fix/web-composer-follows-remote-model-changes
Closed

alizenhom wants to merge 1 commit into
pingdotgg:mainfrom
alizenhom:fix/web-composer-follows-remote-model-changes

Conversation

@alizenhom

Copy link
Copy Markdown

Fixes #10684.

After a send, the web composer kept its stored model selection for that thread. That selection wins over the server thread's model for both the picker and the next send, so when another client switched the thread to a different model, desktop kept showing the old one and silently wrote it back on the next message.

Every explicit model pick on a thread draft now gets its own id. A send captures that id, and once the turn starts the composer releases the selection only while the draft still holds that id. A pick made while the send was in flight, including a same-value re-pick, has a different id and stays. With the override gone, the composer follows thread.modelSelection, so a change from another client shows through and the next send no longer reverts it.

A draft session is only marked sent, because its local placeholder thread shows the project default until the server thread arrives. The marker is persisted, and promotion drops the selection instead of moving it onto the server thread. Draft storage moves to version 10; the migration also strips never-picked seeds from server-thread drafts, which fixes threads created before this change without one more silent reversal.

Known limitation: explicit picks persisted before this change carry no marker, so a stale one is released only after the next send from this client. Seeded ones are covered by the migration. Mobile has its own fix in #10205; no wire, server, or mobile changes here.

Verification

Two paired browser tabs against one isolated dev server, Claude provider, same thread. The thread's model_selection_json was read from the projection table after each step.

Step Before (main) After (this branch)
Tab 1 picks Sonnet 5, sends thread: sonnet-5 thread: sonnet-5
Tab 2 picks Opus 5, sends thread: opus-5, tab 1 still shows Sonnet 5 thread: opus-5, tab 1 shows Opus 5
Tab 1 sends again thread reverts to sonnet-5 thread stays opus-5
Tab 1 picks Fable 5.1 without sending, tab 2 switches to Sonnet 5 and sends not run thread: sonnet-5, tab 1 keeps its unsent Fable 5.1 pick

Recordings of tab 1; the second tab acts off-screen.

Before, on main: tab 1 keeps showing Sonnet 5 after the remote switch to Opus 5, and its next send reverts the thread.

before-stale-model.mp4

After, on this branch: tab 1 switches to Opus 5 when the remote change lands, and its next send leaves the thread on Opus 5.

after-follows-remote-model.mp4

Reloading both tabs between the runs migrated their v9 storage to v10 in place.

Tests: composer draft store suite (115 tests, 9 new) covering the pick id rules, release on server threads, a newer pick surviving the in-flight window, the draft-session hold and promotion drop, and the persisted marker across a reload. Model selection, thread action, and ChatView logic suites pass (169 tests). Web typecheck, lint on the changed files, and formatting pass.

Prepared with Claude Fable 5.1 in Claude Code.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 8, 2026
After a send, the desktop composer kept its stored model selection for
that thread. That selection wins over the server thread's model for both
the picker and the next send, so when another client switched the thread
to a different model, desktop kept showing the old one and silently wrote
it back on the next message.

Every explicit model pick now gets its own id. A send captures that id and
releases the selection after the turn starts, only while the draft still
holds that id, so a pick made in flight survives. A draft session is only
marked sent and promotion drops the selection, since its local placeholder
thread would otherwise show the project default until the server thread
arrives. Draft storage moves to version 10 and the migration strips
never-picked seeds from server-thread drafts.

Fixes pingdotgg#10684.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@alizenhom
alizenhom force-pushed the fix/web-composer-follows-remote-model-changes branch from 0853cd4 to 27ae3cb Compare September 8, 2026 13:38
@alizenhom alizenhom closed this Sep 8, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This targeted fix changes existing send behavior by clearing or carrying model overrides across asynchronous sends, reloads, and draft promotion. Its persistent state migration and multiple lifecycle paths make the runtime impact broader than a simple isolated correction.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Desktop keeps the old model after the same thread changes on mobile

1 participant