Skip to content

Hide cross-mode suggestions in prescribing mode and fix medication card insets on phones - #1832

Merged
BigSimmo merged 5 commits into
mainfrom
codex/remove-other-nodes-from-medications-search
Aug 12, 2026
Merged

Hide cross-mode suggestions in prescribing mode and fix medication card insets on phones#1832
BigSimmo merged 5 commits into
mainfrom
codex/remove-other-nodes-from-medications-search

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Motivation

  • Cross-mode "Also matches in other modes" suggestions were appearing above medication prescribing results and pushing primary medication content (count, patient details, cards) off the phone viewport.
  • Phone breakpoints were using a full-bleed workspace layout that caused card edges and patient strip gutters to be visually cut off on some devices, producing an inconsistent UI and horizontal-overflow risk.

Description

  • Suppress the cross-mode panel for medication/prescribing searches by returning null when modeId === "prescribing" in src/components/clinical-dashboard/universal-search-also-matches.tsx so the medication result surface remains primary on phones.
  • Adjust phone responsive CSS in src/app/globals.css to 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.
  • Update the Playwright responsive test to assert the cross-mode panel is absent and that phone/tablet cards remain inset and not horizontally overflowing in tests/ui-stress.spec.ts.
  • Files changed: src/components/clinical-dashboard/universal-search-also-matches.tsx, src/app/globals.css, tests/ui-stress.spec.ts.

Testing

  • Ran the focused Playwright e2e assertion: 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).
  • Verified the local app with npm run ensure and confirmed the running instance belonged to the Clinical KB project and served the medication search route used by the screenshot check.
  • Performed a headless browser check that navigated to the prescribing search page and captured a screenshot; programmatic checks confirmed the universal-also-matches node count was 0 and the medication workspace reported inset geometry (left/right insets present).
  • Ran repository housekeeping: npm run format and git diff --check to ensure formatting and basic diff checks were clean.
  • All automated checks above succeeded for this focused change; no broader verification (full test matrix or Playwright suite) was run automatically beyond the focused e2e test. If you want broader verification (npm run verify:ui or the full Playwright suite), I can run that next.

Codex Task

@supabase

supabase Bot commented Aug 12, 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 12, 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: 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 @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: d1950b07-00b3-4d78-bbfc-de677bebcd53

📥 Commits

Reviewing files that changed from the base of the PR and between 2dfb61c and 36721f9.

📒 Files selected for processing (5)
  • src/app/globals.css
  • src/components/clinical-dashboard/universal-search-also-matches.tsx
  • tests/audit-navigation-auth-regressions.test.ts
  • tests/helpers/style-contracts.ts
  • tests/ui-stress.spec.ts

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

Comment thread src/components/clinical-dashboard/universal-search-also-matches.tsx

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread src/components/clinical-dashboard/universal-search-also-matches.tsx
@BigSimmo

Copy link
Copy Markdown
Owner Author

@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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

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".

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 3 failed job(s):

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

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.

@BigSimmo
BigSimmo enabled auto-merge August 12, 2026 06:35

Copilot AI 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.

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.

Comment thread tests/ui-stress.spec.ts Outdated
cursoragent and others added 2 commits August 12, 2026 07:50
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>
@BigSimmo

Copy link
Copy Markdown
Owner Author

Babysit update (36721f97)

Synced origin/main (post-#1830) and cleared the required blockers on this tip:

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.

@BigSimmo
BigSimmo merged commit 975c058 into main Aug 12, 2026
50 checks passed
@BigSimmo
BigSimmo deleted the codex/remove-other-nodes-from-medications-search branch August 12, 2026 08:03
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.

3 participants