GeezerVison is showing github.com — fix(web): picking the machine a draft is already on keeps its model by juliusmarminge · Pull Request #44945 · pingdotgg/t3code
Conversation
Picking the machine Auto balance had already placed a draft on under "Run on" could swap the draft's model for the provider last used anywhere in the browser (for example Codex replacing a shown Claude), and the message then ran on that other provider. A manual "Run on" pick now re-seeds the draft's model only when the draft actually moves to another machine or project. A pick of the same machine keeps the model shown in the composer.
Fixes #44928
Reproduction on main
Commit 83bdae1 (origin/main). Web dev server (T3CODE_DEV_SEED=0 vp run dev) as machine A plus a second server (t3 serve --lan, own base dir) as machine B, paired into the web client via Settings > Environments > Add environment; load balancing switched on; the same sample git repo (remote github.com/example/demo) added as a project on both, so both are one logical project. Codex and Claude available on both. Steps: (1) New draft in demo, picked Claude Haiku 5.5, sent 'Reply with just the word ok.' (thread 1, Claude). (2) New draft, picked Codex GPT-6.2-Sol, sent the same (thread 2, Codex); the browser's last-used provider was now codex. (3) Opened thread 1 and clicked 'New thread in demo': Auto balance placed the draft on machine B (environmentSelection auto, loadBalancedEnvironmentId = B), and the composer showed Claude Haiku 5.5, carried from thread 1 with no modelSelectionExplicit. (4) Opened the model picker and picked Claude Haiku 5.5 (the model already shown); the store was unchanged and still not explicit. (5) Opened Run on and picked machine B. The draft's environmentSelection went auto -> manual with the same environmentId, activeProvider changed claudeAgent -> codex, and the chip changed from 'Haiku 5.5' to '6.2 Sol'. (6) Sent: server B's projection stored the thread with providerInstanceId codex and model gpt-6.2-sol. This is the reporter's bug with the providers swapped. A first attempt in which the user picked a different model from the one shown (so it was marked explicit) kept the model, which explains the reporter's 2/6 rate. The failing test on factory/repro-44928 fails on main with "expected 'codex' to be 'claudeAgent'" (the other 28 tests in the file pass).
Evidence
Real web app, Chromium, 1280×800, light theme, two paired servers and fresh synthetic data. Replay models exercise the model-selection state without paid provider calls.
Steps: establish Plan and reads as the browser's last-used model by sending a message; open a seeded Multi turn thread; create a fresh draft; let Auto balance assign the second environment; re-pick the already displayed Multi turn model; select that same environment under Run on. Base replaces the model with Plan and reads. Head preserves Multi turn and successfully sends a replay turn.
Scenario driver. scenarios:prove exited 0: failsOnBase=true, passesOnHead=true.
Not shown:
- The exact Claude Haiku-to-Codex provider switch was not exercised; the supported scenario replay agent demonstrated the same inherited-model replacement using two replay models.
- Base-side sending after the incorrect replacement was not exercised because the scenario stops at its failed model-preservation assertion. Head-side sending completed with the preserved replay model.
- Desktop and mobile surfaces were not exercised; this proof covers the web client.
Tests
vp test run src/components/chat/useDraftEnvironmentRouting.browser.test.tsx without the fix: 1 failed (the regression test, "expected 'codex' to be 'claudeAgent'"), 28 passed
vp test run src/components/chat/useDraftEnvironmentRouting.browser.test.tsx with the fix: 29 passed
vp run check:changed: format, lint, knip, typecheck, test and React Compiler all pass
- PR CI on 8c19403: all 39 checks passed
Not in this change
- useHandleNewThread carries the source thread's model into a new draft without setting modelSelectionExplicit, so a later real machine move still re-seeds that model.
- onProviderModelSelect in useComposerSelection.ts returns early when the user re-picks the model already shown, so that pick is never marked explicit.
Who did the work
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…44928)
Fails on main: a manual Run on pick of the current machine re-seeds the
draft's model from the browser's last-used provider.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A manual Run on pick re-seeded the draft's model even when the draft
stayed on the same machine and project, replacing a shown but
non-explicit model with the browser's last-used provider. Seed only
when the pick actually moves the draft.
Fixes #44928
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Manual retargeting now seeds a draft’s model selection only when the destination changes its project. A browser regression test covers selecting the machine already used by an automatically routed draft and confirms its existing model remains active.
Changes: Draft model selection
| Layer / File(s) |
Summary |
Retargeting and model preservation apps/web/src/components/chat/useDraftEnvironmentRouting.ts, apps/web/src/components/chat/useDraftEnvironmentRouting.browser.test.tsx |
Manual retargeting seeds model selection only when the destination changes the draft’s project. The regression test confirms that selecting the machine already in use preserves the draft’s active model. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: stienswout
Merge Risk: Minimal · up to 8c194
-
Selecting the machine a draft is already on now keeps the draft's model instead of replacing it with the browser's last-used provider. A regression test covers this case. No merge-blocking risk was identified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title "fix(web): picking the machine a draft is already on keeps its model" states the main change. It follows conventional commit form and names the web scope. The raw summary and objectives conf… |
| Linked Issues check |
 |
