cmux-next New Tab: a Minimal layout (greeting + composer) as the default, its extras as widgets

Merged
TE
15d ago
+3115-363

Summary

Cmd-T in cmux NEXT opened a busy page: a project card, a quick-actions card, a Chats list, a Search | Ask switch over the composer, and template dots under it. Leo asked for "only the composer for the default ... maybe the little text, like hello".

New Tab now opens on Minimal, a layout of its own: the new default and the first dot. It shows a quiet greeting by the time of day ("Good morning") and the composer, about the window's middle. Minimal uses the one shared composer as it is, with no fork: its folder and machine strip, model, effort, mic and Send. Every other layout (Cards, Default, Composer, Threads, Console, Classic) is unchanged, so they can still be compared side by side.

Everything else on Minimal is a widget, off by default, in Settings > General > Tabs (tabs.newTabWidgets.*):

KeyDefaultShows on Minimal
greetingonthe greeting
projectsoffthe project and machine card
actionsoffchats that need you, New Terminal / New Browser Tab / New Chat
chatsoffthe recent chats
modeSwitchoffthe Search | Ask switch
styleDotsoffthe template dots

With the project card, the actions or the chats on, Minimal takes Default's stage layout around the composer. The other layouts ignore these keys.

Keyboard flows still work with every widget off:

  • Type a URL or a prompt and press Return.
  • Tab flips Search and Ask. The placeholder shows which mode is on, and a screen reader still hears the hint and the mode.
  • The palette (Cmd-P) finds a chat.

How it works:

  • tabs.newTabTemplate gains minimal, now the schema default (NewTabTemplate.fallback). The page's DEFAULT_NEW_TAB_TEMPLATE is minimal too.
  • The app reads the toggles (NewTabWidgetSettings, generated from schemas/settings/source/new-tab-widgets.json) and sends the ones that are on as the page context's pageWidgets, for both the Cmd-T page and the prewarmed spare.
  • newtab/pageWidgets.ts shownPageWidgets() applies them on Minimal only.
  • The gallery's older agent-pane.new-tab variants are pinned to Cards, the old default, so they and the browser tests that load them render as before.

Widgets later

cmux NEXT's app platform has no New Tab slot yet (its widgets are sidebar widgets), so for now these ship as settings. Each toggle maps to one built-in widget id (greeting, projects, actions, chats, modeSwitch, styleDots). When the platform gets a New Tab placement, these become Minimal's built-in widgets with the same ids and defaults. pageWidgets then becomes the list of placed widgets (built-in or from an app) instead of a list of toggles that are on.

Not touched: where a pick from the page opens (the split-right shift belongs to cmux/newtab-layout-shift). The New Tab composer lane will rebase its Composer-mounted screen onto this.

Testing

  • New webviews/test/new-tab-minimal-default.test.tsx:
    • Minimal is the default and the first dot.
    • Minimal is the greeting, the composer and its strip, with no widgets.
    • Tab flips the placeholder with the switch hidden, and aria-describedby still resolves.
    • Minimal's widgets bring in the stage.
    • The other layouts ignore the widgets.
    • pageWidgets parsing and the greeting hours.
  • Updated for the new first dot or default: new-tab-style-switch.test.tsx and new-tab-cards-template.test.tsx.
  • The first version's tests ran locally (4 pass), along with the existing test/*new-tab* files (227 pass). The rework's web tests are not run locally: bun test is blocked on this Mac. CI runs them.
  • Swift tests, not run locally (no Swift builds on this Mac; CI runs them):
    • NewTabWidgetSettingsTests (new): defaults, parse, the bad-value diagnostic, and every row listed in Settings with the New Tab rows and agent-settable.
    • NewTabWidgetsTests.thePageContextCarriesThePageWidgets (new).
    • NewTabTemplateCardsTests (updated): Minimal is the default and the first choice.
  • python3 scripts/cmux-next/gen-settings-sources.py --check, scripts/cmux-next/prepush-gate.py and the pre-push web lint pass.
  • Fleet cmux-ci compile-check --app passed on the first version, dce763265c91 (job 680667602689fe904bc9054e). It does not compile tests.
  • Base reds on this PR: defaults-snapshot, which is also red at feat-cmux-next baaef75e (the settings exports are stale on base).
  • The generated settings-schema.json and docs/mdm/* are left to the autofix.

Localization: 4 new page strings (newTab.greeting.*, newTab.template.minimal) and 13 Settings strings, each in all 21 languages; scripts/cmux-next/check-l10n.sh reports 0 errors.

Changelog

Changed: New Tab opens on a new Minimal layout, a greeting and the composer. Its recent chats, quick actions, project card, Search and Ask switch and template dots are options in Settings > General > Tabs, and the other layouts are unchanged.

Proof

From the gallery advisory run on this PR:

  • Before: agent-pane.new-tab reasoning-chip, the old default (Cards).
  • After: minimal-default (the new default) and minimal-widgets (every widget on).

Agent session: cosmic-gray

🤖 Generated with Claude Code