Repository navigation
test(browser): open the message-link context menu by keyboard - #1884
Merged
Merged
Conversation
"a message link's context menu opens its thread as a tab without leaving
the channel" flaked on WebKit CI (runs 40809436911, 40568494289,
40449417643) with an empty menu after `link.click({ button: "right" })`.
The first attempt met Virtua's 150 ms pointer-event hold, so the
channel timeline section intercepted it. Playwright's retry scrolled the
timeline 53 px, restarting the hold, and reported success because it
checks the hit target only on the press; the contextmenu event reached
the scroller and the link's trigger never ran.
The link's ContextMenuTrigger in MessageLink.tsx opens its menu on
Shift+F10 and the ContextMenu key, anchored to the link, and
MessageLink.test.tsx covers both keys. This journey is about the
composed menu, preview and tab owner, not hit testing, so focus the
link and press Shift+F10, as the activation journey earlier in the spec
already does with Enter.
Other right-clicks on message links:
- navigation-thread-history.spec.mjs right-clicks a link in the thread
panel, which is not virtualized, so it has no hold and keeps the real
pointer path for the link menu.
- external-links.spec.mjs right-clicks a channel-timeline link after
end() without virtuaIdle and shares the exposure. It is not known to
flake and is the remaining timeline pointer path, so it is unchanged.
Verification (local macOS, Playwright Chromium and WebKit; the repo
defines no Firefox project):
- With the hold kept active by a 1 px scrollTop nudge every frame
(scratch spec, not committed), Shift+F10 opened the menu in both
engines; the right-click timed out with an empty menu in both.
- The fixed test with --repeat-each=40: WebKit 40/40, Chromium 40/40.
- buzz-links.spec.mjs in full: WebKit 9/9, Chromium 9/9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
matt2e
marked this pull request as ready for review
October 29, 2026 04:51
kazemek21
approved these changes
Oct 29, 2026
kazemek21
left a comment
Contributor
There was a problem hiding this comment.
Kyle reviewed the PR and the Nexus review-tracker notes and approved with no comments.
Posted by Codex (gpt-6.1-sol) on behalf of kylez
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
Fixes a WebKit CI flake in
buzz-links.spec.mjs: "a message link's context menu opens its thread as a tab without leaving the channel" sometimes found an empty menu afterlink.click({ button: "right" })(runs 40809436911, 40568494289, 40449417643).Cause: the right-click hit Virtua's 150 ms pointer-event hold, so the channel timeline scroller intercepted it. Playwright's retry scrolled the timeline 53 px, which restarted the hold. Playwright only checks the hit target on the press, so it reported success even though the
contextmenuevent went to the scroller and the link's trigger never ran.Fix: focus the link and press Shift+F10.
MessageLink'sContextMenuTriggeralready opens on Shift+F10 and the ContextMenu key, anchored to the link, andMessageLink.test.tsxcovers both keys. This journey tests the menu, preview and tab owner working together, not hit testing. The activation journey earlier in the same spec already uses the keyboard (Enter).Only the test changed; product code is untouched.
Browser coverage
navigation-thread-history.spec.mjsright-clicks a link in the thread panel. That panel isn't virtualized, so it has no hold.external-links.spec.mjsright-clicks a channel-timeline link. It has the same exposure but isn't known to flake, so it's unchanged.Verification (local macOS, Playwright Chromium + WebKit; the repo has no Firefox project)
scrollTopnudge every frame kept the hold active. The right-click timed out with an empty menu in both engines; Shift+F10 opened the menu in both.--repeat-each=40passed 40/40 on WebKit and 40/40 on Chromium.buzz-links.spec.mjspassed 9/9 on WebKit and 9/9 on Chromium.Remaining gaps
external-links.spec.mjsstill has the same timeline right-click exposure.🤖 Generated with Claude Code