Uh oh!
There was an error while loading. Please reload this page.
test(desktop): poll animation landings instead of guessing their duration - #2452
Merged
jackwener merged 1 commit intoAug 7, 2026
Conversation
…tion Part of apache#2389. Four desktop e2e waits guessed at CSS transition durations with flat 500-600ms sleeps, and one guessed at layout settling with 250ms: - prompt-rail: the indicator glide, the rail's self-scroll alignment, and the hover swell/settle now poll the asserted geometry itself via the repo's existing expect(...).toPass() idiom — the wait ends the moment the transition lands and only a failing test pays the budget. - new-messages-indicator: the pre-scroll settle now waits for the observable layout fact (scrollHeight stable across two consecutive animation frames) before driving the extra scroll cycle. Preserved real-timer windows, now documented with their derivation: - quote-companion's two 500ms holds outlive the hook's SELECTION_SETTLE_MS (350ms) to prove the layer stays hidden after the settle window elapses — the absence is the contract, so the wait is the mechanism. - The 90ms drag cadence (deliberately inside the 350ms settle window), titlebar-identity's one-shot toast-absence read, and bot-onboarding's fixture-scheduled provider timing are untouched: each wait is the contract, not a guess. Timing: the three suites run in the same ~20s wall locally (Playwright overlaps workers, so the removed sleeps were latency-hidden); the change removes their load sensitivity — the polls track the asserted fact under any scheduler, where the fixed sleeps lost races on loaded CI runners. 15/15 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2389 (desktop e2e workspace; Pi TUI landed as #2448, Runtime Host as #2450, the alignment audit follows separately).
What changed
Five waits guessed at durations the page can be asked about directly:
prompt-rail× 4 (indicator glide ×2, hover swell, hover settle)waitForTimeout(500-600)then one-shot geometry readexpect(...).toPass()polling the asserted geometry itself (the repo's existing idiom, cf.composer-skill-invocation.spec.ts) — ends the moment the transition lands, and only a failing test pays the budgetnew-messages-indicatorpre-scroll settlewaitForTimeout(250)waitForFunctionon the observable layout fact:scrollHeightstable across two consecutive animation framesAudited and preserved (each wait is the contract)
quote-companion's two 500ms holds — real-timer negative windows now documented with their derivation: they outlive the hook'sSELECTION_SETTLE_MS(350ms) to prove a dismissed/composer selection stays hidden once the settle window has elapsed. The absence is the contract; there is no earlier observable.titlebar-identity's 1s one-shot toast-absence read — its comment already explains why a retrying matcher would mask the bug.bot-onboarding's 1.15s/1.3s waits — synchronized against fixture-scheduled provider results, not animation guesses.Timing
The three touched suites run in the same ~20s wall locally (Playwright overlaps workers, so the removed sleeps were latency-hidden). The gain is load-tolerance, not wall time: the fixed 500/600ms reads lost races on loaded CI runners (the #2221/#2332 failure shape), while the polls track the asserted fact under any scheduler. 15/15 tests pass before and after.