Repository navigation
Artifact sharing test: answer every read Admin makes, so Earlier versions stays under the press - #2941
Merged
Conversation
…ions stays under the press The test's server had no answer for Working together's setting. The read failed, was asked again a second later, and its "Couldn't load" line then pushed Version history down, sometimes in the middle of the press on Earlier versions in WebKit, so the dialog never opened. The server now answers Working together and Admin's rail, records anything it can't answer, and every test in the file expects none. The admin test waits for Working together's row before it looks or presses.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
December 4, 2026 15:53
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.
What this changes
artifact-sharing-screens-layout.test.tsxfailed now and then in WebKit on CI: "an admin turns public links off and opens version history" pressed Earlier versions and the dialog never opened (merge-queue run 47364024878 in webkit-dark-390, and run 47136811563 in webkit-dark-1440).The cause is the test's fake server, not the page. Admin, Artifacts reads the Working together setting (
GET /settings/artifact-collaboration), and the test's server had no answer for it. The read failed with a 404, was asked again about a second later (the query client's one retry), failed again, and only then did the section draw its "Couldn't load the artifact settings" line. That line pushes Version history down: 36px in a wide window, 56px at a phone's width, more than half of the Earlier versions row. The test's steps take about as long as that retry in WebKit, so the line sometimes landed in the middle of the press: the press began on the row and ended above it, the click went to the page rather than the row, and the dialog never opened. Chromium runs the steps faster and is usually past the press by then.The real server answers that read, so a person doesn't see this. The test was also measuring and photographing a page with Working together empty, which no person sees either.
Test-only. Nothing a deployment runs changes.
How others handle it. Playwright checks that an element is stable and receives the click at the moment it acts, not across the press (Playwright, Actionability), so a layout shift between the press and the release is the page's to prevent. The usual rule for a fake server is that a request it doesn't handle is an error, not a silent 404: Mock Service Worker's
onUnhandledRequest: "error"(MSW, listen()). Playwright's own mocking guide routes every endpoint before the page loads (Playwright, Mock APIs). This follows both.Where it runs
Boundary and audit
API and database
api/, no app's requests, no database change and norelease-policy.json.Changelog
None: test-only, nobody running OpenBot would notice.
Proof
The lost press, reproduced on purpose (a throwaway probe, not committed, in WebKit, light and dark, 1440 and 390). Open Admin, Artifacts, press down on Earlier versions, wait for the late section to draw, then release:
Red/green on the committed test. With the Working together answer removed, the admin test fails at its readiness wait, since that section never draws its row (webkit-light-1440). With it, it passes.
The file, locally, once, in Chromium and WebKit: 40 pass, 0 fail. Before this change, the same run logged three paths the server had no answer for:
settings/artifact-collaboration,app-access-requestsandmanagement, each asked again a second later.Screens. Before, Admin, Artifacts was photographed with Working together empty at first, and Version history jumped down mid-test once the error line drew. After, every step shows Working together's "Show who has an artifact open" row, and Earlier versions stays in one place from the first look to the dialog.
Checks:
biome format,biome lint --error-on-warningsand the app's typecheck are clean on the changed file.The WebKit shards on CI run the file under load; this PR's run is the green.