cmux NEXT New Tab: first-frame test fits the Cards page's three chat cards (base red)
What was red
web / react-apps-check on every PR into feat-cmux-next: webviews/test/new-tab-warm-first-frame.test.ts, 8 failures (Cmd-T, the + button, a new workspace, a split, each in Chromium and WebKit). The painted first frame was atlas cosmic-gray :: 1h Fix the atlas build / 3h Invoice rounding / 5h Write the API docs, and the test expected it to also contain Older device chat.
Root cause
A deliberate product change, not a code regression. 9215b25d8a75 ("Cards New Tab template, the new default", u2851) made Cards the page an unset template shows. Cards draws three chat cards (templates.ts: recent: 3); the old default drew five. recentChatCards puts acpmux sessions first and fills the rest from device chats, and the test's three sessions took all three slots, so the device chat (30 h old) had no room. Nothing in the first-frame path broke: the page still painted one state from the first frame (0 changed frames everywhere).
Fix
The test now has two sessions and the device chat (the third session, "Write the API docs", was not asserted anywhere). The page's three cards are both sessions plus the device chat, so the test still checks what it names: a warm open paints one stable state from the first frame, with the final list, including the host's late-pushed device chat, and the recent project. Test-only change; no product code touched.
Checked open PRs #22361 and #22365: neither touches this test or the Cards card count, so neither fixes this.
Verification
On Huge Blue (Linux, Playwright Chromium + WebKit), CMUX_BROWSER_TESTS=1 CI=1 bun test test/new-tab-warm-first-frame.test.ts: 12 pass, 0 fail. Changed frames: every warm open 0, adopted spare 0, cold launch 1 (unchanged from #22261). vp fmt --check and vp lint clean on the file.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the 8 warm-open first-frame failures in new-tab-warm-first-frame.test.ts on feat-cmux-next (Cmd-T, the + button, a new workspace, a split; Chromium and WebKit).
The root cause was a deliberate product change, not a regression: the Cards template now shows three chat cards instead of five, and the test's three sessions filled all slots, leaving no room for the device chat the test asserted. The test now uses two sessions plus the device chat, so it still proves a warm open paints one stable state from the first frame, including the host's late-pushed device chat. Test-only change; no product code touched.