Skip to content

fix(webui): give each failing WebUI CI case a cause of its own - #49

Merged
Fectivnfy112357 merged 16 commits into
mainfrom
fix/webui-ci-failures
Nov 20, 2026
Merged

Fectivnfy112357 merged 16 commits into
mainfrom
fix/webui-ci-failures

Conversation

@Fectivnfy112357

@Fectivnfy112357 Fectivnfy112357 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Change

The WebUI CI was red on ubuntu, windows and macOS. Every failure had a cause of its own, and each of them is fixed here:

  • The inserted asset was moved off the centre of the pane. The library inserts an asset at the centre of the pane, and the products of a run are laid out next to their source. A grid is laid out again once the media of its cards is measured, and that second laying pushed the card the person had just inserted to the right: the collision rule only knew about the cards of the placement, so the card in the way was the one that moved. A placement now carries the ids the board held when it was made; a card that is not among them is one the person placed after it, and it keeps its place — the card in the way steps aside instead. A product of a run is not such a card: the runtime placed it, and the placement may still move it.
  • Windows refused the rename that writes the canvas document. The Design runtime writes its state atomically, and Windows refuses that rename while another process holds the file open for a moment. The refusal is transient, and it used to fail the whole operation: the canvas document was not written, so the run that belonged to it never started and the node stayed idle for ever. The rename is retried now, the way the SSH store already retries it, and every state file of the Design runtime goes through the one helper.
  • The macOS visual baselines were recorded in the wrong browser mode. Hosted macOS compares windowed Chromium, and windowed and headless Chromium do not draw the same glyph edges, so a headless recording differs from the one the CI compares against over the whole capture. The baseline refresh now selects the mode the CI uses, and the macOS baselines were re-recorded in it.
  • The browser cases compared a state they had not waited for. The screencast case and the account-login case now wait for the state they compare, so a request that is still on its way is not counted as a missing one.
  • The Design library case took "the node that is new" for the node it inserted. The media tool's tiles keep arriving after the split, so a tile that landed afterwards was new too. It now finds the node of the asset it inserted.
  • The Design report assertion compared the clipboard text as the report wrote it. The Windows clipboard answers with CRLF, so the text is normalized before the comparison.
  • The Design run assertions polled for 20s and reported only that the node stayed idle. They now wait up to 60s and, when a run never finishes, report the upload and the understanding evidence of the steps behind it together with the host's own log, so the failure names the stage that stopped.
  • The loopback integration suite booted the real host with the managed runtime unset, so the host reached for the official model catalog and persisted it through replaceLocalManagedMinimaxProvider — which resolves the config path when it writes. The late write landed in whichever data directory the process pointed at by then, so the next case found its own fixture replaced. The suite now runs offline and pins its scope to the test preset, so the case no longer depends on the runner's network.
  • The real browser bridge bounded a browser launch at 60s. The first Edge launch on a cold runner builds its profile before the extension answers, so that bound measured the machine rather than the bridge. It is now 120s, and the cases that wait on it have the room to match.
  • The synthetic provider read the multipart upload through a Request whose formData() is the one dependency in that path that behaves differently across platforms — and the provider waits for an answer it never gets when it does not. It now reads the body itself, and answers whether or not it could parse it.

Validation

  • Checks run and results (include the revision/profile where relevant):
    • pnpm run test:webui — 313 test files, 4654 tests, all passed
    • pnpm run typecheck:webui — passed (server, client and test projects)
    • pnpm run check:source — passed (6257 files)
    • pnpm run check:tsconfig — passed
    • pnpm run check:webui-boundary, check:webui-dependency, check:webui-presentation, check:webui-motion, check:webui-overlays, check:webui-feedback — passed
    • pnpm run test:webui-browser — 515 cases, all passed (Linux, built client)
    • npx playwright test packages/webui/test/browser/native-design.spec.mjs -g "reference-aware library" --repeat-each=14 — 14 passed; the case failed about one run in three before the fix
    • node node_modules/vitest/vitest.mjs run --config vitest.oss.config.mjs packages/webui/test/unit/design-atomic-file.test.ts packages/webui/test/unit/design-owner.test.ts — passed
    • WebUI CI run 44596400193 on 1608e956 — ubuntu, macOS and Windows all passed (no failed step)
  • Performance: basic
  • NOT RUN, platform limitations and live-service boundaries:
    • The full pnpm verify suite was not run; this change is validated on the WebUI gates and on Linux locally, and on ubuntu, macOS and Windows in the WebUI CI.
    • The macOS visual baselines are recorded on hosted macOS by the manual refresh workflow; they are not reproducible on another machine.

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. The inventory was regenerated for the added runtime helper and its test.
  • 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.

The WebUI CI was red on ubuntu and windows, and each failure named a
cause that was not the one that stopped the case.

The loopback integration suite booted the real host with the managed
runtime unset, so the host reached for the official model catalog and
persisted it through `replaceLocalManagedMinimaxProvider` — which
resolves the config path when it writes, so the late write landed in
whichever data directory the process pointed at by then and the next
case found its own fixture replaced. The suite now runs offline, and
pins its scope to the test preset, so the case no longer depends on the
runner's network at all.

The real browser bridge bounded a browser launch at 60s. The first Edge
launch on a cold runner builds its profile before the extension answers,
so that bound measured the machine rather than the bridge; it is now
120s, and the cases that wait on it have the room to match.

The Design library case took "the node that is new" for the node it
inserted. The media tool's tiles keep arriving after the split, so a
tile that landed afterwards was new too; the case now finds the node of
the asset it inserted.

