Repository navigation
fix(webui): make the webui baseline's own gates pass again - #266
Merged
Merged
Conversation
The workspace panel reached for `document` directly to wait for the fonts before it measured the terminal's grid. The dependency rules confine that global to the platform layer, and the platform is where the wait belongs: a component that reaches for `document` itself is a component that can only be placed against a browser. The browser platform now owns the wait (`whenFontsReady`), and the panel asks for it the way it asks for every other browser capability. This is the baseline's own `check:webui-dependency` failure — the gate reported these two accesses on the untouched `webui` branch.
…work left behind The terminal and browser work changed what these suites read. The panel mounts the browser host for the tab it kept mounted rather than for the selected one; the launcher hands the browser its own normalised address, which is what gives a bare host its trailing slash; the terminal's create button became an automatic create once the roster lands, so the panel states what the service says instead of keeping a copy of the limit; the browser control is an icon button whose accessible name is an `aria-label` rather than a title; and the shell's stylesheet list now includes the terminal's own stylesheet, which is a package stylesheet and so is not counted among the shell's rules. Each expectation now names the behaviour that replaced it rather than the shape it used to have.
The release audit scans the history of every branch, so a key name another pull request introduces is read by this one too. The shortcut settings page's storage key name is high-entropy enough for gitleaks' generic rule to read it as a credential, and the baseline has to know it is not one.
…tance The launcher routes a typed address through the browser's own address normaliser, so a bare host arrives with the root path the URL parser gives it. The expectation still carried the pre-normalisation form.
The terminal became a workspace tab: the client asks the runtime for a terminal when the tab opens, the runtime records the tab it belongs to, and the panel watches the terminal its own tab owns. The rows still spoke the old language — a roster of '#1' entries in the panel, a '新建终端' button and a '关闭' button beside it — and three of them had nothing left to drive. The browser control also names itself with aria-label now, and the address bar is an input rather than a text node, so the assertions follow those two facts.
The launcher's address box now names itself 'search Google or type an address', and the panel puts the browser's own toolbar above it. The recorded Linux baseline is the old frame, so it is re-recorded on Linux — the platform these baselines belong to.
stevenjj33
added a commit
that referenced
this pull request
Oct 27, 2026
The webui baseline's own gates are green again after #266, so this branch is brought up to it before its own checks run.
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 fixes
The
webuibaseline's own CI is red, and every pull request against it inherits the failure — this branch and the other four open PRs all fail at the same gate. This PR makes the baseline's gates pass again, so the pull requests that follow can be green.Three things are broken on the untouched
webuibranch (e2de9a1):check:webui-dependencyWorkspacePanels.tsx:528and:573— the workspace panel reaches fordocumentdirectly to wait for the fonts before it measures the terminal's grid. The dependency rules confine that global to the platform layer.test:webuititle; the shell's stylesheet list grew by the terminal's stylesheet.test:webui-browseraria-label, and the address bar is an input rather than a text node.The fix
The dependency gate. The browser platform owns the wait now:
and the panel asks for it the way it asks for every other browser capability:
The stale expectations. Each one now names the behaviour that replaced it.
The unit rows:
browser-web-tab-toolbar.test.tsx— the panel mounts the host for the tab it kept mounted, so the navigation state comes from that tab rather than from the selected one.workspace-panel-state.test.ts— the terminal's create button became an automatic create once the roster lands, and the limit is the process half's rule, so the panel states what the service says instead of keeping a copy of the limit.workspace-tab-strip.test.tsx— the launcher hands the browser the browser's own address form, which is what gives a bare host its trailing slash.webui-shell.test.ts— the browser control is an icon button: its accessible name is anaria-label, and atitlewould only add a hover affordance the glyph already carries.webui-w0-css-structure.test.ts— the shell's stylesheet list now includes the terminal's own stylesheet, which is a package stylesheet (@xterm/xterm/css/xterm.css) and so is not counted among the shell's rules; the list of imports keeps it, in its documented position.workspace-browser-tab-acceptance.test.ts— the same launcher address, seen from the acceptance row that types a URL into the launcher.The browser rows:
browser-workspace.spec.mjs— the browser control's name is anaria-label, and the address bar is an<input>, so the row reads its value rather than its text.architecture-acceptance.spec.mjs— the terminal is a workspace tab now: the client asks the runtime for a terminal when the tab opens, and the runtime records the tab it belongs to. The row therefore asserts what the panel can still say — the terminal is absent, the panel says so, nothing is opened, the rest of the client keeps working — and that the readiness refreshes when the service comes back, which is what the reconnect did for the old button's disabled state.terminal-cross-page.spec.mjs— the roster of#1entries inside the panel is gone; the terminal belongs to a workspace tab, and the tab id is what binds the two. Two pages that open the same terminal tab meet the same process, so the row keeps its shape: the second page adopts the PTY the first page opened, closing its panel releases its watch without ending the process, and the write still lands.native-runtime.spec.mjs— the same automatic create, against a real PTY.The fixture learns the one thing the client now needs from the runtime: the workspace tab a terminal belongs to (
createTerminalcarries it,listTerminalsanswers it). Without it the panel could never find the terminal its own tab owns.The recorded screenshot. The launcher's placeholder changed from
输入网址to搜索 Google 或输入网址, so the recorded Linux baseline of the launcher panel no longer matches the client. It is re-recorded on Linux — the platform the baselines belong to — and only that one file changes.The leak scanner. The release audit scans the history of every branch, so a key name that another pull request introduces is read by this one too. The shortcut settings page's storage key name (
webui-shortcuts.v1) is high-entropy enough for gitleaks'generic-api-keyrule to read it as a credential, so the baseline has to know it is not one — the same kind of documented entry the file already holds for the other non-credentials:Evidence
pnpm check:webui-dependencypnpm --filter @mavis/webui typecheck:clientpnpm check:sourcepnpm test:webui(Linux, CI)pnpm exec playwright test packages/webui/test/browser(Linux, CI)browser-bridge-real-*needs a real Chrome installation,native-runtimeneeds a PTY this machine'snode-ptycannot spawn, and the recorded baselines are Linux's, so the macOS ones do not exist. No assertion fails.Scope
packages/webuiexcept.gitleaks.toml. No new dependency, no server or runtime change, no public surface change.documentaccess is not removed — the capability moves behind the platform seam that already owns the other browser capabilities, which is what the dependency rules ask for.Not verified here
browser-bridge-real-*specs need a real Chrome installation and the visual baselines are recorded on Linux, so those fail here for environmental reasons; the CI runner has both.