Repository navigation
test(card-view): read every frame card B lasts after leaving a comparison (#1128) - #1129
Merged
Doberjohn merged 2 commits intoNov 3, 2026
Merged
Conversation
…ison (#1128) Under reduced motion card B hides at once on BACK, stays for the exit's 480 ms and then unmounts. WebKit drew that stay in 3 frames, so the check for four frames at opacity 0 failed though each frame was 0. The sampler now stops once card B leaves, and the test needs at least one frame and every frame at 0. In Chromium, a 50 ms stay reproduces WebKit's ['0', '0', '0'] failure and the fixed test passes it. With the exit's reduced-motion branch skipped, the fixed test fails on card B's opacity of 1. Closes #1128 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J57kHm4KbVuqMeE1Gsqocv
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
cubic analysis
No issues found across 1 file
Linked issue analysis
Linked issue: Doberjohn/inkweave#1128: Fix the reduced-motion comparison test that fails on WebKit
| Status | Acceptance criteria | Notes |
|---|---|---|
| Pass the reduced-motion test on all five projects | The test is updated, but the PR reports Chromium and mobile-Chrome results; the other projects await Full E2E. | |
| ✅ | Fail if leaving flies card B back instead of hiding | The leaving check rejects every nonzero opacity, and the PR reports it fails when the reduced-motion branch is skipped. |
| ✅ | Fail when no card B frame is sampled after BACK | The test explicitly requires at least one sampled leaving frame before checking its opacity. |
| ✅ | Make no app code changes | The diff changes only the end-to-end test file; no application code is modified. |
Contributor
size-limit report 📦
|
…e it stays (#1128) The leaving check read at most four frames, so card B showing again later in its 480 ms stay still passed, and it needed a frame after the mode flip to read anything at all. The sampler now also reads card B when data-mode flips, from a MutationObserver that runs after the exit's layout effect, and then on every frame until card B is gone. The early stop applies only to leaving, so the comparison checks still read their four frames. The two leaving assertions become one Set comparison, which also shows the opacities read, and E2E_TESTS.md describes the new check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J57kHm4KbVuqMeE1Gsqocv
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Doberjohn
deleted the
claude/project-thread-qq83j4-reduced-motion-webkit
branch
November 3, 2026 23:22
This branch was successfully deployed
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.
Before: the card view's reduced-motion test, "a comparison opens and closes in place, and opens again", failed on WebKit every time (PR #1126's Full E2E, 3 of 3). After BACK it waited for four frames of card B at opacity 0. Card B stays only for the exit's 480 ms, and WebKit drew that stay in three frames, so the test read
['0', '0', '0']and failed, although every frame it read was hidden.After: leaving a comparison, the test reads card B as the mode flips and then on every frame card B lasts, and checks that each reading is 0. It passes however many frames a browser draws in those 480 ms, and fails when leaving flies card B back, or when card B shows again at any point in its stay. No app code changes.
How:
sampleCardB, when leaving, also listens fordata-modewith aMutationObserver, which runs after the exit's layout effect has hidden card B, so there is one reading however late the next frame comes. Its frame loop then reads until card B is gone. Entering a comparison it still reads the first four frames. The leaving check is oneSetcomparison, which also shows the opacities read when it fails.E2E_TESTS.mddescribes the new check.Checked in Chromium:
FLIP_DURATIONcut to 50 ms (['0', '0', '0'], as on WebKit). The new one passes with it cut to 1 ms.runExitFLIP's reduced-motion branch skipped, the new test fails (Set {"1"}).Set {"0", "1"}).full-e2ereruns them on this one.Closes #1128
🤖 Generated with Claude Code
https://claude.ai/code/session_01J57kHm4KbVuqMeE1Gsqocv