Fresh-home launch smoke: the first-run history page over Home is a healthy launch

Merged
AU
2d ago
+84-12

Problem

Since https://github.com/manaflow-ai/cmux/pull/33215, a fresh home opens with the Bring your history page over Home, and Home's tab has no selection (selected_tab: null). The fresh-home validator requires that tab to be selected, so a live, healthy app fails with "Home did not render within 90s".

Change

  • The app marks first_run.history_import_shown once the page has opened.
  • The validator accepts an unselected Home tab only with that mark. An unselected Home without the page still fails.
  • The App line count stays flat: the neighbouring comment was tightened to pay for the mark, as the ratchet asks.

Validation

  • Focused tests in tests/test_fresh_home_launch_smoke.py pass: the new test, the healthy stub and the no-Home stub.
  • Replaying the real failing snapshot from the dogfood run: not rendered without the mark, rendered with it.
  • Not run: a compile or a real launch of this head. The mark only exists in builds that include this PR, so the next nightly is the first real proof. Hosted CI compiles the Swift line.

Not covered

The journey after launch may still stop at the chat step while the page is on top. There is no release socket method to dismiss it, so that needs its own change once this shows what happens.

šŸ¤– Generated with Claude Code

Carried to land (FRESH-HOME SMOKE, for the cmux-next Performance Lead, 2026-11-04)

  • Merged origin/feat-cmux-next 30d4ee36698 (plain merge per docs/ci/merge-main.md "When git is older than 2.46"; no rebase, no force push). One conflict in watch(): #35340 added the READY hook (idle-cpu). Resolution: a READY caller keeps READY(snap) and first_window_frame_committed; the nightly smoke (READY None) uses home_rendered. #35340's idle-cpu check (any visible window plus the frame mark) needs no change: a covered Home still has a visible window.
  • New end-to-end stub test test_a_fresh_launch_with_the_first_run_page_over_home_passes: the stub streams the frame mark and first_run.history_import_shown and serves Home's pane with no selected tab. The same pane without the mark still fails. The failure text now says whether the first-run mark was seen.

Red / green

python3 -m unittest tests.test_fresh_home_launch_smoke.FreshHomeLaunchSmokeTest.test_a_fresh_launch_with_the_first_run_page_over_home_passes

  • Base (origin/feat-cmux-next d3d5a6246ab script): FAIL, AssertionError: 1 != 0, FAIL: Home did not render within 10s (visible windows 1, Home tab not selected, first_window_frame_committed seen), the nightly's own text.
  • Head 01c62e02839: OK.

Observed / Not run

Observed:

  • tests.test_fresh_home_launch_smoke + tests.test_nightly_next_launch_smoke: 60 tests OK (Linux VM).
  • Fleet cmux-ci compile-check --app --package CmuxNext --ref 01c62e02839: job 09ed452315b9aaf60e5d4762, CmuxNext passed (382 s), app passed (23 s).
  • Fleet package-test-lane.sh suite Packages/macOS/CmuxNext HistoryFirstRunRoutingTests --ref 01c62e02839: step f547a65aca0a577fec012256, 2 tests passed.
  • scripts/cmux-next/prepush-gate.py: no new violations.
  • Reds on the old head bc900c144817, both base: cmux-next swift test (PaneChromeEvenInsetTests, HomeSidebarUnreadDotTests, WindowBackgroundOpacityTests, NativeTooltipGuardTests, BrowserChromeIconsTests: same tests red on unrelated PRs, runs 41764258072 and 41764144173); cmux-next crash-class rules (CEF ObjC contract pin, since fixed by #34674). On this head cmux-next crash-class rules is red on check-objc-selectors for ThemedLabel.swift:92 and DividerHandleView.swift:189, files this PR does not touch; the same job is red on feat-cmux-next itself (runs 41832548265, 41831415899).

Not run:

  • A real fresh-home launch of a build of this head. The next NEXT Nightly is the first real proof.
  • The UI journey and ws-switch callers (AFTER_RENDER) now start while the page is on top; they may still stop at the chat step (see "Not covered").
  • Possible follow-up from review: also require the parked home-dock page tab's selected: true, after checking a real snapshot.

Autofix with [code]smith
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the fresh-home launch smoke so a healthy first run with the Bring your history page covering Home is no longer reported as a failed Home render. Since #33215, a fresh home opens with that page on top and Home's tab unselected, so the validator rejected live healthy launches as "Home did not render within 90s" — failing CI with cannot-run and filing a false crash in the dogfood run.

  • The app records first_run.history_import_shown when the first-run page opens over Home.
  • The validator accepts an unselected Home tab only when that mark is present; an unselected Home without the page still fails.
  • Stub tests replay the fresh nightly topology end to end, and the failure text now reports whether the first-run mark was seen.