test(desktop): await thread scroll anchor - #3174
Merged
Merged
Conversation
Co-authored-by: npub1x4hk035p3p9q39a3fcrd2fe30lpkrhr5dwe0cqzzjphxyyh8m0gsq4vqap <356f67c681884a0897b14e06d527317fc361dc746bb2fc0042906e6212e7dbd1@buzz.block.builderlab.xyz> Signed-off-by: npub1x4hk035p3p9q39a3fcrd2fe30lpkrhr5dwe0cqzzjphxyyh8m0gsq4vqap <356f67c681884a0897b14e06d527317fc361dc746bb2fc0042906e6212e7dbd1@buzz.block.builderlab.xyz>
cameronhotchkies
force-pushed
the
grumplestiltzkin/thread-focus-scroll-flake
branch
from
July 30, 2026 18:25
f9de570 to
0f89a41
Compare
atishpatel
approved these changes
Aug 6, 2026
atishpatel
left a comment
Contributor
There was a problem hiding this comment.
Approving — test-only synchronization fix, verified locally.
What I checked
- Reviewed the diff:
topVisibleMessageId→scrollToMiddleVisibleMessage, which (a) sets the 40% scroll inside the poll and re-checkselement.scrollToplanded within 1px in the same synchronous evaluate, (b) requires the captured row to intersect the viewport on both edges, (c) rejects the thread root. That is exactly the failure mode in the linked run: the anchor was captured atscrollTop === 0, so the root became the anchor and the later restoration assertion legitimately failed on an illegitimate anchor. - Not masking a product bug: the position check is synchronous with the assignment, so the anchor is genuinely a ~40% row. If restoration were broken (or the app snapped back to bottom asynchronously afterward), the preserved
toBeInViewport()assertions after focus→split→focus would still fail. The three original viewport/highlight assertions are untouched. - Rebased the diff cleanly onto
origin/main(96ae141) in a scratch worktree — the branch is 159 commits behind butthread-focus-mode.spec.tshas no conflicting change on main sincecca88390. pnpm exec tsc --noEmit: clean.pnpm check(biome + file-size/px-text/pubkey guards): clean, no new findings.playwright test --project=smoke thread-focus-mode.spec.ts --repeat-each=8: 16/16 passed, no flaky, on the rebased tree.
Nits, non-blocking
expect.pollwith a mutating callback is slightly unusual (the poll body performs the scroll rather than just observing it). It's correct here — the retry is the re-scroll — but a one-line comment saying so would help the next reader.- The
anchorIdclosure write plus the post-pollif (!anchorId) throwis redundant with the poll predicate; harmless.
Nothing blocking. Please rebase/let the merge queue bring it up to date before landing.
wesbillman
approved these changes
Aug 6, 2026
wesbillman
enabled auto-merge (squash)
August 6, 2026 14:56
wpfleger96
pushed a commit
that referenced
this pull request
Aug 6, 2026
…-agents-nav * origin/main: Refine agent runtime controls (#5026) test(desktop): await thread scroll anchor (#3174) Improve desktop mobile pairing flow (#5024) feat(desktop): show selected community in rail (#5000) fix(desktop): stop rate-limited reconnect backfill from tearing down the authenticated socket (#4990) fix(desktop): skip native notifications outside app bundles (#5004) ci: prove the relay-driven mesh lifecycle — discover, join, infer, deny — with real nodes (#3862) fix(desktop): virtualize channel member lists (#4991) fix(desktop): enforce owner-only access in internal builds (#4053) test(desktop): match attachment button label (#4993) fix(acp): pace observer telemetry at 1/s with per-channel batch envelopes (#4917) fix(desktop): enable the content security policy (#4614) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96
pushed a commit
that referenced
this pull request
Aug 6, 2026
…n-surface * origin/main: (44 commits) fix(buzz-agent): classify read timeouts distinctly in LLM error messages (#4959) Refine agent runtime controls (#5026) test(desktop): await thread scroll anchor (#3174) Improve desktop mobile pairing flow (#5024) feat(desktop): show selected community in rail (#5000) fix(desktop): stop rate-limited reconnect backfill from tearing down the authenticated socket (#4990) fix(desktop): skip native notifications outside app bundles (#5004) ci: prove the relay-driven mesh lifecycle — discover, join, infer, deny — with real nodes (#3862) fix(desktop): virtualize channel member lists (#4991) fix(desktop): enforce owner-only access in internal builds (#4053) test(desktop): match attachment button label (#4993) fix(acp): pace observer telemetry at 1/s with per-channel batch envelopes (#4917) fix(desktop): enable the content security policy (#4614) fix(mobile): merge relay recounts with locally seen thread replies (#4633) fix(desktop): enable message editing in Inbox (#2198) relay: fuzz WebSocket 1012 restart-close timing on graceful drain (BUZZ_DRAIN_JITTER_MS) (#4542) fix(desktop): outline the selected community (#4969) fix(desktop): clamp thread panel to channel surface (#4965) style(messages): increase username contrast (#4948) fix(desktop): rename generic attachment action from 'Attach image' to 'Attach file' (#2381) (#4304) ... # Conflicts: # desktop/src-tauri/src/commands/mod.rs
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.
Why
The focus/split E2E test could capture the thread root before its programmatic middle-thread scroll had settled, then incorrectly report a scroll-restoration failure.
What
Risk Assessment
Low — test-only synchronization change with no production behavior changes.
References
just desktop-ci, andjust ciGenerated with Codex