cmux NEXT tests: resting in the hover slot needs no timer to show no card (base red)

Merged
TE
16d ago
+6-2

Base red: SidebarHoverCardEscapeTests/restingInTheSlotShowsNoCard fails on feat-cmux-next. The error is at SidebarHoverCardEscapeTests.swift:133: Caught error: no timer went to sleep on the manual clock within 2.5 s.

The test rests the pointer in the empty slot beside a workspace row. It expects no hover card to show after the hover delay. The test came from #22473, when that point still started a hover timer: the sidebar margin hit-tested as the row, and the slot logic refused the card when the timer fired. Since then the row's hover stops short of the margin, so the slot starts no card and no timer at all. That is the behaviour the test wants. But the test called clock.waitForSleeper() first, and that throws when no timer sleeps. So it failed before it could check that no card shows.

The fix is in the test only. It waits out the delay only when a card is pending (coordinator.machine.activeTarget != nil), and checks that no card shows either way.

Changelog

none

Testing

Focused command: cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref <sha> --label ci-steps --label suites --arg suite --arg Packages/macOS/CmuxNext --arg SidebarHoverCardEscapeTests

  • Red on base e9590e04 (fleet step 613a8a8c, aws-m4pro-8): restingInTheSlotShowsNoCard fails at :133 with the error above; the other 6 tests pass.
  • Green on head 4cba4a75 (fleet step 476e2677, aws-m4pro-9): all 7 tests pass.

There is no separate failing-test commit: the red is the existing test on base.

Observed / Not run

  • Observed: the two fleet runs above. In the same base run, GroupHeaderNewWorkspaceTests passes at e9590e04, after c6bb043b, so it is not part of this PR.
  • Not run: I did not bisect the exact commit that stopped the margin from hit-testing as the row. It lies between #22473 (032f274a) and 6d5ca52f; the test fails at #22733's parent too.

No capture: test-only change, no UI changes.

šŸ¤– Generated with Claude Code

Agent session: cosmic-gray


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes SidebarHoverCardEscapeTests.restingInTheSlotShowsNoCard on feat-cmux-next, which failed because it called clock.waitForSleeper() when the slot now starts no hover timer at all. The test now waits out the hover delay only when a card is pending (coordinator.machine.activeTarget != nil) and checks that no card shows either way.

Testing

  • Red on base e9590e04: the test fails with no timer went to sleep on the manual clock; the other 6 tests pass.
  • Green on head 4cba4a75: all 7 tests pass.
  • Test-only change, no UI changes.