Repository navigation
test(webui): select the tab's current identity in the two-page row - #267
Merged
Merged
Conversation
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.
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 baseline's
test:webuigate is red on a row that drives a real Chromium:isolated-chromium-two-pages.test.tsrefuses to open a second tab and stream its picture.Why
A new tab lands its first load after
open_tabanswered, and the provider reads that landing as a replaced page — the generation moves with it. The identityopen_tabhanded back is therefore already a generation behind by the time the row selects it, and the service refuses it:Whether the navigation event arrives before or after
Page.enableis 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