Repository navigation
fix(desktop): gate the sidebar-snapshot loading tests on the boot read - #140
Merged
Merged
Conversation
Three tests waited 500 ms after goto for the loading skeleton while the mock channels read resolved at 600 ms, so a render later than about 350 ms missed the window. They failed 3/3 on fork #75 and #76 and fail every time at 2x CPU. Arm the bridge's existing one-shot channels-read hold from config, so it covers the boot read, and hold that read until the test releases it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Three tests in
sidebar-snapshot.spec.tswaited 500 ms aftergotofor the loading skeleton while the mock channels read resolved at 600 ms. If the app rendered later than about 350 ms after load, the window was missed. They failed 3/3, retries included, on #75 and #76.Fix
This follows the pattern from #68, a test-controlled gate instead of a timer:
deferFirstChannelsReadconfig option. It arms the bridge's existing one-shot channels-read hold at install, because the boot read fires before a spec can call the runtime seam.pendingChannelsRead(page)andreleaseChannelsRead(page).Each test keeps its original assertions and also checks that the skeleton is gone after release. The "matching not-modified" test now uses the new helpers in place of its inline
evaluatecalls, with no behaviour change. No timeouts were raised and no product code changed: only the spec, its helper and the E2E mock bridge.Verification
Whole spec, one worker, private port, system Chrome:
--repeat-each=10--repeat-each=10, 2x CPU (CDP)origin/main, the three tests,--repeat-each=3, 2x CPUpnpm typecheckandpnpm checkpass indesktop/.pnpm checkstill prints 3 warnings in files this PR doesn't touch.Not fixed here
Two other timed windows in this spec remain. Both passed 10/10 at 2x CPU and both failed at least once in 3 repeats at 4x:
At 4x, plain boot can also exceed the default 5 s expect timeout: one of the gated tests failed that way, as did tests with no timing window. So 4x isn't a useful bar for this spec.
Factory-Task: desktop-e2e/sidebar-snapshot-read-gate
Built-by: claude-code/claude-opus-5-5
Undo: revert; only the spec, its helper and the E2E mock bridge change, and the tests go back to the 500 ms window.
🤖 Generated with Claude Code