Skip to content

test(card-view): read every frame card B lasts after leaving a comparison (#1128) - #1129

Merged
Doberjohn merged 2 commits into
masterfrom
claude/project-thread-qq83j4-reduced-motion-webkit
Nov 3, 2026
Merged

Doberjohn merged 2 commits into
masterfrom
claude/project-thread-qq83j4-reduced-motion-webkit

Conversation

@Doberjohn

@Doberjohn Doberjohn commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

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 for data-mode with a MutationObserver, 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 one Set comparison, which also shows the opacities read when it fails. E2E_TESTS.md describes the new check.

Checked in Chromium:

  • The old test fails with FLIP_DURATION cut to 50 ms (['0', '0', '0'], as on WebKit). The new one passes with it cut to 1 ms.
  • With runExitFLIP's reduced-motion branch skipped, the new test fails (Set {"1"}).
  • With card B shown again 200 ms into its stay, the old test passes and the new one fails (Set {"0", "1"}).
  • Each push's pre-push ran every spec on chromium and mobile-chrome (580 passed, none failed). The first push passed on all five browsers in CI; full-e2e reruns them on this one.

Closes #1128

🤖 Generated with Claude Code

https://claude.ai/code/session_01J57kHm4KbVuqMeE1Gsqocv

…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
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
inkweave Ready Ready Preview Nov 3, 2026 11:07pm UTC

Request Review

codescene-delta-analysis[bot]

This comment was marked as outdated.

@cubic-dev-ai cubic-dev-ai 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.

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.

View guided diff | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
User-facing JS 451.96 KB (0%)
Supabase SDK (lazy) 26.98 KB (0%)
PostHog SDK (lazy) 100.91 KB (0%)
Entry chunk 28 KB (0%)
Collection and reveals JS 65.29 KB (0%)
Binders JS (lazy) 5.27 KB (0%)
Release notes page 9.33 KB (0%)
Card data JSON 110.37 KB (0%)
Collection index JSON 63.83 KB (0%)
Collection set chunks 158.18 KB (0%)

…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

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Doberjohn added the full-e2e label Nov 3, 2026 — with Claude
@Doberjohn
Doberjohn merged commit 9d121bb into master Nov 3, 2026
19 checks passed
@Doberjohn
Doberjohn deleted the claude/project-thread-qq83j4-reduced-motion-webkit branch November 3, 2026 23:22

This branch was successfully deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the reduced-motion comparison test that fails on WebKit

1 participant