Skip to content

chat: finish image reveal tests without waiting for the real-time deadline - #342242

Merged
Alexandru Dima (alexdima) merged 1 commit into
mainfrom
agents/test-perf-chat-image-reveal
Oct 17, 2026
Merged

Alexandru Dima (alexdima) merged 1 commit into
mainfrom
agents/test-perf-chat-image-reveal

Conversation

@alexdima

Copy link
Copy Markdown
Member

The animated generated-image layout tests already seek the reveal animations to their end, but then polled in real time until the reveal's ~4.5s deadline timer removed the revealing class. Finish the reveal through its reduced-motion cleanup instead, which runs the same effect cleanup as the deadline. The deadline path itself stays covered with virtual time in chatImageReveal.test.ts.

The 10 animated cases drop from ~3.5-3.9s to ~60ms each.

Part of a series that speeds up unit tests waiting on real time, found from the slow tests in the Linux Electron unit test job. Each change is a separate PR so it can be reverted on its own. Test files only; no assertions changed.

How to test

npm run build-fast -- --client-only
./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts

Results on macOS, with only this commit applied on top of 832a728:

  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts: 837 passing (14s), 1 pending

…dline

The animated generated-image layout tests already seek the reveal animations to their end, but then
polled in real time until the reveal's ~4.5s deadline timer removed the `revealing` class. Finish the reveal
through its reduced-motion cleanup instead, which runs the same effect cleanup as the deadline. The deadline
path itself stays covered with virtual time in chatImageReveal.test.ts.

The 10 animated cases drop from ~3.5-3.9s to ~60ms each.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues remain in this focused test-only change; layout assertions and separate deadline coverage are preserved.

No open issues 🎉

What changed in this PR

Speeds up generated-image layout tests by completing reveal cleanup without waiting for the real-time deadline.

Changes:

  • Adds a controllable reduced-motion event to the accessibility stub.
  • Replaces deadline polling with synchronous cleanup, preserving layout assertions and separate deadline coverage.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatListRenderer.test.ts Finishes animated reveals through reduced-motion cleanup instead of real-time polling.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 9a59550f Current: 202d7d74

Changed (1)

chat/aiCustomizations/aiCustomizationManagementEditor/PluginMarketplaceMigrationDisabled/Light
Before After
before after

@alexdima
Alexandru Dima (alexdima) merged commit 15c7b0a into main Oct 17, 2026
50 checks passed
@alexdima
Alexandru Dima (alexdima) deleted the agents/test-perf-chat-image-reveal branch October 17, 2026 10:14
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants