Skip to content

Make answer loading pulse reliable on iPhone and PWA - #1995

Merged
BigSimmo merged 3 commits into
mainfrom
codex/search-phone-animation-20260815
Aug 15, 2026
Merged

Make answer loading pulse reliable on iPhone and PWA#1995
BigSimmo merged 3 commits into
mainfrom
codex/search-phone-animation-20260815

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • move the bright answer-activity ECG pulse from an animated SVG path onto a normal HTML opacity layer
  • keep the implementation CSS-only and compositor-friendly, with no timer or animation dependency
  • add a WebKit regression assertion that compares rendered pixels across pulse phases instead of trusting computed animation metadata
  • preserve reduced-motion and forced-colour behavior

Root cause

The prior WebKit fix changed the SVG path animation to opacity, but it still animated the SVG child itself. Mobile WebKit can report that animation as running without repainting the SVG, particularly in an installed PWA. The previous test checked computed opacity only, so it could pass while the user saw a static trace.

Verification

  • npm run format — passed
  • npm test -- tests/answer-activity-trace-css.test.ts — 3/3 passed
  • npm run test:e2e -- tests/answer-progress-ui-smoke.spec.ts --project=webkit --grep 'follow-up answer generation stays compact|answer progress keeps focus' — 2/2 passed against a production build; raster buffers differ between pulse phases
  • production build and TypeScript compilation completed successfully; 1,713 static pages generated
  • npm run check:design-system-contract — passed
  • npm run check:branch-review-ledger — passed
  • npm run verify:phone-chrome -- --dry-run --files ... — selector inspected; the full broad phone-chrome/UI suite was not run because the shared globals.css trigger expands into unrelated routes
  • pre-push lint/typecheck lease — lint not run because another Database worktree held the heavyweight browser-test lease; the production build did complete TypeScript checking
  • npm run ensure — local development readiness timed out while compiling the proxy; the isolated production server used by Playwright started and completed the focused WebKit tests

Accessibility and device boundary

System or app-level reduced motion intentionally suppresses the pulse. Forced-colour behavior remains covered. Playwright WebKit verifies actual raster change, but final installed-PWA acceptance still requires a cold physical-iPhone check after deployment.

Risk and rollback

Low, isolated presentation-layer change. Revert this PR to restore the previous SVG-child opacity animation.

RAG impact: no retrieval behaviour change.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@supabase

supabase Bot commented Aug 15, 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 Aug 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 3 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3810e88f-83f3-446c-a85e-ab3851e1b2e7

📥 Commits

Reviewing files that changed from the base of the PR and between 512b8c2 and 3c6b86a.

📒 Files selected for processing (5)
  • docs/branch-review-records/887618b97bf3256125def037cd1b5e87659aaa9b1439015c6354eb96e19d0c46.record.md
  • src/app/globals.css
  • src/components/clinical-dashboard/answer-status.tsx
  • tests/answer-activity-trace-css.test.ts
  • tests/answer-progress-ui-smoke.spec.ts

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

@BigSimmo
BigSimmo enabled auto-merge (squash) August 15, 2026 18:31
@BigSimmo
BigSimmo merged commit f80aff0 into main Aug 15, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the codex/search-phone-animation-20260815 branch August 15, 2026 18:38
BigSimmo added a commit that referenced this pull request Aug 17, 2026
…ress (#2046)

* fix(a11y): stop OS Reduce Motion from freezing and hiding answer progress

The answer-loading panel was reported dead on a physical iPhone in both
Safari and the installed PWA. Three prior PRs (#1974, #1989, #1995)
diagnosed it as a Mobile WebKit repaint bug and all three failed on the
device. The cause was this app's own reduced-motion CSS: with iOS Reduce
Motion on, the universal suppression rule froze every animation on the
page (including the step spinner) and the ECG trace was additionally set
to `opacity: 0`, so the only progress indicator disappeared entirely.

Every gate stayed green because playwright.config.ts applies
`reducedMotion: "reduce"` suite-wide while the one spec asserting the
animation opts out to "no-preference" first, so the default user
configuration was never exercised. The only WebKit project is Desktop
Safari; there was no mobile-WebKit coverage at all.

Three changes:

1. Suppressing motion no longer deletes the indicator. The reduced-motion
   rules stop the animation but leave a legible static trace instead of
   `opacity: 0`.

2. New tri-state Motion preference (System / Reduced / Full). "Full" is an
   explicit opt-in that overrides an OS Reduce Motion request, because iOS
   Reduce Motion is commonly enabled for app-launch zoom rather than
   vestibular sensitivity and there was no in-app way to get the feedback
   back. Default stays "system", so nobody silently gains motion. The
   `motion-reduce`/`motion-safe` Tailwind variants are redefined via
   @custom-variant so the override reaches all 164 call sites.

3. The pulse becomes a travelling sweep. The previous whole-line opacity
   fade (0.2 -> 1.0 over 1.8s) technically ran but was too subtle on a
   phone hairline to read as motion. It is now a continuously scrolling
   ECG strip driven only by `transform: translateX`, reusing the
   compositor recipe `.animate-skeleton-shimmer::after` already relies on.

Adds tests/ui-phone-motion.spec.ts covering the exact reported
configuration (phone + OS Reduce Motion), which nothing covered before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UYndHWrYJzirxbBvt68Tmx

* docs(ledger): record phone/PWA animation defect review

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UYndHWrYJzirxbBvt68Tmx

* docs(issues): capture phone motion verification follow-ups

Four inbox requests from the PR #2046 investigation. They travel with
their owning product PR rather than a dedicated ledger-only branch, per
the AGENTS.md PR-bundling rule.

- P2 issue: playwright.config.ts applies reducedMotion:"reduce" suite-wide,
  so no gate reflects the default user configuration. That inversion is why
  three PRs shipped green against a broken phone.
- P2 task: no mobile-WebKit or display-mode:standalone Playwright project;
  phone coverage is a narrow viewport on desktop engines, while the only
  phone-AND-standalone CSS in the repo goes untested.
- P3 task: physical iPhone acceptance still owed for this fix, in Safari
  and the installed PWA with Motion set to Full.
- P3 rec: three dead spring easing tokens in globals.css.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UYndHWrYJzirxbBvt68Tmx

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

1 participant