Fix differentials results top clipped on mobile#938
Conversation
Tall search results were vertically centered inside ModeHomeMain, so on phones the Best Answer and header band sat above the scrollport. Top-align results via an explicit contentAlign prop (cn cannot override justify-*), and prove Best Answer remains in the fold at scrollTop 0. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds configurable ChangesDifferentials alignment
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Trace the clipped differentials top to 39d14a5's always-centered flex shell. Expose exclusive contentAlign values (center/start/startOnPhone), strip stray justify-* className tokens, migrate therapy/formulation/ specifiers off fragile overrides, and add static + Playwright guards so tall results cannot silently re-center and hide their top again. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Completion checklist for this PR
PR description note: a sync workflow previously overwrote this PR body with unrelated #932 administrator/migration text. The code on this branch is the differentials top-clip fix only — please restore the correct Summary/Verification/Risk/Clinical Governance text from the agent commits if the GitHub UI still shows the wrong description. |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #3627 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Rewrite PR_POLICY_BODY.md so Sync PR policy body no longer overwrites #938 with the stale #932 admin/migration summary. Strip responsive justify-* tokens, give Chip an exclusive density scale, top-align remaining content-rich mode homes, harden the home header wait against hydration double-mount, and bind the Best Answer fold check to the header band. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@PR_POLICY_BODY.md`:
- Around line 17-19: Update the risk, rollback, and provider/production-effects
statements in PR_POLICY_BODY.md to reflect PR `#938`’s full scope, including
administrator-only access hardening, favourites/preferences persistence,
Supabase migrations, ingestion-worker redeployment, and production verification.
Do not claim the change is layout-only or has no auth, RLS, migration, provider,
or production impact; alternatively, explicitly scope the document to the
alignment stack and retain the required domain check and npm run
check:production-readiness.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 04c1cc13-d17d-4685-924a-cfbb611427e3
📒 Files selected for processing (10)
PR_POLICY_BODY.mddocs/branch-review-ledger.mdsrc/components/clinical-dashboard/differentials-home.tsxsrc/components/dsm/dsm-home-page.tsxsrc/components/forms/forms-home-page.tsxsrc/components/mode-home-template.tsxsrc/components/services/services-home-page.tsxtests/mode-home-main-align.test.tstests/ui-overlap.spec.tstests/ui-tools.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- tests/mode-home-main-align.test.ts
- tests/ui-tools.spec.ts
- src/components/mode-home-template.tsx
Record hosted Production UI / verify:ui evidence in PR_POLICY_BODY.md so the Sync PR policy body job keeps the description policy-compliant. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
CodeRabbit disposition (PR_POLICY_BODY risk lines): that comment is not actionable for this PR. It appears to have read the previous synced body from #932 (admin/favourites/migrations). Current |
Seeded forms/services homes stay startOnPhone to avoid phone clipping; loading and unseeded notices are short, so keep those vertically centred instead of pinning them under the header. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve ledger-only conflict; product auto-merge clean. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve ui-overlap gotoHome wait conflict by keeping the settled single-header assertion with a short-circuit when already unique. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep ModeHomeMain contentAlign on Specifiers home while taking the elevated results chrome. Resolve branch-review ledger by retaining both review rows. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Adopt mode=answer pin + single header#search wait from #944 so Production UI overlap checks avoid landing-preference dual-mount flakes. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Note the plan-scoped header gutter fix and the compare-dock pointer poll after integrating latest main differentials work. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Note the plan-scoped header gutter fix and the compare-dock pointer poll after integrating latest main differentials work. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
ModeHomeMain’sjustify-centerflex shell (from the edge-to-edge mobile layout), so Best Answer and the top of the list sat above the phone scrollport.contentAlignAPI (center|start|startOnPhone) onModeHomeMain, strips strayjustify-*className tokens (including responsive prefixes), and top-aligns differentials results while keeping empty homes centred.startOnPhone, and top-aligns forms/services only when their registries are seeded so short empty/loading notices stay centred.cn()Tailwind conflict resolution, and stabilizes the home header wait in overlap Playwright coverage.Verification
npx vitest run tests/mode-home-main-align.test.ts— 5/5 ModeHomeMain alignment contract.differentials search badges stay single-line on narrow viewport— Best Answer fold + rank1proof.tests/ui-overlap.spec.ts— 12/12; header wait tolerates transient hydration double-mount ofheader#search.npm run verify:ui— hosted Production UI gate green on this PR head (includes the differentials fold + overlap journeys).Risk and rollout
ModeHomeMainbehavior.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
39d14a51madeModeHomeMainaflex-1 justify-centershell.cn()concatenates classes and does not merge Tailwind, so call-sitejustify-startoverrides were non-deterministic.contentAlignover anyjustify-*inclassNameonModeHomeMain.