镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

test(bestie): open the narrow long-history thread with clickRow - #2723

Merged
matt2e merged 1 commit into
mainfrom
fix/bestie-narrow-thread-flake
Nov 6, 2026
Merged

matt2e merged 1 commit into
mainfrom
fix/bestie-narrow-thread-flake

Conversation

@matt2e

@matt2e matt2e commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

What

Test-only. Fixes an intermittent Chromium failure in tests/browser/bestie-conversation.spec.mjs:165, "Bestie stays within a block host with multiline history at narrow widths". expect(getByRole('textbox', { name: 'Reply to thread' })).toBeInViewport() failed with "element(s) not found" because no thread had opened. It failed on run 42133368195 (#2419) and on an unrelated branch's run 42133084134, both in Browser journeys chromium 7/9.

Why it failed

With ?long at 480 px, the timeline opens at its latest message. The first "View thread: 1 reply" button starts out of view (viewport ratio 0), so locator.click() scrolled the timeline to reach it. After every scroll event, Virtua sets pointer-events: none on the list for 150 ms. Playwright hit-tested the button and pressed it. Under CPU load, React committed Virtua's scrolling style before the release. The release then reached the history <section>, and click went to the section. Playwright checks only the first pointer event, so click() reported success and the next assertion timed out.

  • In both CI traces, the snapshot at the click's input has no pointer-events style on the list, and the snapshot after the click has pointer-events: none.
  • Reproduced locally with event logging. Every logged failure showed the same sequence: pointerdown on the button, the list's style changes, then pointerup and click on the history section. Meanwhile the button stays connected at the same position, and elementFromPoint returns the section. The thread handler is never called.

This is the race #2560 diagnosed for the channel timeline.

Change

The test now opens the latest message's thread with clickRow from tests/browser/timeline.mjs. clickRow waits for Virtua to restore pointer events and for the geometry to settle. Then it requires the control to be fully in view and clicks without scrolling. The first button can't be used with clickRow because it is out of view when the conversation opens. Which thread opens doesn't matter to this test: every ?long root has the same multiline body, and the assertions cover the block host, the dock and the reply box.

Validation

Chromium with --repeat-each, 4 workers pinned to 2 cores (taskset) under an 8-CPU quota. The two runs ran side by side:

Runs Lost click (this failure) page.goto 15 s timeout Passed
main 200 2 12 186
this change 200 0 5 195

The page.goto timeouts are noise from this setup: cold Vite servers on overloaded cores. Across all loaded runs, the old click lost the click 6 times in 380 runs; this approach lost it 0 times in 324. Without load, main passed 60 of 60, and CDP CPU throttling did not reproduce it either.

  • The whole Bestie spec passed 90 of 90 on Chromium and Linux WebKit (5 repeats).
  • biome check and git diff --check pass.

Not addressed: as #2560 notes, clickRow can't stop an app scroll that starts after its idle wait.

🤖 Generated with Claude Code

"Bestie stays within a block host with multiline history at narrow
widths" clicked the first "View thread" button. With the ?long fixture
at 480px the timeline opens at its latest message, so that button
starts wholly out of view and the click scrolled the timeline to reach
it. After each scroll event Virtua sets pointer-events: none on the
list for 150 ms. Under CPU load React committed that style between
pointerdown and pointerup: the press reached the button, the release
reached the history scroller, and the click went to the scroller, so no
thread opened. Playwright hit-tests only the first event, so the click
reported success and the test failed 10 s later on the missing "Reply
to thread" box.

Open the latest message's thread with clickRow, the helper #2560 added
for this race. It waits for Virtua to restore pointer events and for
the timeline geometry to settle, then clicks a control that is already
wholly in view, without scrolling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: mtoohey <mtoohey@squareup.com>
@matt2e
matt2e requested a review from a team as a code owner November 6, 2026 02:11

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the PR and went through the Nexus review-tracker notes. I did not see any issues requiring comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

@matt2e
matt2e merged commit fb9cd7c into main Nov 6, 2026
45 checks passed
@matt2e
matt2e deleted the fix/bestie-narrow-thread-flake branch November 6, 2026 09:01
tlongwell-block added a commit that referenced this pull request Nov 6, 2026
* eva/huddle-audio-fixes: (29 commits)
  fix(huddle): keep calls flowing under stalled sends and multiple devices
  fix(channels): wrap unread conversation stepping around the sidebar (#2682)
  fix(navigation): let bare buzz:// open Buzz without a broken-link notice (#2718)
  fix(inbox): open DM thread rows as the thread (#2587)
  test(channels): complete the context navigation fixture (#2783)
  fix(channels): open a thread's channel at its root message from the #channel link (#2377)
  fix(people): find people by a pasted npub or hex key (#2396)
  test(bestie): open the narrow long-history thread with clickRow (#2723)
  Account-first onboarding and sign-in recovery (#2579)
  fix(agents): scroll the avatar dock with a mouse wheel (#2567)
  fix(avatars): keep Done in view when the avatar popup is short (#2706)
  feat(messages): highlight reactions you've made (#2709)
  feat(usage): move Usage from the sidebar into Settings (#2742)
  fix(messages): keep a playing row mounted in the channel timeline (#2695)
  Fix plugin status declaration closure for author consumers (#2643)
  fix(navigation): keep empty new chats out of Back history (#1617)
  [buzz-app] Recover remote agent message outcomes (#2542)
  feat(messages): name background send destinations and attach the files that fit (#2406)
  feat(drafts): clear a draft from its row (#2725)
  Authorize external application identities in Buzz (#2685)
  ...

Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Tyler Longwell <tlongwell@squareup.com>
Signed-off-by: Tyler Longwell <tlongwell@squareup.com>

# Conflicts:
#	docs/huddles.md
#	src-tauri/src/relay/huddle/audio.rs
wpfleger96 added a commit that referenced this pull request Nov 6, 2026
…leanup

* origin/main: (84 commits)
  Restore macOS Cmd-W window closing when no tab handles it (#2443)
  Make agent transcripts quieter and link finished replies to activity (#2424)
  fix(channels): wrap unread conversation stepping around the sidebar (#2682)
  fix(navigation): let bare buzz:// open Buzz without a broken-link notice (#2718)
  fix(inbox): open DM thread rows as the thread (#2587)
  test(channels): complete the context navigation fixture (#2783)
  fix(channels): open a thread's channel at its root message from the #channel link (#2377)
  fix(people): find people by a pasted npub or hex key (#2396)
  test(bestie): open the narrow long-history thread with clickRow (#2723)
  Account-first onboarding and sign-in recovery (#2579)
  fix(agents): scroll the avatar dock with a mouse wheel (#2567)
  fix(avatars): keep Done in view when the avatar popup is short (#2706)
  feat(messages): highlight reactions you've made (#2709)
  feat(usage): move Usage from the sidebar into Settings (#2742)
  fix(messages): keep a playing row mounted in the channel timeline (#2695)
  Fix plugin status declaration closure for author consumers (#2643)
  fix(navigation): keep empty new chats out of Back history (#1617)
  [buzz-app] Recover remote agent message outcomes (#2542)
  feat(messages): name background send destinations and attach the files that fit (#2406)
  feat(drafts): clear a draft from its row (#2725)
  ...

# Conflicts:
#	src/bundled/builderlab/adapter-type/Activity.test.tsx
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.

2 participants