Repository navigation
Sidebar test suites close the windows they open (20 suites, 84 windows), with .closesItsWindows - #27126
Conversation
Leo, 2026-10-28, on Swift suites that leave windows open for the suites after them: "But why do you guys not just clean up after yourselves, or at least do your best to?" Twenty sidebar suites hid their windows with orderOut(nil) or never closed them, so each one stayed in NSApp.windows for the rest of the test process. Each test now closes what it opens in its own teardown: - teardown orderOut(nil) becomes close() (isReleasedWhenClosed = false where the test made the window and had not set it); - SidebarDoneFoldTests closes the window it never closed; - SidebarRowsMoveOnRenderServerTests closes its window in restore, and before the screen require throws; - SidebarMenuAnchorTests closes the group editor bubble hide() keeps; - SidebarOneMorphingCardTests closes the hover card window, attached or not; - SidebarSearchOpensCenteredTests closes the palette panel hide() keeps. Every fixed suite takes .closesItsWindows, so a new leak fails it by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Owned by an agent session · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 39bb822 to compare; do not merge until green; see lane-rules |
|
Bead |
|
Review (codex gpt-6-astra high, next-review): SHIP at 720a050 No blocking findings. |
|
Owned by an agent session · session |
|
Red-by-red base comparison for 720a050:
The broad window run after this PR reported 0 windows open at exit (fleet step e0afb44a3cdb38f7111f3f9f9). |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at bceb24c SHIP No actionable findings. Window cleanup and the 1.5 pt expectation match the current implementations. AppKit tests could not run in this Linux box without Swift. |
|
Shipped in:
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, on Swift suites that leave windows open for the suites after them: "But why do you guys not just clean up after yourselves, or at least do your best to?"
The first batch of suite fixes on top of #27003 (the window census and the
.closesItsWindowscheck): the 20 sidebar suites in CmuxNextAppTests that the census named as leaking. Each now closes every window it opens in its own teardown, and carries.closesItsWindows, so a new leak fails that suite by name.What leaked and why
window.orderOut(nil), which hides a window but leaves it open in the app's window list: SidebarBackgroundChangeCalm, SidebarCalmMotion, SidebarChannelsAfterHome, SidebarCloseWhileScrolled, SidebarFocusedVisible, SidebarInsertWhileDisplayAsleep, SidebarListTilePress, SidebarNewRowInPlace, SidebarPinnedRowWidth, SidebarRevealSelection, SidebarRowHoverFollow, SidebarRowHoverGap, SidebarRowHoverInset, SidebarSelectionRevealsTop, SidebarUniformRowSpacing. Nowclose()(withisReleasedWhenClosed = falsewhere the test made the window).hide()keeps its panel for the next open (deliberate reuse), so the tests now close that panel too.hide()keeps its panel (deliberate reuse); teardown closes it.No product code changes. The row-edge assertion now checks the documented 1.5 pt contract; its old minimum-width assertion contradicted that behavior.
Performance
At head
bceb24c8e54cdddc0d857a838df4c72d42bf6027versus base39bb822b0f83b92593e93f542b71bfd61fbe1150, the same 20 suite filters each completed with a final summary and exit census on both sides.package-test-lane.sh suite; base step8b4c36d7d222b3a7bb1008c8, head step038fdffbObserved / Not run
The focused head run completed all 96 test definitions: 19 suites passed; SidebarOneMorphingCardTests completed with two failures. Both
goingFromAWorkspaceCardToTheUpdateCardMorphsTheOneCardandgoingFromTheUpdateCardToAWorkspaceCardMorphsBackAndParksTheHighlightsfail the same size assertions with empty animated-size arrays on base. The shared classifier reports no new focused failure. SidebarRowHoverFollowTests now passes.Independent source review passed at this head, and the fleet Release compile passed. The broad Swift job was killed after 1500 seconds with exit 143, ten unfinished tests and no final summary. It recorded 1,056 WindowServer-owned windows. That incomplete run is a validation blocker; the focused improvement does not establish full-package cleanup. Complete paired broad validation is pending.
The two No new SwiftUI findings are inherited: the offending ChatColors files, guard and allowlist match base. The sidebar-record warning entered through the CI merge tree. Neither classification waives the incomplete runtime run.
Risk: test-only.
Changelog
none
Agent session: agent session