What Problem This Solves
Fixes the saved cloud-startup toast recovery E2E failure after a private-draft discard reload, which blocks otherwise unrelated UI pull requests.
User Impact
No user-visible change. The test continues to check that recovery preserves the separate private draft, replays the saved first turn exactly once, and retains the later draft and queued message.
Why This Change Was Made
Introduced by 4606ea5 (#168506), which intentionally made the automation readiness observer lazy. After the dialog-triggered reload, observing sessions.send proves the Gateway replay started, not that the renderer readiness hook has loaded. The next synchronous navigation helper read starts that lazy import but receives undefined and throws Control UI readiness hook is unavailable.
Await the existing initial-roster/readiness helper before navigating in the toast branch. This preserves lazy production loading and all existing assertions and timeouts; it adds no alternate recovery or navigation path.
No overlap with Pash/Sarah changes.
Evidence
The unchanged test fails on main with two passing cases and the toast case reporting
Control UI readiness hook is unavailable. The same failure is visible in the inherited UI shard, and another PR's UI shard. Existing main reproduction evidence was reused rather than rerun.
Candidate production-bundle Chromium run: 3/3 passed, including toast recovery (31.949 s). Command:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts ui/src/e2e/new-session-page.cloud-startup.runtime-load.e2e.test.ts --maxWorkers=1. Full duration: 155.67 s.
Targeted
oxfmt --checkpassed. The first local attempt could not build because the copied installation lacked@solidjs/vite-plugin; a frozen dependency install restored the worktree and the full scenario then passed.
Merge danger: two-way door; reverting restores only the test synchronization defect. Blast radius is this production-bundle recovery E2E scenario; no product code, persisted state, or public contract changes.
Co-authored-by: Ayaan Zaidi [email protected]