Objective [#44928]: a manual 'Run on' pick of the machine Auto balance already chose must keep the composer's model, not re-seed it from the browser's last-used provider. Code evidence: in useDraftEnv… |
| Out of Scope Changes check |
 |
The source change is a two-line gate in useDraftEnvironmentRouting.ts that limits the existing seedDraftModelSelection call to moves where changesProject is true. This directly implements the linked o… |
| Description check |
 |
The description follows the template closely. It has a clear Problem section (manual Run on pick swaps the draft's model to the last-used provider) with a specific reproduction on main. The Change sec… |
Full details: Title check
-
Explanation
The title "fix(web): picking the machine a draft is already on keeps its model" states the main change. It follows conventional commit form and names the web scope. The raw summary and objectives confirm the change: a manual Run on pick of the current machine keeps the composer model. The title is specific and short, so it passes.
Full details: Linked Issues check
-
Explanation
Objective [#44928]: a manual 'Run on' pick of the machine Auto balance already chose must keep the composer's model, not re-seed it from the browser's last-used provider. Code evidence: in useDraftEnvironmentRouting.ts, the manual switch path computes moved = changesProject(currentDraft, projectRef) before carryFanoutSelections and the workspace update, and calls seedDraftModelSelection only when moved is true. changesProject compares environmentId and projectId, so a same-machine, same-project pick skips the re-seed. A real machine or project move still re-seeds. Test evidence: the PR adds a browser test for re-picking the current machine that checks the draft becomes manual and keeps the displayed model while the sticky model is Codex. The author reports it fails on main ('expected codex to be claudeAgent') and passes with the fix. I did not run the test; this rests on the author's report. Excluded behaviors (useHandleNewThread model carry-over, onProviderModelSelect early return) are declared out of scope by the PR and are not required here. Uncertainty: the issue's step 2 (picking a different Codex model) would be marked explicit, and the PR states explicit picks already kept the model; the same-machine re-seed path is still the one the issue's 'Actual behavior' describes.
Full details: Out of Scope Changes check
-
Explanation
The source change is a two-line gate in useDraftEnvironmentRouting.ts that limits the existing seedDraftModelSelection call to moves where changesProject is true. This directly implements the linked objective. The added browser test covers the same behavior and supports that change. No unrelated files or behaviors appear in the reviewed summary. The two deferred items listed in the PR are not added by this change.
Full details: Description check
-
Explanation
The description follows the template closely. It has a clear Problem section (manual Run on pick swaps the draft's model to the last-used provider) with a specific reproduction on main. The Change section explains the fix: the model is re-seeded only when the draft moves to another machine or project. The Scope section links issue #44928 and describes the bug as a fix, not a feature. The Verification section gives focused test results (1 failed/28 passed without the fix, 29 passed with it), a check:changed run, CI status, and before/after evidence with screenshots and a recording. It also states what was not checked. The template's agent attribution line is present. Minor gaps: the template's header comment asks for a conventional commit title, and the PR title is not part of the provided description. The description is long and includes some detail beyond the template, but it is substantively complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between d0717f7 and 8c19403.
Files selected for processing: 2
-
apps/web/src/components/chat/useDraftEnvironmentRouting.browser.test.tsx
apps/web/src/components/chat/useDraftEnvironmentRouting.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
imetn
added a commit
to imetn/t4code
that referenced
this pull request
Nov 28, 2026
…rver)
Mobile (7 PRs):
- pingdotgg#44387 ProMotion 120Hz scroll stutter fix ([email protected] patch)
- pingdotgg#44161 iOS release status bar icons follow app theme
- pingdotgg#44939 Scroll to end no longer loses next tap
- pingdotgg#44937 image previews opened from composer chip stay closed
- pingdotgg#44660 center working glyph in Dynamic Island
- pingdotgg#44315 tapping image in html_render opens image viewer
- pingdotgg#30661 share a turn's final response from system share sheet (approved orthogonal graft in ThreadFeed.tsx)
Web & Desktop (17 PRs):
- pingdotgg#43101, pingdotgg#30027, pingdotgg#44935, pingdotgg#44900 Markdown code block & file tree preview, large preview Select-All Range copy, rendered table copy
- pingdotgg#44055, pingdotgg#44952, pingdotgg#44992 copy chat table as aligned text for chat apps (CJK & symbol width alignment)
- pingdotgg#33801 Mod+Alt+E maximizes right panel even when closed (T4 Tooltip preserved)
- pingdotgg#39122 snooze a thread indefinitely
- pingdotgg#44023 inline CLI update button in provider status section
- pingdotgg#33827 save files from preview panel to machine
- pingdotgg#44930, pingdotgg#44945, pingdotgg#44916, pingdotgg#44831, pingdotgg#44975, pingdotgg#45021 folder-add/draft/queue/HTML-reload/clear UX fixes
Server & Providers (18 PRs):
- pingdotgg#41726 Usage limits refresh skips full provider health checks (preserving T4 human-only manual Antigravity CLI probe and avoiding ACP health checks on limitsOnly)
- pingdotgg#32114, pingdotgg#43651 checkpoint capture baseline read & parallel source control discovery
- pingdotgg#44979 hung gh auth token no longer stalls MCP connect
- pingdotgg#44860, pingdotgg#44872 Claude main checkout settings/plugins & scratch folder cleanup
- pingdotgg#44902 send image attachments with actual byte magic MIME type (approved orthogonal graft in adapter.ts)
- pingdotgg#44994, pingdotgg#44399, pingdotgg#44406, pingdotgg#44418, pingdotgg#44448, pingdotgg#45014, pingdotgg#44827, pingdotgg#44913, pingdotgg#40454, pingdotgg#44863, pingdotgg#44926 terminal/git/Codex/ACP/CLI/desktop stability fixes
Verified:
- check:t4-locks main..HEAD: only the 2 user-approved orthogonal grafts (ThreadFeed.tsx, adapter.ts)
- Zero telemetry: 0 bytes changed in telemetry modules
- i18n:check pass across all 10 locales (0 untranslated zh.json keys)
- vp fmt --check pass across all 166 changed files
- Typecheck 0 new errors across all 13 touched packages
- Targeted unit tests + all 8 Web Chromium browser test suites (196/196) + independent GPT pre-merge review & fixes verified
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|