test(desktop): scope slash-menu mutation watch to the menu and read once - #3737
Merged
Astro-Han merged 1 commit intoAug 25, 2026
Merged
Conversation
The watch armed on document.body with subtree:true for the whole poll window and counted any removed element containing a listbox or group, so an unrelated overlay unmounting within 3s reported the apache#2667 regression. Because the counter only increases, expect.poll could never retry into success - it added latency, not tolerance. Scope it to the guarded property instead: one observer on the listbox (subtree) catches a group torn down inside it, one on its parent catches the whole listbox being replaced. Disconnect after the refresh rounds settle and read the count once. Verified locally (xvfb): spec green 5/5 across six runs; an injected group teardown during the window still fails the test (removals=1), so the narrowing does not mute the regression it guards. Fixes apache#3727
Astro-Han
reviewed
Aug 25, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
I reviewed this head and found no blocking issues. No P0-P2.
Checks on 7dfa534 are test: success.
简体中文
该头未发现阻断问题。
6 tasks
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 free
to 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.
Summary
Implements the direction suggested in #3727 for the slash-command-menu flake:
document.bodywithsubtree: true. Overlays elsewhere in the document (toasts, tooltips, other popups) can no longer contribute removals to the counter.expect.pollon a monotonically increasing counter could never retry into success - it only added 3s of latency before failing.retries: 0) is untouched.Why this is safe
The guarded property (#2667) is "a same-content projection refresh must not tear down the skills group or the listbox". The new watch counts exactly two things during the refresh window: a
[role="group"]removed inside the menu, or the listbox element itself removed. Anything else was noise under the old predicate, which counted any removed element containing a listbox/group anywhere in the document.Verified locally under xvfb (Electron 43):
removals = 1- the narrowing does not mute the failure mode the test exists to catch.Note on artifacts
The trace/video artifacts from the five failing runs linked in the issue had already expired, so I could not diff them directly; the code-path analysis above is the basis for the window-scope reading.
Fixes #3727