Skip to content

cmux NEXT: an agent page that never paints drops its loading spinner after 8 s (cx-txnr) - #21640

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
leo/next-newtab-fixes
Oct 18, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
leo/next-newtab-fixes

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

After a relaunch with restored workspaces, New Tab and chat pages could stay on their loading spinner for good (cx-txnr). An agent pane hides its page under a native loading view until the page sends pane.painted, and that view had no deadline. The page sends pane.painted from a requestAnimationFrame, which WebKit holds for a page it treats as not visible, such as a restored window that is occluded or not yet shown. When that frame never came, the pane kept the spinner over a clear (alpha 0) web view. That also matches the report that a window snapshot sees no webview, since debug.window_snapshot skips alpha-0 web views.

The loading view now checks a page that hasn't painted every 4 s. Once two checks in a row see the pane, it counts the page as painted (markPainted) and shows it as it is. "Seeing the pane" means its window is ordered in, the pane isn't hidden, and it lies inside the window's content. That gives a page 4–8 s in sight, like the pane's other covers (PanePaintHold.limit, the launch image). Out of sight it waits: a New Tab spare parked outside the content, a hidden tab, or a window ordered out. Because giving up goes through markPainted, launch images, the New Tab frame cover and the paint hold all see a painted pane, and a late pane.painted changes nothing.

Not established: which trigger the nxdog88 relaunch hit. The candidates are an occluded window at restore, a New Tab page with an unsent draft restored as a chat page (which keeps the cover), or a stalled acpmux handshake. This ends the stuck spinner in all three cases. A slow handshake shows its page after 4–8 s in sight instead of the cover.

Changelog

Fixed: After a relaunch, New Tab and chat pages no longer stay on a spinner when the page never reports its first paint.

Verification

  • Red, e4e483e (test only): swift test --filter AgentPaneColdChatRevealTests fails aPageThatNeverPaintsDropsItsLoadingStateAtTheDeadline, because the loading view stays and the page stays at alpha 0.
  • Green, bd7c416: swift test --filter CmuxNextAgentPaneTests, 81 tests pass on cmux16, including aPaneOutOfSightKeepsItsLoadingState (a pane parked outside the window's content never gives up). AgentPaneColdChatRevealTests passed 5 runs in a row.
  • Not dogfooded: no tagged-build relaunch repro yet.

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 18, 2026 06:23
…a deadline (cx-txnr)

Red: AgentPaneColdChatRevealTests.aPageThatNeverPaintsDropsItsLoadingStateAtTheDeadline
fails; the loading state stays over a clear page for good.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te after 8 s (cx-txnr)

After a relaunch a restored page whose window WebKit treated as hidden
could hold its requestAnimationFrame, so pane.painted never came and the
pane kept its spinner over a clear page with no deadline. The loading
state now gives up at AgentPaneLoadingView.paintLimit and shows the page;
leave() runs once, so the late paint does not fade it again.

Green: CmuxNextAgentPaneTests (80 tests) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 545c6c9b-95f5-4515-af34-c2bf67e1e116

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Not verified: macOS jobs did not run: compile and app tests were skipped on bd7c4160f3; ci-status is green without them.

CI passes on bd7c4160f3 (run 39131943723 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

…ight, through markPainted (cx-txnr)

Review: the 8 s clock started at init, so a parked spare or a hidden tab
gave up unseen, and giving up left hasPainted false, so launch images, the
New Tab frame cover and the paint hold still treated the pane as unpainted.
The loading view now checks every 4 s and gives up after two checks in a
row that see the pane (window ordered in, pane not hidden and inside the
window's content); giving up calls markPainted. The check interval is per
view, so tests no longer change a shared static.

Green: CmuxNextAgentPaneTests, 81 tests pass; AgentPaneColdChatRevealTests 5/5 runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Receipt for bd7c416 (this PR's head; a new push replaces it)

  • Visual review: HQ feed card · gallery before/after runs
  • Checks: this head
  • App of this head (app.zip, kept 1 day): gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr21640 -f ref=leo/next-newtab-fixes -f platform=macos -f backend_mode=local

@teamleaderleo
teamleaderleo merged commit d182580 into feat-cmux-next Oct 18, 2026
128 of 137 checks passed
@teamleaderleo
teamleaderleo deleted the leo/next-newtab-fixes branch October 18, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant