Repository navigation
test(solo): wait for search and access before Share focus reveal - #2573
Merged
Merged
Conversation
The Share opens View only test focused Share #Team while the people search still showed "Searching…". When the search settled, "No other matching people." added 40 px above Share. On Linux WebKit the member list then scrolled so the bottom 8 px of Share were clipped (toBeInViewport ratio 0.8366) for the rest of the assertion. Wait for the search status to clear, as solo-sharing.spec.mjs already does, and for the General access summary to show Private, before the resize and focus. Both results sit above Share and can change its position. The focus-reveal check then runs on the settled layout it describes. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
matt2e
marked this pull request as ready for review
November 6, 2026 01:03
matt2e
approved these changes
Nov 6, 2026
nathan-thillairajah
added a commit
that referenced
this pull request
Nov 6, 2026
…able-page * origin/main: feat(browser): show a refused Builderlab app as a page in the panel (#2680) fix(profiles): cache profiles on disk and keep dm partners through eviction (#2178) feat(profiles): let each reader show verified people by username or full name (#2356) fix(media): show transparent avatars without a black background (#2477) fix(channels): keep the reader's place when Back returns to a link-opened channel (#2500) BUZZ-518: Explain required community sign-in (#2710) feat(desktop): serve credentials to agents and your CLI, with pairing (#2260) test(solo): wait for search and access before Share focus reveal (#2573) fix(relay): answer bytes a failed spool wrote; deflake the memory read (#1970) ci(release): publish a signed Intel macOS DMG (#1825) Signed-off-by: Nathan Thillairajah <nthillairajah@squareup.com> # Conflicts: # docs/browser.md # src-tauri/src/browser/builderlab.rs # src/features/browser/BrowserHostView.test.tsx # src/features/browser/BrowserHostView.tsx # src/features/browser/platform.test.ts
baxen
pushed a commit
that referenced
this pull request
Nov 7, 2026
…us (#2933) 🤖 ## Summary - Fixes an intermittent WebKit failure in the browser test "Share opens View only and posts a link without promoting or moving the Solo chat" (`tests/browser/solo-chats.spec.mjs`). After `share.focus()`, the **Share #Team** button stayed at viewport ratio **0** for the full 10 s. The focused button was never scrolled into view. This is separate from the ratio-0.8366 failure fixed in #2573. - Cause: the test narrows the window to 390 px and doubles the text size just before it focuses Share. That makes the app header wrap Search onto its own row, the header grows from 72 to 224 px, and the chat behind the Share dialog loses 152 px of height. The chat list (Virtua) then scrolls the chat back to its newest message with `scrollTo`, and repeats that on size updates for 150 ms. WebKit does not scroll a newly focused element into view right away: it schedules that on a 0 ms timer, and a `scrollTo` or `scrollBy` on **any** element before the timer fires cancels it, even when the position does not change. When the chat's scroll fell in that window, Share stayed hidden. - The test's old wait (two `requestAnimationFrame` callbacks) did not cover this: the test installs Playwright's clock, which replaces `requestAnimationFrame` with a timer, so the wait never waited for the browser to render. On loaded Linux CI runners the header and chat changes landed hundreds of milliseconds later, at focus time. - The test now waits for the header to wrap and for the chat to rest at its newest message, with no `scrollTo`/`scrollBy` call on the page for more than 150 ms, and then focuses Share. Each reading first waits for two real rendering updates: a new `ResizeObserver` reports only in one, and the clock does not fake it. ## Details - Test-only change. The focus-reveal assertion from #2375, the center hit-test and Enter activation are unchanged. - The cancel is in WebKit's shared code (`Element::scrollTo` → `LocalFrameView::cancelScheduledScrolls`; focus → `scheduleScrollToFocusedElement` on a 0 s timer). Assigning `scrollTop` does not cancel it. - CI traces of failing runs show the chat's scroll position jumping by 152 px at the same moment as focus, the header switching to its wrapped layout around focus, and the member list never scrolling. - Checks: a `scrollBy` on the chat right after `share.focus()` fails the old test 3/3 with ratio 0. A no-op `scrollTo` on the chat at 350 and 450 ms after the text change moves the new wait's focus from about 500 ms to about 950 ms. With the clock paused, the `ResizeObserver` wait still resolves (0 fake frames ran), and an app observer has received a size change made before it. The changed test passed 60/60 in Linux WebKit (Playwright 1.63 image) under CPU load and 6/6 locally on macOS WebKit. - The wait expects the wrapped header. A future header redesign that no longer wraps at 390 px and 2x text needs to update it. ## Follow-up - Not changed: while a dialog is open over a chat that follows its newest message, a chat scroll correction (an incoming message, a window resize) that lands between a Tab or `focus()` and WebKit's 0 ms reveal stops the focused control from being scrolled into view. The window is very short, so this should be rare. It is the same family as the follow-up noted in #2573. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> 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.
🤖
Summary
tests/browser/solo-chats.spec.mjs). The failing check wasexpect(share).toBeInViewport({ ratio: 1 })on the Share #Team button, at a ratio of 0.8366 for the full 10 s.Details
solo-sharing.spec.mjs. The status renders in the same update that enables Share, so the wait cannot pass before the search starts.Follow-up