cmux next: a model row's effort lands with its model on a New Tab
On a New Tab (no chat yet), the person runs Fable 5.1 Medium and clicks "High" on the Sonnet 5.5 row of the model menu. The chip changed to Sonnet 5.5 but kept Medium. The pick is held until the chat starts, and the held effort went under acpmux's generic effort id while the chip read the option the harness's last session named (reasoning_effort, kept with Medium). The pick did not update the chip's held level either. This PR makes a held effort show on the option the session names, and keeps the chip's held level in step with the pick.
- Held options (
harnessSwitch.tsapplySwitch): a held option draws on the option the session names when its id differs, throughheldOptionPick(the mapping the switch already uses when the session opens). An exact held id still wins. - Chip's held level (
ComposerPickers.tsx): a model-and-effort pick before the session updates the chip's held level, and a pick that crosses harnesses moves it with the pick (or clears a stale one for that harness).
Unchanged: a started chat already landed the model and then the effort; the new test for it passes on the base too.
Changelog
- Fixed: on a New Tab, picking a model's effort in the model menu shows that effort on the chip instead of the previous one.
Tests
test/new-tab-deferred-pickers.test.tsx:a New Tab compact row holds Sonnet High on the chip and starts its first turn with it(remembered=false/true): the chip shows Sonnet 5.5 High and the first prompt carries High.a New Tab replaces held Sonnet High with Medium after switching to Codex and back: the chip and the held effort follow a pick across harnesses.a live compact row switches Fable Medium to Sonnet High after model confirmation(rail=false/true): coverage for the started chat; passes on the base.
Observed / Not run
bun test test/new-tab-deferred-pickers.test.tsx: on the base, 3 of the new tests fail (the chip shows Medium, then High after the cross-harness pick); with the fixes, 17 pass, 0 fail.bun teston the 29 test files that reachharnessSwitch,ComposerPickersand held options: 203 pass, 0 fail.bunx tsc,scripts/web-lint.shandscripts/cmux-next/prepush-gate.pypass.- Review: one read-only review, no P0/P1; its P2 (a held level surviving a cross-harness pick) is fixed and tested here.
- Not run: no tagged-build dogfood of this branch.
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes a New Tab model pick so a model row's effort lands with its model: picking Sonnet 5.5 · High in the model menu now shows High on the chip and on the first turn, instead of keeping the previous level and holding the pick under the generic effort id.
- A held effort draws on the option the session names when its id differs; an exact held id still wins.
- The chip's held level follows a model-and-effort pick before the session, including a pick across harnesses (which also clears a stale held level for that harness).
- A started chat is unchanged: the model lands first and the effort follows, and the new tests for it pass on the base.
Tests
test/new-tab-deferred-pickers.test.tsxadds New Tab chip/held-effort coverage, cross-harness pick coverage, and started-chat coverage; all 17 pass with the fixes.