Repository navigation
fix(webui): give a busy browser the time to answer, and a flaky click a definite target - #245
Merged
Merged
Conversation
added 3 commits
October 23, 2026 20:14
The isolated Chromium's command budget was fifteen seconds. On a loaded machine that is not a slow browser but a busy one: the same CI runner, with the same code, answered a page open in about half a minute and a pointer dispatch in seconds — and the fifteen-second budget turned that into a failure. The open was abandoned halfway, so the panel never received a frame and the person saw an empty browser instead of a slow one. The budget is a guard against a wedged browser, so it stays a bound, but it now fits the machine the browser runs on. The commands that wait for the browser to work on the page get a minute; an input command, which the browser answers without waiting for the page to do anything, gets half that, because a person is waiting for a click to land.
The WebUI group's files now run one at a time, and the Linux browser gate installs the browser's system dependencies — an apt run that takes between a minute and a quarter of an hour depending on the runner's cache. Together they put the Ubuntu verification job close to its twenty-five minute ceiling, and a job that is cancelled by the runner is a job that never reports. The ceiling is not a budget: a job that finishes in eleven minutes still takes eleven minutes. It has to fit the slow end of what the gate does, so the jobs that run the verification pipeline get the same forty minutes the CI verify job now has.
…guous The case opened the Agent form twice — once from the header's create menu, and once after dismissing the form again. Both clicks asked the page for "a button named 创建 Agent" without saying where that button had to be. The create menu mounts in an effect after its trigger is clicked, so the menu entry can still be missing a frame later — and the agent list carries a button of its own with the same name as soon as an agent form has been opened. Which of the two the query found therefore depended on whether the menu had mounted yet: sometimes it clicked the agent-list button and the case passed without ever going through the menu it meant to exercise, and sometimes both were on the page at once and Playwright's strict mode rejected the click. The query is now scoped to the menu and waits for the entry to be visible, so the click lands on the menu entry every time. No expectation changed. How it was verified: the case was run eight times in a row and the whole spec three times over; every run passed. The click can no longer reach anything but the menu entry, because the query now says where the button has to live.
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.
Change
Two budgets were too small for the machine the browser runs on, and both turned "slow" into "failed". A third change removes a race that had been letting a browser case pass for the wrong reason.
The browser's command budget. The isolated Chromium gave up on a command after fifteen seconds. On a loaded machine that is not a slow browser but a busy one. The evidence is the same runner with the same code: with a generous budget the browser panel case passed twice — the frame arrived 370ms and 1.4s after the page was opened, and the case finished in 78.7s — and with the fifteen-second budget it failed twice, both times with no frame at all. A page open on that runner takes about half a minute and a pointer dispatch takes seconds, so the old budget abandoned the open halfway: the panel never received a frame, and the person saw an empty browser instead of a slow one.
The budget is a guard against a wedged browser, so it stays a bound, but it now fits the machine. The commands that wait for the browser to work on the page get a minute; an input command — which the browser answers without waiting for the page to do anything — gets half of that, because a person is waiting for a click to land.
The verification jobs' ceiling. The WebUI group's files now run one at a time, and the Linux browser gate installs the browser's system dependencies: an apt run that took one minute in one run and thirteen minutes in the next, depending on the runner's cache. Together they put the Ubuntu job close to its twenty-five minute ceiling, and a job the runner cancels is a job that never reports. The ceiling is not a budget — a job that finishes in eleven minutes still takes eleven minutes — so every job that runs the verification pipeline now has forty minutes.
A browser case that could pass without testing what it meant to test. The agent form case asks the page for "a button named 创建 Agent" twice, without saying where that button has to be. The create menu mounts in an effect after its trigger is clicked, so the menu entry can still be missing a frame later — and the agent list carries a button of its own with the same name as soon as an agent form has been opened. Which of the two the query found therefore depended on whether the menu had mounted yet: sometimes it clicked the agent-list button and the case passed without ever going through the menu it meant to exercise, and sometimes both were on the page at once and Playwright's strict mode rejected the click. That is what turned the CLI release job red while the same case passed in the verification job two minutes earlier, on the same commit. The query is now scoped to the menu and waits for the entry to be visible, so the click lands on the menu entry every time. No expectation changed.
Validation
pnpm --filter @mavis/webui typecheck:client— clean.node --test test/source-sync.test.mjs— 58 passed, 1 skipped.Publication and contribution checks
release/public-source.json; new tests are declared intest/vitest-suites.jsonwhere applicable.Maintainer handoff
Publication scope or license changes (if any): none.
Shared-source port: not needed. Record public PR references only; keep private links and review material out of this PR.