cmux-next: New Tab tabs draw the new-tab icon, not the agent chat bubble

Merged
TE
8d ago
+26-6

Summary

Fixes item 15 of the cmux-next sweep (cmuxterm-hq#1421): Agent tabs and New Tab tabs shared the generic chat bubble. Both ride a conversation record, and TabItemMapping gave every conversation tab agent.chat.

The pane already knows which tabs are still on the New Tab page (AgentTabs.pageTabs), since it titles them "New Tab". It now passes that to the mapping, and those tabs draw the registry's tab.new.

TabWasNow
New Tab pageagent.chattab.new
Agent chat with a known harnessharness markharness mark (unchanged)
Agent chat without a harness markagent.chatagent.chat (unchanged)

Converted call sites:

  • TabItemMapping.item(_:fallbackTitle:isNewTabPage:): new isNewTabPage flag, default false.
  • PaneController.snapshot(): computes isNewTabPage once and uses it for both the title and the icon.

When a New Tab page becomes a chat, its title and icon change in the same snapshot.

Not changed:

  • Workspace-row kind icons. They are pending Leo's call.
  • The sidebar's tab list. It doesn't know which tabs are New Tab pages (it also titles them from the record), so it keeps agent.chat for them. Follow-up: give SidebarTabKind a new-tab case once the sidebar gets that state.

Testing

Red commit d6ea400baef adds ConversationTabItemTests.aNewTabPageTabDrawsTheNewTabIcon; the fix follows. The same conversation record maps to tab.new as a New Tab page and to agent.chat as a chat.

Changelog

Fixed: New Tab tabs show a new-tab icon instead of the agent chat bubble

Demo Video

Fleet builds of base (ff267c4b41d) and the fix, on a capture mini (1x display), opening a workspace's first New Tab.

New Tab tab at 6x, before (top) and after (bottom):

tab zoom

BeforeAfter
beforeafter

Checklist

  • Behavior changes have added or updated tests, or Testing says why not
  • UI change with no new or changed user-facing strings; localization not affected

🤖 Generated with Claude Code