Skip to content

chat: keep a real pointer from hovering the sticky request bubble test - #345320

Merged
Alexandru Dima (alexdima) merged 1 commit into
mainfrom
copilot/vscode/chat-sticky-hover-pointer
Oct 31, 2026
Merged

Alexandru Dima (alexdima) merged 1 commit into
mainfrom
copilot/vscode/chat-sticky-hover-pointer

Conversation

@bryanchen-d

Copy link
Copy Markdown
Collaborator

Main CI has failed on Linux X64 Unit Tests (Electron) since #344806 (491449, 491461, 491479, 491498), in ChatListWidget › uses the request bubble as the sticky source and content:

hoverRestoredState: {
+   sourceBackground: 'rgb(4, 5, 6)',   // hover color
-   sourceBackground: 'rgb(1, 2, 3)',
    sourceSynchronized: false,          // .request-bubble-hovered was removed

Cause

After the synthetic mouseleave, the test removes the class-driven hover (sourceSynchronized: false), but the bubble keeps the hover color. The only other rule that sets it is .rendered-markdown.clickable:hover (chat.css), so a real pointer is over the bubble. #344806 added electron-browser focus tests that focus the hidden test window's web contents and add and remove a focused WebContentsView. They run earlier in the single-page Electron run. On Linux (Xvfb), the window then takes part in pointer hover, and :hover matches whatever sits under the Xvfb pointer. PR CI splits the Electron suite across workers, which is why neither PR's own CI caught it. Root cause is posted on #344806.

Change (test only)

The test container gets pointer-events: none. The test only drives hover with dispatched mouseenter/mouseleave events, which still fire, so a real pointer can no longer apply :hover to the bubbles it checks. The product is unchanged.

Validation

  • Linux, the run that reproduces it: def 111 491516 on this branch, as a CI build with Linux only. Unit Tests (Electron), the full single-page run, passed with 69,453 passing, including ✔ uses the request bubble as the sticky source and content. The same job on main fails it every time.
  • Chromium locally: the test passes.
  • eslint is clean.

Authored with Copilot

Copilot AI balanced review requested due to automatic review settings October 31, 2026 00:55
@bryanchen-d

Copy link
Copy Markdown
Collaborator Author

SteVen Batten (@sbatten) this is the one-line test fix I mentioned on #344806. It sets pointer-events: none on the ChatListWidget sticky test's container, so the real Xvfb pointer can no longer apply :hover. The full single-page Linux Electron run passes with it (def 111 491516, 69,453 passing). If you'd rather fix the focus helper instead, I'll close this. cc Justin Chen (@justschen)

Co-authored with Copilot

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 active review issues remain for the test-only change isolating sticky-bubble hover assertions from real-pointer interference.

No open issues 🎉

What changed in this PR

Stabilizes the sticky request-bubble test against real-pointer hover interference in Linux Electron runs. Production behavior is unchanged.

Changes:

  • Sets pointer-events: none on the test container while preserving synthetic hover-event checks.
  • Adds a comment explaining why real-pointer hover must be excluded.

No actionable findings remain.

File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatListWidget.test.ts Isolates sticky-bubble hover assertions from the real pointer.

Review effort: Balanced

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified independently: I traced the red main builds to the same interaction. On Linux CI the Xvfb pointer rests at client (400, 300), over this test's container, and once the #344806 focus tests activate the window, Blink re-evaluates :hover after layout and scroll (RecomputeMouseHoverStateIfNeeded only runs for an active page). I reproduced the exact CI diff locally by activating the page through CDP focus emulation and injecting a pointer at (400, 300), and this change fixes it there. Build 491516 confirms it on Linux CI.

🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).

@bryanchen-d

Copy link
Copy Markdown
Collaborator Author

Alexandru Dima (@alexdima) thank you for verifying this independently and for readying it. Pinning it to the Xvfb pointer resting at (400, 300), plus RecomputeMouseHoverStateIfNeeded running only once the #344806 focus tests activate the page, is a sharper explanation than mine. Your CDP focus-emulation repro also confirms the test change targets the real trigger and doesn't hide a product hover bug.

The head is unsigned, so the gate still needs a second approval or Bryan's trusted-key signature. I'll sign as soon as he approves and won't push before then, so your auto-merge stays armed.

Co-authored with Copilot

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.

4 participants