Skip to content

test(dashboard): Wait for the transcript to stop moving a question card before a click - #4605

Merged
BYK merged 1 commit into
mainfrom
fix-flaky/transcript-click-retry-scroll
Nov 27, 2026
Merged

BYK merged 1 commit into
mainfrom
fix-flaky/transcript-click-retry-scroll

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Refs #4176

Shots

In both, one side shows the transcript scrolled up from the latest message, with the clicked control at the bottom edge of the transcript. In the question card shot, the "1 question waiting" pill then covers the card.

Root cause

Both specs click a control in the transcript while the transcript still moves it. Playwright's stability check fails ("element is not stable"). On the first retry, Playwright calls element.scrollIntoView({ block: "end", inline: "end" }) on the control (_retryPointerAction in playwright-core). That scrolls the transcript up so the control's bottom is at the bottom edge. The transcript treats this as a reader scroll and stops following the latest message, and the shot shows that place.

What moves the control:

Fix

Each desktop spec waits for the state that ends the movement before it clicks:

  • question-cards.spec.ts waits for the "Asked Pick the canary region" record. Only the desktop case waits: a phone shows the form in a sheet, and the mobile shots stay as they are.
  • conversation-inbox-items.spec.ts waits until the question card is in full view (toBeInViewport({ ratio: 1 })), which is true only after the transcript followed the card.

Other specs can also click a transcript control that is still moving. A general guard needs a hook into Playwright's retry, which this PR does not add.

Before After
conversation-question-card__desktop question card before question card after
conversation-unsent-answers__desktop unsent answers before unsent answers after

via @BYK.

--

View Session [Sentry]

…rd before a click

A click on a control that the transcript still moves fails Playwright's
stability check. Its retry calls scrollIntoView({ block: "end" }) on the
control, which scrolls the transcript up from the latest message, so the
shot shows another place.

In the question card spec, the answered question above the card reads
its closed item after the list, and its row grows by 58px. Wait for that
record before the clicks. In the unsent answers spec, the card shows
below the latest message, and the transcript follows it a frame later.
Wait until the card is in full view.

Refs #4176

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested a review from BYK November 27, 2026 13:16
@vercel

vercel Bot commented Nov 27, 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 27, 2026 1:16pm UTC

Request Review

@BYK
BYK enabled auto-merge November 27, 2026 13:24
@github-actions

Copy link
Copy Markdown
Contributor

6 screenshot changes — 6 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Outbox Author · Mobile
Conversation Outbox Author · Mobile
Changed
Conversation Question Card · Desktop
Conversation Question Card · Desktop
Changed
Conversation Question Card Light · Desktop
Conversation Question Card Light · Desktop
Changed
Conversation Unsent Answers · Desktop
Conversation Unsent Answers · Desktop
Changed
Inbox Snooze Named Resource · Mobile
Inbox Snooze Named Resource · Mobile
Changed
Inbox Snooze Named Resource Light · Mobile
Inbox Snooze Named Resource Light · Mobile
Changed

@BYK
BYK added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 8b1f369 Nov 27, 2026
55 checks passed
@BYK
BYK deleted the fix-flaky/transcript-click-retry-scroll branch November 27, 2026 13:27

This branch was successfully deployed

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

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant