test(site/src/modules/workspaces): cover version picker stacking - #28154
Open
david-fraley wants to merge 1 commit into
Open
test(site/src/modules/workspaces): cover version picker stacking#28154david-fraley wants to merge 1 commit into
david-fraley wants to merge 1 commit into
Conversation
The Change version dialog's picker is a popover that portals to the document body, outside the dialog. In 2.36.0 it painted underneath the MUI dialog surface, so the options were visible to queries but could not be clicked. Existing stories never opened the picker, so nothing caught it. Add a SelectVersion story that opens the picker, hit tests an option against document.elementFromPoint, then selects it and confirms. The hit test is the part that matters: a plain click passes even when the popover is layered behind the dialog.
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.
Closes ENG-3175 on
main.Context
ENG-3175 reports that the Change version dialog's picker is unusable, hidden behind the dialog backdrop. The report is accurate for 2.36.0, but
mainis already fixed. This PR adds the regression guard that was missing, rather than a redundant fix.What happened: the picker is a Radix popover that portals to
document.bodywithz-50. #24276 swapped this dialog's MUIAutocompletefor that popover on 2026-07-14, while the surrounding dialog was still@mui/material/Dialogatz-index: 1300. Two body-level portals,50loses to1300, so the options painted under the dialog surface. #27506 moved all dialogs onto Radix on 2026-07-31, which fixed the stacking incidentally, but it landed after the 2.36 branch cut. So 2.36.0 shipped broken andmaindid not.Why nothing caught it: the dialog has four stories, and none of them open the picker. Even if they did, a plain
userEvent.clickon an option succeeds while the popover is layered behind the dialog, because testing-library does not hit test.Change
Adds a
SelectVersionstory that opens the picker, hit tests an option againstdocument.elementFromPoint, then selects it and confirms. Storybook stories run in real Chromium via thestorybookvitest project, so the hit test is meaningful in CI.Validation
The guard was run against both trees to confirm it detects the reported bug rather than just passing.
vitest run --project=storybook ChangeWorkspaceVersionDialog.stories.tsxmain(this branch)v2.36.0(story cherry-picked in)Measured in a headless Chromium against each tree's Storybook, with the picker open:
v2.36.0mainz-index1300(MUI)50(Radix)z-index5050div.css-az7ti9(the dialog)Also ran
biome checkandtscclean on the changed file.Screenshots
Screenshots of both trees with the picker open are attached in the originating chat: on
v2.36.0the dialog is unchanged after clicking the trigger (the list is behind it), onmainthe list renders above the dialog.Note on 2.36.x
This PR does not fix released 2.36. Customers on 2.36.0 still hit this. A backport would be a one-line z-index bump on
ComboboxContentin that dialog. Backporting #27506 itself is not advisable, it touches ~30 dialogs.