cmux next: a Prototype composer look with a Model panel
The composer's model menu holds every harness's models, the rail, the search, Effort, the accounts and Fast mode in one list. On a harness with few models (Codex) the menu shrinks and cuts off part of the rail, and the chips sit on three edges of the box. This PR adds a fourth New Tab dot, Prototype, that tries a different layout. Claude Minimal, Claude + Quick Actions and Codex Minimal do not change.
- Prototype look (
composerLook.tsprototype,newtab/tabDots.ts): a fourth dot, with the quick actions. In it, the model and mode chips sit in the box's bottom row (+, model, mode, then mic and Send), and folder and computer sit above the box. Its location menus open above first, away from the box (locationPopover.ts). - Model panel (
QuickModelPanel.tsx): the chip opens a short menu (Model, Effort, Provider, Fast mode). Effort stays its own row: model rows draw no effort choices in this look. Model opens a panel beside it: an icon rail (Starred, then each harness once), the search field and the tab's models, with More models in place. The panel starts at its row, fits the shown tab up to the room it has, and opens on hover, as Effort does. - Mode menu (
ComposerPickers.tsx): in the Prototype look, Claude Code's rows draw the icon column, with Codex's icons on the matching levels (Manual a hand, Accept edits the terminal shield, Bypass permissions the "!" shield). Names stay each harness's own. - Menus (
ui/Menu.tsx):MenuPopuptakesshift={false}(pinned to its anchor's edge) andalignOffset;Submenutakespinned,firstRowInset,openOnHover,onOpenChangeandonPopupKeyDown. Focus in one of a menu's own submenus counts as inside the menu when it closes. Defaults are unchanged. - Fix for every look: a location chip keeps its open-state pill under the pointer (
composerLocation.css).
Unchanged: the default looks' menu (QuickModelMenu.tsx), layout and tests. The Debug setting for the rail's placement has no effect in the Prototype look. Known: in the Prototype look, while the Model panel is open from hover, a click on Fast mode can be lost to Base UI's hover safe area.
Changelog
- Added: a Prototype style on New Tab that tries a model panel and chips inside the composer box.
- Fixed: a folder or computer chip keeps its highlight while its menu is open, also under the pointer.
| Preview (Prototype dot: model panel and chips in the box) |
|---|
Tests
test/new-tab-dots.test.tsx: the page draws four dots, Prototype the fourth, and the Prototype look shows its dot with or without the actions.- The default looks' menu, layout and mode tests run unchanged.
Observed / Not run
- Ran
bun teston the 81 test files that reach the changed code: 495 pass, 18 skip, 0 fail. test/model-menu-compact.test.tsx"the menu opens with a search field that has the keyboard" and "the optional reasoning slider ..." failed in some full-file runs on this branch and on the base commit alike; they pass alone.bunx tsc,scripts/web-lint.shandscripts/cmux-next/prepush-gate.pypass.- Dogfooded in a tagged local build (New Tab, Claude and Codex tabs). Not run: no test yet covers the Prototype look's menu or layout; no gallery entry; no capture.
![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
Adds a fourth New Tab dot, Prototype, previewing a composer where the model and mode chips sit in the box's bottom row and the model menu opens a side panel with an icon rail, search, and the tab's models. Claude Minimal, Claude + Quick Actions, and Codex Minimal stay as they are.
- The panel opens on hover, as the Effort menu does; Prototype's location menus open above the box.
- Prototype's mode rows draw Codex's icons on Claude's matching modes; each harness keeps its own names.
- Fixes for every look: a location chip keeps its highlight while its menu is open, and known model providers keep their own spelling ("OpenCode", not "opencode").