Skip to content

fix: override reducedMotion for CSS transition check in phone dock scroll test#864

Merged
BigSimmo merged 2 commits into
codex/design-audit-main-safe-20260719-cleanfrom
copilot/fix-copilot-issue
Jul 18, 2026
Merged

fix: override reducedMotion for CSS transition check in phone dock scroll test#864
BigSimmo merged 2 commits into
codex/design-audit-main-safe-20260719-cleanfrom
copilot/fix-copilot-issue

Conversation

Copilot AI commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

CI failure in tests/ui-tools.spec.ts:1036 — the "phone bottom search dock hides while scrolling down on search results" test asserted transitionDuration >= 100ms but received 0.01ms.

Root cause: playwright.config.ts globally sets contextOptions: { reducedMotion: "reduce" } to prevent animation-race flakes. The dock element carries motion-reduce:transition-none, so under that context the computed transitionDuration collapses to ~0 — the assertion can never pass.

Fix: Temporarily lift reduced motion with page.emulateMedia({ reducedMotion: "no-preference" }) for the CSS inspection step only, then restore "reduce" before the scroll-behavior assertions.

// before:
const transition = await dock.evaluate((node) => { ... });
expect(transition.durationMs).toBeGreaterThanOrEqual(100);

// after:
await page.emulateMedia({ reducedMotion: "no-preference" });
const transition = await dock.evaluate((node) => { ... });
await page.emulateMedia({ reducedMotion: "reduce" });
expect(transition.durationMs).toBeGreaterThanOrEqual(100);

Summary

  • Test-only change in tests/ui-tools.spec.ts — no production code modified.

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

UI verification not run: test-only change, no production UI modified.

Risk and rollout

  • Risk: None — test-only change.
  • Rollback: Revert the two emulateMedia lines.
  • Provider or production effects: None

Clinical Governance Preflight

Not applicable — no clinical, ingestion, answer, search, source, privacy, or deployment behavior changed.

Notes

@supabase

supabase Bot commented Jul 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a5f137d-40a6-4762-b451-f335ff92f9f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/fix-copilot-issue

Comment @coderabbitai help to get the list of available commands.

Copilot AI changed the title [WIP] Fix issue with Copilot in database actions fix: override reducedMotion for CSS transition check in phone dock scroll test Jul 18, 2026
Copilot AI requested a review from BigSimmo July 18, 2026 14:03
@BigSimmo
BigSimmo marked this pull request as ready for review July 18, 2026 14:05
@BigSimmo
BigSimmo merged commit 9361e37 into codex/design-audit-main-safe-20260719-clean Jul 18, 2026
2 checks passed
@BigSimmo
BigSimmo deleted the copilot/fix-copilot-issue branch July 18, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants