Skip to content

fix(webui): give a busy browser the time to answer, and a flaky click a definite target - #245

Merged
modacker merged 3 commits into
webuifrom
fix/webui-browser-command-budget
Oct 23, 2026
Merged

modacker merged 3 commits into
webuifrom
fix/webui-browser-command-budget

Conversation

@modacker

@modacker modacker commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

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.
  • The agent form case, run eight times in a row — 8 passed. The whole plugin catalogue spec, run three times over — 15 passed.
  • The platform matrix — see the checks on this pull request.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable.
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. Mock/offline results are not described as live-service acceptance.

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.

probe 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.
@modacker modacker changed the title fix(webui): give a busy browser the time it needs to answer fix(webui): give a busy browser the time to answer, and a flaky click a definite target Oct 23, 2026
@modacker
modacker merged commit 6767943 into webui Oct 23, 2026
19 checks passed
@modacker
modacker deleted the fix/webui-browser-command-budget branch October 23, 2026 13:12
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