Skip to content

test(webui): select the tab's current identity in the two-page row - #267

Merged
stevenjj33 merged 1 commit into
webuifrom
fix/webui-isolated-chromium-tab-identity
Oct 27, 2026
Merged

stevenjj33 merged 1 commit into
webuifrom
fix/webui-isolated-chromium-tab-identity

Conversation

@stevenjj33

Copy link
Copy Markdown
Collaborator

What this fixes

The baseline's test:webui gate is red on a row that drives a real Chromium: isolated-chromium-two-pages.test.ts refuses to open a second tab and stream its picture.

Why

A new tab lands its first load after open_tab answered, and the provider reads that landing as a replaced page — the generation moves with it. The identity open_tab handed back is therefore already a generation behind by the time the row selects it, and the service refuses it:

WebuiBrowserOperationError: The browser target has been replaced; select it again.

Whether the navigation event arrives before or after Page.enable is a race, so the row failed on some runners and passed on others — it failed on both Linux and macOS in the same run of #265.

The fix

The service's own refusal says what to do about it: select the target again. So the row reads the identity the service holds for the tab, selects that one, and watches that one.

Evidence

  • pnpm --filter @mavis/webui typecheck:test — pass
  • The row itself needs a real Chrome, so it is verified on the CI runners (Linux and macOS both have one); this machine has no system Chrome, which is why the row is skipped here.

A new tab lands its first load after the tab was opened, and the
provider reads that landing as a replaced page: the generation moves
with it, so the identity `open_tab` answered with is already a
generation behind by the time the row uses it. The service refuses such
an identity and says what to do about it — select the target again — so
the row reads the identity the service holds for the tab, selects that
one, and watches that one.
@stevenjj33
stevenjj33 merged commit d959327 into webui Oct 27, 2026
8 checks passed
stevenjj33 added a commit that referenced this pull request Oct 27, 2026
The baseline's own gates are green again after #266 and #267, so this
branch is brought up to it before its own checks run.
@stevenjj33
stevenjj33 deleted the fix/webui-isolated-chromium-tab-identity branch October 27, 2026 02:56
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