Repository navigation
[lexical-playground] Chore: Harden nested editor selection ownership test - #9243
Merged
Merged
Conversation
…test ## Description The nested-editor selection test clicked the external logo link, mixed DOM focus with selection ownership, and polled the two editors with separate reads. This left avoidable ambiguity in the WebKit collaboration failures. Use inert header clicks to leave the editors and actual clicks to enter them, with the root click positioned away from the image and caption. Disable the nested debug view through the existing playground setting because it clips the caption and prevents real clicks. Read both Lexical selections in one frame-aware evaluate call. Keep polling observational and label all five ownership checkpoints. On failure, report the last sampled Lexical selections, active element, document focus, DOM selection endpoints and owning editors, frame URL, and open page URLs. Preserve every ownership assertion, unsupported-mode skip, and timeout. This is test hardening; the cause of the original macOS WebKit flake remains unconfirmed. No production code changes. ## Test plan ### Before The original macOS WebKit collaboration failure was not reproduced in this Linux environment. No macOS runner was available, so there is no new macOS before/after evidence. ### After Targeted test: `keeps single active selection for nested editors` in `Selection.spec.mjs`. Ran the repository Playwright CLI with `--grep 'keeps single active selection for nested editors'`, `--repeat-each=10` for WebKit and `--repeat-each=5` for Chromium and Firefox, in rich-text and rich-text-with-collab modes. A local configuration launched the dev and collaboration servers, selected available browser binaries, and used one worker with zero retries. Test and assertion timeouts were unchanged. Ubuntu 24.04, Playwright 1.62.1, headless browsers. WebKit 26.5 WPE, Chromium 151.0.7922.34 headless shell, Firefox 153.0 with MOZ_DISABLE_CONTENT_SANDBOX=1 for the container. Actual final runner output: ```text WebKit, collaboration: 10 passed (2.2m) WebKit, non-collaboration: 10 passed (1.6m) Chromium, collaboration: 5 passed (41.4s) Chromium, non-collaboration: 5 passed (35.4s) Firefox, collaboration: 5 passed (1.4m) Firefox, non-collaboration: 5 passed (59.6s) ``` Initial parallel dev-server runs encountered navigation timeouts before the test checkpoints; the Chromium and Firefox results above are from sequential runs. Firefox logged ResizeObserver and Vite overlay errors during its passing runs. A temporary deliberately wrong ownership expectation failed after the existing 5000ms polling timeout and printed every required diagnostic field. Removed that probe afterward. ESLint with --max-warnings=0, Prettier, and git diff --check passed. macOS WebKit was unavailable; these results do not establish a fix for the original flake.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
marked this pull request as ready for review
September 26, 2026 20:57
etrepum
requested review from
acywatson,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
September 26, 2026 20:57
trueadm
approved these changes
Sep 27, 2026
trueadm
approved these changes
Sep 27, 2026
Merged
This branch was successfully deployed
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.
Description
The nested-editor selection test clicked the external logo link, mixed DOM focus with selection ownership, and polled the two editors with separate reads. This left avoidable ambiguity in the WebKit collaboration failures.
Use inert header clicks to leave the editors and actual clicks to enter them, with the root click positioned away from the image and caption. Disable the nested debug view through the existing playground setting because it clips the caption and prevents real clicks.
Read both Lexical selections in one frame-aware evaluate call. Keep polling observational and label all five ownership checkpoints. On failure, report the last sampled Lexical selections, active element, document focus, DOM selection endpoints and owning editors, frame URL, and open page URLs.
Preserve every ownership assertion, unsupported-mode skip, and timeout. This is test hardening; the cause of the original macOS WebKit flake remains unconfirmed. No production code changes.
Test plan
Before
The original macOS WebKit collaboration failure was not reproduced in this Linux environment. No macOS runner was available, so there is no new macOS before/after evidence.
After
Targeted test:
keeps single active selection for nested editorsinSelection.spec.mjs.Ran the repository Playwright CLI with
--grep 'keeps single active selection for nested editors',--repeat-each=10for WebKit and--repeat-each=5for Chromium and Firefox, in rich-text and rich-text-with-collab modes. A local configuration launched the dev and collaboration servers, selected available browser binaries, and used one worker with zero retries. Test and assertion timeouts were unchanged.Ubuntu 24.04, Playwright 1.62.1, headless browsers. WebKit 26.5 WPE, Chromium 151.0.7922.34 headless shell, Firefox 153.0 with MOZ_DISABLE_CONTENT_SANDBOX=1 for the container.
Actual final runner output:
Initial parallel dev-server runs encountered navigation timeouts before the test checkpoints; the Chromium and Firefox results above are from sequential runs. Firefox logged ResizeObserver and Vite overlay errors during its passing runs.
A temporary deliberately wrong ownership expectation failed after the existing 5000ms polling timeout and printed every required diagnostic field. Removed that probe afterward.
ESLint with --max-warnings=0, Prettier, and git diff --check passed. macOS WebKit was unavailable; these results do not establish a fix for the original flake.