Repository navigation
cmux NEXT: an agent page that never paints drops its loading spinner after 8 s (cx-txnr) - #21640
Conversation
…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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
…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>
|
Receipt for
|
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 sendspane.paintedfrom arequestAnimationFrame, 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, sincedebug.window_snapshotskips 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 throughmarkPainted, launch images, the New Tab frame cover and the paint hold all see a painted pane, and a latepane.paintedchanges 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
swift test --filter AgentPaneColdChatRevealTestsfailsaPageThatNeverPaintsDropsItsLoadingStateAtTheDeadline, because the loading view stays and the page stays at alpha 0.swift test --filter CmuxNextAgentPaneTests, 81 tests pass on cmux16, includingaPaneOutOfSightKeepsItsLoadingState(a pane parked outside the window's content never gives up).AgentPaneColdChatRevealTestspassed 5 runs in a row.🤖 Generated with Claude Code