Skip to content

The agent that grows with you

test(desktop): pin the provider-change wire clear; say which paint the dedupe covers

kshitijk4poor1b46f53121e1
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/utils.ts b/apps/desktop/src/app/session/hooks/use-message-stream/utils.ts
index e14409efb7d..af4d6165126 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/utils.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/utils.ts
@@ -87,8 +87,8 @@ export function applySessionInfoStatePatch(
(patch.personality === undefined || patch.personality === state.personality) &&
(patch.provider === undefined || patch.provider === state.provider) &&
(patch.reasoningEffort === undefined || patch.reasoningEffort === state.reasoningEffort) &&
- // The wire level can change alone: an optimistic pick already holds the new
- // effort, so skipping here kept the previous pick's clamp ("Medium→Max") forever.
+ // The wire level can change alone: an optimistic paint already holds the new
+ // model/effort, so skipping here kept the previous route's clamp ("Medium→Max") forever.
(patch.reasoningEffortWire === undefined || patch.reasoningEffortWire === state.reasoningEffortWire) &&
(patch.reasoningEffortPending === undefined ||
patch.reasoningEffortPending === Boolean(state.reasoningEffortPending)) &&
diff --git a/apps/desktop/src/store/reasoning-effort-wire-scope.test.ts b/apps/desktop/src/store/reasoning-effort-wire-scope.test.ts
index 3bed200c2b2..5ecedf639d6 100644
--- a/apps/desktop/src/store/reasoning-effort-wire-scope.test.ts
+++ b/apps/desktop/src/store/reasoning-effort-wire-scope.test.ts
@@ -41,6 +41,10 @@ describe('reasoning-effort wire scope', () => {
expect($currentReasoningEffortWire.get()).toBe('')
// The pick itself is untouched — only the route claim is withdrawn.
expect($currentReasoningEffort.get()).toBe('xhigh')
+
+ stampWire('xhigh')
+ setCurrentProvider('openrouter')
+ expect($currentReasoningEffortWire.get()).toBe('')
})
it('keeps the stamp across a heartbeat that mirrors the runtime model', () => {