fix(cmux-next): keep live loading cover through chat draw hold

Merged
TE
10d ago
+70-10

Fixes the premature-reveal interval during relaunch described by Leo:

“on restarting after an update/maybe in general, we dont wanna see a black background on the agent chat ... feels weird.”

The native loading cover previously gave up after two visible checks (about 8 seconds) for every unpainted page. A live page that had completed its handshake could still be deliberately holding its first paint for CHAT_DRAW_HOLD_MS (10 seconds) while chat rows loaded. The host then revealed that still-empty page, producing the black or blank relaunch interval.

This rebuild of #24384 keeps the existing two-check bound for a silent page. Once the page handshake is observed, the counter resets and allows three further visible checks (12 seconds at the default 4-second interval), enough to clear the page's 10-second chat draw hold. With an immediate handshake, the first sample observes it at about 4 seconds, so the nominal fallback is about 16 seconds from pane creation; this is a fallback only, and the real paint signal removes the cover immediately. The timer and handshake reader are cancelled when the loading cover leaves, and the page's existing pane.painted signal still ends the cover immediately. No background, glass, or scroll behavior changes.

Validation

  • Deliberately red test commit 977a2c8bfa4e041443ce272c7e91c757c19b000b: focused AgentPaneColdChatRevealTests fleet job 58e30501f3a5a9b49e1ebb01 deliberately fails on the red test commit as expected: 9 tests, including the new handshaked-page regression, with the regression failing.
  • Fixed head b174485cc76567236140e45f8e5a8c3d53a9f471: focused fleet job 7faa9778e464875f292f2ac8 passes on aws-m4pro-5: all 9 AgentPaneColdChatRevealTests passed.
  • Local verify-local.py --swift-changed, Swift syntax, localization defaults, package groups, feature flags, prepush gate and git diff --check pass.
  • Independent review: Review (Astra): SHIP at b174485cc76567236140e45f8e5a8c3d53a9f471.
  • Current PR head 5c916d10a71d4f105d2aab05dbe68cf9fdc171b0 is a GitHub clean base merge. Reproducing merge-tree from parents b174485cc76567236140e45f8e5a8c3d53a9f471 and 2457dc6ae8022a6ece92dda9e315b040b190555d produces the exact merge tree c6a2977b099b8895ba9b5cb97c3e28bc5f9c6783; independent Astra merge-delta review is SHIP at this head.
  • Exact current-head native DEV build 1264d53b57f48f0470034633 completed on aws-m4pro-2; archive sha256:a717c1ec3002af5b1fc4cfa54050d35d3dc91dfc2b3b6dcca5e17e88cb855f0e.
  • Capture run 40513803406 ended without publication: the privacy scrubber rejected the fixture's cmux-capture text. No rejected frames were uploaded.

The loading-cover deadline fix is verified by the native red-to-green regression, exact-head DEV build and independent review. The full Chromium relaunch no-black capture follows once capture collects first-second launch frames; fanout-infra owns that collector work and sanitizing the fake-chat fixture.

Review (Codex gpt-6-astra xhigh): SHIP at 5c916d10a71d4f105d2aab05dbe68cf9fdc171b0

Changelog

Fixed - A loading chat keeps its native cover through the live page's chat-draw deadline.

Replaces the stale implementation in #24384; credit to its original diagnosis and tests.

Agent session: agent session