The Design report assertion compared the clipboard text as the report
wrote it. The Windows clipboard answers with CRLF, so the text is
normalized before the comparison.

The Design run assertions polled for 20s and reported only that the
node stayed idle. They now wait up to 60s and, when a run never
finishes, report the upload and understanding evidence of the steps
behind it.

The synthetic provider read the multipart upload through a `Request`
whose `formData()` is the one dependency in that path that behaves
differently across platforms — and the provider waits for an answer it
never gets when it does not. It now reads the body itself, and answers
whether or not it could parse it.
@Fectivnfy112357 Fectivnfy112357 added the bug Something isn't working label Nov 19, 2026
…s in

The library read the pane's size when the dialog rendered, and the insert
placed the node against that size. The pane can be re-laid-out in
between, and a size read at render time is a size the pane no longer
has — so the node landed well off the pane's centre, outside the canvas
the reader was looking at.

The pane is measured at the insert instead, which is the size the node is
placed against.

The browser test found the inserted node by the asset the library item
names, but the media tool's tiles carry that same file and keep arriving
after the split, so the asset named two nodes and the first one in the
document was a tile. It now finds the node the insert selected, which is
one node by construction. The expected position is rounded the way the
pane rounds it, so the two agree on the pixel rather than on its
neighbourhood, and the wait for a design write to land is longer than
the default poll allows, because a write crosses the runtime and a loaded
runner takes longer than that.
The published WebUI package installs its native modules through
prebuild-install, which asks npm for the newest node-abi in its range.
npm answered with 3.102.0, and that version's tarball is not on the
registry, so the install failed on a 404 for a file npm had already
resolved.

The version this repository installs — 3.96.0 — is published, and the
package now asks for it by name, so the install resolves the same way for
a person and for the release check.
The manual baseline refresh wrote `WEBUI_BROWSER_HEADED=1` into the
environment file from inside the step that ran Playwright, and a step
cannot read back what it writes: the refresh rendered headless while the
CI compares windowed pixels on macOS. The baselines that refresh
committed therefore differed from the ones the CI compares against by a
handful of antialiased pixels per glyph — far more than the eight-pixel
budget — and the macOS browser step failed on the workspace panel and on
the embedded browser panel.

The mode is now selected by a step of its own, before the refresh runs,
and the documentation says which mode a baseline has to be recorded in.
…s in

The contract test still named the single workflow the repository had
before the manual baseline refresh was added, and it did not know about
the FFmpeg step the browser suite needs, so `test:release-tools` failed
on a repository that had not broken.

The test now accepts the refresh workflow, allows the machine
preparation steps the gate needs, and asserts that the refresh selects
the browser mode before it renders and that the CI selects the same mode
before it compares.
The insert read the pane's size from the DOM at the moment of the click,
and the pane's size at that moment is not always the size it is drawn at:
a layout that no frame has drawn yet can still be in the DOM, and a node
placed against it lands well off the pane's centre — the canvas is wider
than the window while the library is open, and the insert was placed
against that width.

The pane's size is the one the surface observes, the same size the
minimap and the view centring use, so the node lands on the centre of
the pane the person was looking at.
The isolated Chromium case slept for half a second after a navigation
and read the page's log after a fixed pause: a click handed to a page
that has not loaded yet is lost, and the case reported that as a click
that never landed. The case now waits for the page to load — and for the
page that navigated to be the page that is there now — and for the click
to be handled.

The usage hover case counted the quota requests while the first hover's
request was still on its way, and reported the hover loop for a request
the hover itself had made. The case now waits for that request to
arrive before it counts.
…from\n\nThe insert read the pane's size from the DOM at the moment of the click,\nand the pane's size at that moment is not the size the person was\nlooking at: the library is shown over the pane, and the pane is measured\nagain while the library closes, so a size read at the insert is the size\nof a layout in between. On a machine where the library's own layout\narrives late, that is a pane wider than the window, and the node lands\nwell off the pane's centre.\n\nThe insert is placed against the pane as it is drawn while the library is\nopen: the size the surface observed with the library over it — the pane\nthe person chose the asset from.
…run that never finishes was reported with the evidence of the steps\nbehind it — the upload and the understanding — but not with the runtime's\nown account of the run. The host log says which stage the run reached and\nwhat it was waiting for, so the failure can name where the run stopped\nand not only that the node stayed idle.
The Design runtime writes its state atomically: the new bytes go to a
sibling temporary file and are renamed over the old one. Windows refuses
that rename while another process holds the file open for a moment — an
indexer, a scanner, a concurrent reader — and the refusal is transient.

The refusal used to fail the whole operation. The canvas document was not
written, so the run that belonged to it never started: the node stayed
idle for ever and the task stayed running. The SSH store already retries
the same rename; the Design runtime retries it too now, and every state
file of the runtime goes through the one helper.
…again

The library inserts an asset at the centre of the pane. The products of a
run are laid out next to their source, and a grid is laid out again once
the media of its cards is measured. That second laying moved the card the
person had just inserted: the grid was the older one, but the collision
rule only knew about the cards of the placement, so the card in the way
was the one that moved — the insert landed 990 pixels to the right of the
centre the person asked for.

A placement now carries the cards the board held when it was made. A card
that is not among them is one the person placed after it, and it keeps
its place: the card in the way steps aside instead. A product of a run is
not such a card — the runtime placed it, and the placement may still move
it. The rule reads the board it is given, so the cards it keeps are the
ones that are on the board when the placement is saved.
@Fectivnfy112357
Fectivnfy112357 merged commit 38f5c75 into main Nov 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant