cmux-next: a New Tab chat starts on the model its chip names (cx-sljrg)

Merged
TE
25d ago
+165-9

Return on a New Tab page now starts the chat on the model the chip names. Before this, a fresh profile's chip read "Claude Sonnet 5", but the chat ran Claude Opus 5.5.

Found in dogfood run 5 on the newest nightly (cx-sljrg).

Cause

With nothing picked yet, the chip names the agent's catalog default (claude-sonnet-5 for Claude Code). But the page's onAsk sent chat.new with no model, so the chat started on whatever the agent itself defaults to. On that account it defaults to Opus 5.5.

Change

  • useNewTabChipModel (chipDefaults.ts) works out the chip's model the same way the chip draws it: newTabChipSnapshot over the model catalog.
  • NewTabScreen passes that model to onAsk.
  • newTabScreenActions sends it as chat.new {model}, which App already honors.
  • An agent row for another agent still asks with no model.
  • When the chip names only the agent's own "default", nothing is sent.

Test

webviews/test/new-tab-ask-model.test.tsx renders the New Tab page with its real chips and real screen actions, types a prompt and presses Return.

  • Red on the base: the chip names claude-opus-5-5 (fixture), and chat.new carries no model.
  • Green: chat.new names the chip's model.

new-tab-send-button and new-tab-omnibar pinned the old onAsk arguments, so they now expect the chip's model too.

Also passing locally:

  • every new-tab-* and model-picker* test, harnesses-page, hideable-chrome and ui-rules (70 tests);
  • bun run check.

Changelog

  • Fixed: A chat started from a New Tab page runs on the model its chip shows.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Starting a chat from a New Tab page now runs on the model the chip names. Previously, with nothing picked, the chip showed the agent's catalog default (claude-sonnet-5), but the chat started on the agent's own default, which could be a different model (Opus 5.5 on some accounts).

  • NewTabScreen resolves the chip's model via the model catalog and passes it to onAsk.
  • screenActions sends it as chat.new {model}; asking for another agent's row still sends no model, and no model is sent when the chip names only "default".
  • Adds webviews/test/new-tab-ask-model.test.tsx and updates the send-button and omnibar tests to expect the chip's model.