Hide cross-mode suggestions in prescribing mode and fix medication card insets on phones - #1832
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 49 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15a3af8dbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch codex/remove-other-nodes-from-medications-search at starting commit 15a3af8; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:codex/remove-other-nodes-from-medications-search, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
CI triageCI failed on this PR. Automated classification of the 3 failed job(s):
Compared with main CI run #9808 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the prescribing (medication) search experience on smaller viewports by removing the cross-mode “also matches” panel for prescribing mode and tightening mobile CSS so medication results remain visually inset (avoiding full-bleed cutoffs/overflow), with an accompanying Playwright stress assertion update.
Changes:
- Suppress rendering of the cross-mode “also matches” panel when
modeId === "prescribing". - Update phone breakpoint CSS for medication results to keep the dashboard gutter/safe-area insets and improve mobile card spacing.
- Update the medication responsive Playwright stress test to assert the cross-mode panel is absent and to validate inset geometry instead of full-bleed expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/clinical-dashboard/universal-search-also-matches.tsx | Returns null in prescribing mode so the cross-mode suggestion panel doesn’t displace medication results. |
| src/app/globals.css | Revises phone breakpoint spacing/insets for medication result surfaces to avoid full-bleed clipping/overflow. |
| tests/ui-stress.spec.ts | Updates responsive stress assertions to check the cross-mode panel is absent and that medication cards remain inset across breakpoints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Drop the redundant medication-mobile-results gap literal (Tailwind gap-2 already applies), remove stale style-contract exemptions, disable universal search while prescribing is hidden, and soften phone inset alignment assertions to a 1px tolerance. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Babysit update (
|
| Blocker | Fix |
|---|---|
Static PR / design-system rawGapLiterals 13→14 |
Removed redundant .medication-mobile-results { gap: 0.5rem } — Tailwind gap-2 on the grid already supplies spacing |
| Unit / stale style-contract exemptions | Deleted medication-mobile-results and medication-patient-strip exemptions |
| Sentry + Codex: wasted universal search on wide prescribing | searchActive now requires modeId !== "prescribing" |
Copilot: toBeCloseTo(..., 0) flake risk |
≤1px absolute tolerance in ui-stress phone inset asserts |
Review threads replied + resolved. Local proof: check:design-system-contract pass; style-contract-registry + audit-navigation-auth-regressions 26/26. Leaving merge/auto-merge to you.
Motivation
Description
nullwhenmodeId === "prescribing"insrc/components/clinical-dashboard/universal-search-also-matches.tsxso the medication result surface remains primary on phones.src/app/globals.cssto preserve the dashboard phone gutter and safe-area paddings for medication results, patient strip and mobile cards (reduce workspace expansion, increase inset/padding values, and improve mobile card spacing) so edges are visible and rounded corners are preserved.tests/ui-stress.spec.ts.src/components/clinical-dashboard/universal-search-also-matches.tsx,src/app/globals.css,tests/ui-stress.spec.ts.Testing
npm run test:e2e -- tests/ui-stress.spec.ts --project=chromium --grep "phone and tablet cards", which executed the responsive medication card test and passed (1 passed).npm run ensureand confirmed the running instance belonged to the Clinical KB project and served the medication search route used by the screenshot check.universal-also-matchesnode count was0and the medication workspace reported inset geometry (left/right insets present).npm run formatandgit diff --checkto ensure formatting and basic diff checks were clean.npm run verify:uior the full Playwright suite), I can run that next.Codex Task