Repository navigation
Fix the environment fade E2E flake caused by bubbling descendant animation events - #2005
Conversation
The fade test listened for animationstart with { once: true }. Revealing a
panel restarts its topology animations, whose bubbling animationstart events
can reach the panel before the fade's own event and consume the listener.
Co-authored-by: Copilot <[email protected]>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for this test-only fade-recording change.
No open issues 🎉
What changed in this PR
Fixes a test-only homepage environment fade flake caused by bubbling descendant animation events consuming a one-shot listener. Product code and rendered output remain unchanged.
Changes:
- Adds
recordPanelFade()to record only the panel’s own fade animation and remove the listener afterward. - Reuses the helper in the existing fade and long-task tests without changing assertions, timeouts, or retries.
- Adds a regression test that dispatches a descendant animation event before triggering the panel fade.
| File | Description |
|---|---|
src/frontend/tests/e2e/homepage.spec.ts |
Centralizes fade recording and adds coverage for descendant animation events arriving first. |
Review effort: Balanced
Project documentation assessment: not applicableReviewed the complete changed-file list and diff at head Phase A - Claim verification: no documentation claims found (0 verified, 0 verified-with-nuance, 0 unverifiable, 0 contradicted). No external Aspire/Toolkit/Azure source lookup is applicable or was performed. Phase B - Blind documentation testing: not applicable: there are no changed documentation routes or instructions to exercise. No docs server, browser documentation walkthrough, CLI examples, or sample projects were run. Critical issues, warnings, passed checks, recommendations, and knowledge-gap findings are all N/A, not claimed as tested/passed. Phase C - Combined assessment: no documentation findings; this is a test-only PR. The applicable code review follows separately. This applicability assessment is a conversation comment, not a formal approval or change request, and consumes this Project's once-per-PR documentation stage regardless of later head updates. |
Project code review: no findingsReviewed the complete test-only diff at
I traced the unchanged production behavior in Test coverage and evidenceIn CI run 41162894318, whose recorded head SHA exactly matches the inspected head, I inspected the individual job-log entries for these three tests: Limits: no local browser/E2E/unit/build commands or independent fail-before experiment were run in this review; the checkout has no installed frontend dependencies and Bun is unavailable. Runtime evidence above is head-matched CI evidence, not a local rerun or endorsement of unrelated checks. Firefox, WebKit, physical devices, prolonged stress/repeat runs, and unchanged behavior outside the fade recorder were not independently exercised. No source edits, branch switches, pushes, fixes, formal approvals/change requests, or merges were performed; no local server/browser processes or temporary artifacts were created. This comment follows the documentation applicability assessment and consumes this Project's once-per-PR code-review stage regardless of later head updates. |
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Approved following the completed Project docs applicability and clean code review at this unchanged head, approval recommendation, and passing CI. Approval and merge authorized by the user.
Summary
Fixes a recurring retry-only E2E flake in
tests/e2e/homepage.spec.ts› "fades environment changes and pauses independent resource motion". No open issue tracks it. It still occurs after #1993 because #1993 fixed a different root cause, in product code.Signature, from all three projects:
Occurrences since #1993 merged (2026-10-30 13:20Z): the test passed only on retry in these CI jobs:
Root cause (test-only): the test recorded the fade with an
animationstartlistener registered with{ once: true }and no target check. Revealing a panel restarts its topology animations, such astopology-node-idleandtopology-cycle-four, and theiranimationstartevents bubble to the panel. When one of them is dispatched before the panel's ownenvironment-panel-fade-inevent, it consumes the one-shot listener. The real fade then goes unrecorded, even though it ran. The product behavior is correct: the snapshot above showsdata-transition="fade-in"on the panel.Fix: a shared
recordPanelFade()helper. It only acceptsenvironment-panel-fade-inevents whose target is the panel itself, and removes its listener after recording one. The two inline listeners in the fade test and the one in the long-task fade test now use it. No assertions, timeouts or retries changed, and the product code is unchanged.Regression test: "records the environment fade when a descendant animation starts first". It dispatches a bubbling
animationstartfrom a topology card before clicking Test, then asserts that the panel's own fade is still recorded. This deterministically reproduces the ordering seen in CI.This doesn't change any rendered output, so there are no screenshots.
Third-party links and affiliations
None.
Validation
Reproduced on unmodified
main(f05f556): I ran a local dev server, loaded a fresh page in a mobile 390×844 context each time with no CPU throttling, and made the first Test click while recording events with both the old one-shot listener and a persistent listener.animationstartreaching the panel came from a descendant (topology-node-idleortopology-cycle-four), and the old listener missed the fade.Fail before, pass after:
{ once: true }listener: 9/9 failed (3 projects × 3 repeats),Received: "false".data-transitionsettle assertion timed out after 2s.Other checks:
npx vitest run: 84 files, 1,120 passed, 1 skipped.npx eslint . --max-warnings 0: clean.🤖 Posted by AspireAgent (AI Agent)