Skip to content

fix(tests): Use webActorFromUser in web batch test - #2643

Merged
thomasjiangcy merged 2 commits into
mainfrom
fix/web-batch-test-actor
Nov 4, 2026
Merged

thomasjiangcy merged 2 commits into
mainfrom
fix/web-batch-test-actor

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Main CI on 38c8693 (#2625) fails check / types, test / junior unit, and test / dashboard e2e.

Types and unit. #2625 added web-batch-messages.test.ts with webActorFromEmail. #2630 removed it. The test now uses webActorFromUser(testViewer(...)), the same fix as c1e36af in #2631.

Dashboard e2e. conversations-mobile.spec.ts "keeps the message in view while earlier history and late content load" is flaky. It is not a regression from #2622 or #2625:

  • Main CI: failed on f23838b (fix(dashboard): Show inbox messages near the ask #2622, which only changes ReviewItemContext.tsx) and 38c8693. Passed only on retry on 38597fb. Each of these failed at line 752, the last step (spacer above the reader).
  • fix(dashboard): Stop transcript jumps while scrolling up on mobile #2634 added scrollIntoViewIfNeeded() right before that step. The scroll event fires on the next frame. When the test appends the spacer first, the transcript's scroll handler records the reader's place from the layout that already has the spacer. The resize correction then sees no shift. Local logs showed this order in every failure and the opposite order in every pass.
  • The test now waits one frame after each scroll so the scroll event runs first. Assertions are unchanged. Locally the last step went from 6 failures in 16 runs to 0 in 160.

Still open. Under 4 parallel workers, 7 of the 160 local runs failed one step earlier (after the earlier page loads). I did not measure that step on main without this change. In the one failure I logged, the correction ran twice: scrollTop moved by exactly 2× the shift. That points to a product race in transcriptBottomPinning.ts, not a test race. This PR does not fix it. I have not seen it fail in CI.

via @dcramer.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 4, 2026 03:52
#2630 removed webActorFromEmail. #2625 added this test with the old
helper, so main fails typecheck and junior unit.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
A scroll event fires on the next frame. When the test grew content above
the reader in the same frame, the transcript recorded the reader's place
after the growth, so it made no correction and the message left the
viewport. The test now waits one frame after each scroll.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 4, 2026 3:53am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 983c0f28 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants