Skip to content

Artifact sharing test: answer every read Admin makes, so Earlier versions stays under the press - #2941

Merged
davidmckayv merged 1 commit into
mainfrom
fix/earlier-versions-webkit-click
Dec 4, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/earlier-versions-webkit-click

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

artifact-sharing-screens-layout.test.tsx failed 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.

  • The test's server answers every read Admin makes. Working together's setting (and a PATCH to it), and Admin's rail: no access requests waiting, and managed updates answered as unavailable, in the server's own words (as the other Admin layout tests answer them).
  • It records anything it has no answer for, and every test in the file expects none. A read added to these screens later fails the test plainly, instead of failing late and moving the screen under a press.
  • The admin test waits for the page a person sees as ready: Sharing, and Working together's row under it, before the first look and the first press. No fixed sleep.

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

  • New state that outlives a request? None. Test code only.
  • What happens on the second replica? Nothing changes: no server code.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • Every acting call still goes through the gateway: no server code changes.
  • New refusals and new failures each write a row: none added.
  • Nothing new is trusted from the client.

API and database

  • This changes nothing under api/, no app's requests, no database change and no release-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:

  • On main's test server: Working together's "Couldn't load" landed about 810ms after the page was ready. Earlier versions moved from y 549 to 585 (1440) and from 686 to 742 (390). The dialog did not open in any of the four.
  • With this branch's server: nothing landed late, the row stayed put for 5s, and the dialog opened in all four.

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-requests and management, 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-warnings and 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.

…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
davidmckayv merged commit c2a8977 into main Dec 4, 2026
73 of 75 checks passed
@davidmckayv
davidmckayv deleted the fix/earlier-versions-webkit-click branch December 4, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant