Skip to content

test(Tooltip): TooltipTallContentTracking waits for what it checks - #9396

Merged
cixzhang merged 3 commits into
meta:mainfrom
vjeux:test/tooltip-tall-content-load
Nov 2, 2026
Merged

cixzhang merged 3 commits into
meta:mainfrom
vjeux:test/tooltip-tall-content-load

Conversation

@vjeux

@vjeux vjeux commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Not to be merged on Monday between 06:00 and 09:00 PT (release window).

Maintainer impact

On a loaded runner, TooltipTallContentTracking.a11y.browser.spec.ts fails in checks whose timing is wall-clock, with nothing wrong in the tooltip:

  • "placing a shown tooltip afresh keeps every animation in its content in its exact state" failed in 5 of 80 runs of main pinned to two cores with 4 workers:
    • its reversed animation row finished between the test's two reads;
    • rows that had just been set started late.
  • The checks that the tooltip switched to its anchor-clear list read the attribute after a fixed 200, 300 or 450 ms. In a run of 10 at that load they failed once in the scroll-step test and once at the smooth-scroll test's start.

Intended invariant

  • FR8 is unchanged. After a same-size move, at most one painted frame shows the tooltip over its trigger (spec:AST-059 FR8, its verification row for this suite, and architecture:layer-runtime INV12). The seven frame-counted checks keep that frame-2 bound, unchanged.
  • The animation rows: placing a shown tooltip afresh keeps every animation in its content in its exact state.
  • The switch checks: the tooltip has switched to its anchor-clear list.

Change

  • The reversed animation row runs back from a set time.
    • It reversed its animation a moment after the animation started, so on a loaded runner it ran back to its start and finished between the two reads.
    • It is reversed 9 s into its 10 s now.
  • Every row's animation has started before the first read.
    • A row the sets had just made or re-timed (the scripted animation, the transition) is pending, its time held, until a frame starts it. The fixed 100 ms after the sets did not always see a frame on a loaded runner.
    • The test waits until every row's animation is ready.
  • Switch checks wait for the switch.
    • The checks read the anchor-clear attribute after a fixed 200, 300, 450 or 1500 ms. They wait for the attribute now.
    • Waits that serve other settling keep their time: the 450 ms in WebKit's path, and the scrolled container's 1500 ms.

Evidence

Chromium, pinned to two cores with 4 workers unless noted. The seams were local copies of the spec.

  • Reversed row: a 2.5 s interval between the reads finishes main's reversed row (3 of 3); with the change it holds (3 of 3).
  • Rows started before the first read: same-time ×40 runs of the placing-afresh test read with rows still pending in 3 of 40 runs with main's fixed wait, and in 0 of 40 with the change.
    • The failures seen on main were such rows starting late: a scripted animation at 333 ms where 495 ms had passed, a transition still at 0.
  • Switch checks: with the tooltip's reports held 700 ms late until it switches, main's scroll-step and smooth-scroll opening checks fail (3 of 3 each); with the change they pass (3 of 3).
  • Same-time comparison, whole spec ×40:
    • main: 477 of 480. The placing-afresh test failed twice (reversed row finished) and the smooth-scroll test's frame-2 check failed once.
    • This branch: 478 of 480. The placing-afresh test passed in every run; the smooth-scroll test's frame-2 check failed twice (see below).
  • Whole spec at this head: Chromium ×5 with 1 worker, 60 of 60. WebKit ×3, 36 of 36.
  • The smooth-scroll test's frame-2 check still fails when the tooltip's move report lands after the second painted frame. In a failing local run on main the first two frames rendered 2 ms apart and the report came after the second. That is a second painted frame over FR8's bound, which this suite is meant to catch. The tooltip's own fix for it is separate.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

packages/core/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.ts in Chromium and in WebKit (the Playwright container, 4 CPUs).

Local gates at 2cec999:

  • Prettier and ESLint on the spec;
  • the core typecheck;
  • pnpm lint (0 errors);
  • pnpm check:repo and pnpm check:knowledge;
  • changeset coverage (nothing ships).

@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 2, 2026 12:30am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 2, 2026, 12:44 AM UTC

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2cec999

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Tooltip · Storybook 17.9 kB (0) · 5.0 kB CSS (0) 580 (0) ✓ · ✓ · ✓

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: core 1 row; run pnpm api:report.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 1, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 1, 2026 23:06

@astracat-bot astracat-bot Bot 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.

Requesting changes: the animation-row and switch-check timing fixes look right, but counting frames from the test's own observer report changes what this suite proves for spec:AST-059 FR8. FR8, its verification row for this suite and architecture:layer-runtime INV12 allow at most one painted frame over the trigger after a same-size move. expectClearAfterReport now skips every frame painted before the report, so a second overlapping frame passes whenever the report is late. Either amend those claims to bound the overlap by the move observer's report (an engineering owner, which includes you, records it with /approve-spec <full head SHA>), or keep the frame-2 bound in the seven frame-counted checks and land the other three commits on their own; either way, make the test title at line 540 and the description's stated FR8 invariant match.

[Automated review]

) {
for (const [i, frame] of frames.entries()) {
if (i === 0) {
if (i < reportedAfter) {

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.

This skips every frame painted before the test's own observer reports, up to frame 9 in the layout tests. A tooltip that covers its trigger in frame 2 therefore passes whenever the report is late. spec:AST-059 FR8, its verification row for this suite and architecture:layer-runtime INV12 allow only the first painted frame, so either amend those claims to a report-relative bound or keep i === 0 here.

vjeux added 3 commits November 1, 2026 15:31
The row reversed its animation a moment after the animation started, so
on a loaded machine it ran back to its start and finished between the
test's two reads. It is reversed 9 s into its 10 s now.
The test set each row's state, waited a fixed 100 ms, and read every
row's time before and after placing the tooltip afresh, expecting a
running row to move on by the time between the reads. A row's animation
the sets had just made (the scripted animation, the transition) or
re-timed is pending until a frame starts it, holding its time until then;
on a loaded machine no frame came within the 100 ms, and the row started
late. The test waits until every row's animation is ready.
The checks that the tooltip had switched to its anchor-clear list read
the attribute after a fixed 200, 300, 450 or 1500 ms. The switch follows
the move observer's report, later on a loaded machine; the checks wait
for the attribute.
@vjeux
vjeux force-pushed the test/tooltip-tall-content-load branch from 9743ef9 to 2cec999 Compare November 2, 2026 00:22
@vjeux vjeux changed the title test(Tooltip): TooltipTallContentTracking counts frames from the move's report and waits for what it checks test(Tooltip): TooltipTallContentTracking waits for what it checks Nov 2, 2026

@astracat-bot astracat-bot Bot 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.

This looks ready to merge: each check now waits for the state it reads, and the seven frame-counted checks still fail on a tooltip that covers its trigger past the first painted frame, as spec:AST-059 FR8 and its verification row for this suite require. The earlier concern about counting frames from the observer's report no longer applies, since that change is gone from this branch. Nothing else is needed from you.

[Automated review]

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants