Skip to content

test(Slider): the slow-release test runs on a fixed track length - #11547

Merged
cixzhang merged 3 commits into
mainfrom
test/slider-slow-release-fixed-track
Nov 14, 2026
Merged

cixzhang merged 3 commits into
mainfrom
test/slider-slow-release-fixed-track

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Test fix: SliderTouch.interaction.browser.spec.ts's "a slow release does not coast" runs on a fixed 320 px track, so the outcome no longer depends on the page's width. The gesture and the coast assertions are unchanged: both cases share one body, which releases while moving slowly, with no still hold before the lift. The 393 px phone-width case stays in the spec as test.fixme, documenting the headless stall. No product code changes.

User or maintainer impact

Maintainers: the WebKit interaction leg stops failing this test whenever an unrelated change moves the Brightness slider's track to about 335 px. #4050 does that by reserving room for its value label at the default 402 px phone width. Readers: no change.

Problem and solution fit

In Playwright's WebKit, when a touch ends straight out of a slow move and the track is about 335 px, the engine takes one 73–143 ms frame about 10 ms after pointerup. The harness reads that frame as a stalled lift (TouchLiftStallError). Main fails the same way at a 393 px phone width and passes at 402 (track 344 px).

Instrumented runs found no page cause:

  • That frame holds 0 ms of page script, frame callbacks or forced layout. A 20 ms busy-wait control proved the instrumentation sees WebKit listeners.
  • The frame persists under reduced motion, where no thumb animation runs.
  • It persists even when every class and style attribute in the slider is frozen from pointerup, so nothing on the page changes at the lift.
  • Only a still hold before the lift removes it, and that would change what the test checks.

Safari on a real iPhone (iPhone 14, iOS 26.2, at a 390 px width, track about 332 px) shows no hitch at the lift, 3 of 3 takes: the release commits on time against hold-still controls. So the long frame belongs to the headless WebKit build, and the test fixes its own geometry instead. The pin is temporary and goes when that engine stops stalling.

Authority

component:Slider FR7 (touch tracking, release without coast) and its verification row, which names this test. The record is unchanged.

Change and evidence

  • packages/core/src/Slider/__tests__/SliderTouch.interaction.browser.spec.ts: expectSlowReleaseNotToCoast(page, trackPx?) holds the gesture and the assertions. The pinned case sets the slider control's flex to 0 0 320px and waits two frames before the gesture; the test.fixme case runs at a 393 px width with no pin. A comment states the engine reason and the real-device result.

Scope

Components: Slider (test only)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • The WebKit and Chromium interaction legs in CI run this test at 320 px.
  • Real device: Safari on an iPhone 14 (iOS 26.2) at 390 px shows no hitch at the lift, 3 of 3 takes, against hold-still controls.

Writing rubric results

  • No record changes.

Owner and land path

Owner: the Astryx fix loop, lane 3. Specs, CodeBunny at its head, green CI and the main-CI guardian's conditions (met); the drain merges. #4050 follows it.

WebKit takes one long frame when a touch ends straight out of a slow move at some track lengths (about 335 px), with no page work in it, and the harness reads that frame as a stalled lift. The test now fixes the track at 320 px, so it tests the release and not the page's width. The gesture is unchanged.
@vercel

vercel Bot commented Nov 13, 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 13, 2026 3:03pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 13, 2026, 3:18 PM UTC

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

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 789322f

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Slider · Storybook 114.3 kB (0) · 8.9 kB CSS (0) 2,447 (0) ✓ · ✓ · ✓

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

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

The stalling geometry stays in the spec as test.fixme, so a fix for the WebKit stall can be proven, and the pinned case shares one body with it, so its coast assertion is the same. The comment says the 320 px pin is temporary.

@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.

Approved pending CI: the interaction legs have not run on this head yet, and they run once the pull request leaves draft.

The 320 px pin keeps the slow-release gesture and assertions unchanged, the pinned case passes repeatedly in Chromium, and the control measures exactly 320 px at both the 402 px and 393 px phone widths. Nothing blocks; three optional suggestions:

  • The test.fixme at line 664 also skips Chromium, where the 393 px case passes; calling test.fixme(browserName === 'webkit', …) inside the test keeps that coverage, and the comment above it could say the case checks a fix once the fixme is removed, rather than that it proves one.
  • expectSlowReleaseNotToCoast can destructure control from openSlider instead of rebuilding the same XPath locator.
  • The lift stall comes from the test reading the value inside onEvent at the last move, which holds the lift back by about two frames; the harness suggests recording that read in a page listener instead, which might make the pin unnecessary.
Claims and files checked
  • Claim: the slow-release case runs on a fixed 320 px track. Verified: the pin in the helper, and a 320 px control measured at both phone widths.
  • Claim: the gesture and coast assertions are unchanged and both cases share one body that lifts while still moving. Verified: the helper's body is the earlier test body plus the pin.
  • Claim: the 393 px case is kept as a known failure. Verified: the new test.fixme case.
  • Claim: no product code changes. Verified: only this spec file changes.
  • Claim: a track of about 335 px, as #4050 produces at the default phone width, stalls the lift in headless WebKit. Consistent: a 393 px viewport gives a 334.7 px control and a 402 px one 343.7 px; the WebKit result was not reproduced in this review.
  • Claim: the harness reports the long frame as a stalled lift. Consistent with the harness, which raises that error when the test's own work before the lift pushes the lift past its 40 ms stillness interval.
  • Claim: the instrumented runs found no page work in the long frame, and Safari on a real iPhone shows no hitch. Taken as stated in the description.
  • Claim: the Slider record's touch-tracking requirement and its verification row govern the test, and the record is unchanged. Verified.
  • Claim: CI's WebKit and Chromium interaction legs run this test at 320 px. Verified in the configuration; they have not run on this draft yet.
  • Claim: the scope is Slider tests only, with no internal context. Verified.
  • File packages/core/src/Slider/__tests__/SliderTouch.interaction.browser.spec.ts: the three optional suggestions above.

Automated review (maintainer link)


// The stalling geometry, kept as a known failure: a 393 px phone width gives
// the track about 335 px. It proves the fix for the WebKit stall above.
test.fixme('a slow release does not coast on a 393 px phone width', async ({

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.

Optional: this test.fixme also skips Chromium, where the 393 px case passes. Calling test.fixme(browserName === 'webkit', 'headless WebKit stalls the lift at a 335 px track') inside the test keeps the Chromium coverage. The comment above could say the case checks a fix once the fixme is removed, since a fixme case never runs.

Comment on lines +607 to +610
await thumb
.locator(
'xpath=ancestor::*[contains(@class, "astryx-slider-control")][1]',
)

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.

Optional: openSlider already returns this locator as control, so the helper can destructure it instead of repeating the XPath.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 789322f

@cixzhang
cixzhang merged commit babdd8f into main Nov 14, 2026
134 checks passed
@cixzhang
cixzhang deleted the test/slider-slow-release-fixed-track branch November 14, 2026 00:20

This branch was successfully deployed

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

Labels

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.

1 participant