mockups: let the prototype sheet reach every mockup component, and fix what that exposed - #2630
Conversation
…st one #2606 fixed the Caring Contacts prototype's share of a repository-wide defect and deliberately left the rest. This is the rest: 553 arbitrary utilities across the mockup tree produced no CSS rule at all, so the class landed on the element and nothing rendered from it and nothing failed. The fix needs both kinds of entry, which is measured rather than reasoned — counting inert utilities across every mockup component: directory entries alone 475 inert file globs alone 125 inert both together 0 inert They reach different files. A directory entry finds a tree whose files are named plainly, since `caring-contacts/mockups/product-pages.tsx` is not itself named for a mockup and no file-shape glob matches it. A file glob finds the mockups that live loose in `src/components` with no directory to name — 34 of them, and the largest single block of the 553. This commit is the scan change only. Its visual consequences are real and are being worked separately: 136 of 242 captured screens change, and a before/after geometry sweep across all 121 static mockup routes at 390px and 1440px finds no route newly overflowing horizontally, no new page errors and no route that stops loading — but four routes whose device-frame content is now crushed and clipped, and thirty-four where a control honours the `min-h-9` its author wrote and so falls below the 44px target floor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVCJgsbjoX5xqTSsj6siBc
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_75c8e5b7-bff8-4ffc-adb8-c2c3da2b1d22) |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #15708 (cancelled). That run's conclusion is an aggregate and did not exercise Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_8a3473b7-9be4-44f1-893f-5582da12de6b) |
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_09e19c6d-7a28-4b91-9f5e-05ce22eb2026) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dcfbe1db-210e-4643-a7c4-199b65e463d6) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_8f27b4f8-9a19-426c-9251-b2578c57b844) |
Summary
Two changes, the second caused by the first. #2642 was merged into this branch on 2026-09-05, so this PR now carries both.
1. The scan fix
#2606 fixed the Caring Contacts share of a repository-wide defect and deliberately left the rest. This is the rest. 553 arbitrary utilities across the mockup tree produced no CSS rule at all — the class landed on the element, nothing rendered from it, and nothing failed.
The fix needs both kinds of
@sourceentry, which is measured rather than reasoned. Counting inert utilities across every mockup component in the repository:They reach different files. A directory entry finds a tree whose files are named plainly —
caring-contacts/mockups/product-pages.tsxis not itself named for a mockup, so no file-shape glob matches it. A file glob finds the mockups that live loose insrc/componentswith no directory to name; 34 of them do, and they were the largest single block of the 553. Neither list is decorative, so please do not prune one because the other looks like it covers the same ground.136 of 242 captured screens change. I captured all 121 static mockup routes at 390px and 1440px, before and after, and compared them pixel by pixel, then ran a geometry probe over both builds so new faults could be told from pre-existing ones. Many pages get dramatically shorter as constraints finally apply:
/mockups/privacy-page-directionsgoes from 14,197px to 3,582px tall at desktop. Nothing broke outright — 0 routes newly overflow horizontally, 0 new page errors, 0 routes stopped loading.2. What the scan fix exposed, now fixed
The classes finally applying revealed two real defects. Both are remediated per case rather than swept.
Interactive controls below the 48px tap floor. The first count of "52 phone controls" was wrong, and correcting it changed the work: most of these study pages draw a desktop frame and a 390px phone frame side by side on one canvas, so a control measured at a 390px viewport is very often the one inside the desktop drawing, which is correct as it is. The tell is that the undersized count is identical at 390px and 1440px on five of the ten routes. So a control is raised only when it is genuinely a phone control —
min-h-tapoutright inside a phone frame or acompactbranch (a viewportsm:variant would resolve against the page rather than the frame, asservices-filter-refined-mockups.tsxnotes in its own header), andmin-h-tapwith ansm:variant restoring the desktop height for study-page chrome that does track the viewport.privacy-live-signal-perfectedprivacy-page-directionstools-split-panetools-command-centersearch-headingservices-filter-refinedThe residue is intentional: bare
<select>and<input>elements measured at 21–38px inside the padded wrapper that is the actual hit area — the same construction assrc/components/ui/text-field.tsx— plus the facet chips in the desktop frames.Four routes with text crushed and clipped. They drew a desktop or tablet layout inside a frame free to reflow. At 390px the frame collapsed to the page width, its fixed sidebar took nearly all of it, and the content column was left with 2px. "Brief intervention · 5 minutes" rendered into a 2px box; on
privacy-page-directionseven the page's own<h1>was clipped, along with seventeen other strings. A drawing of a wide layout should not reflow — it keeps its proportions and scrolls sideways, as this repository already does for wide tables and diagrams.therapy-navigation-contexttherapy-navigation-docktherapy-navigation-railprivacy-page-directionsNo route gained page-level horizontal overflow, and the desktop rendering of all four is unchanged in geometry.
Left alone on purpose
A taller class is the wrong fix for these, and forcing it would damage the mockup:
dictionary-browse-headerrenders a 26-letter A–Z index at 15px per letter. A 48px floor there needs a different component.filter-sheet-restyle-mockups.tsxanddocument-navigation-contract-mockups.tsxare density comparisons — 36-versus-48 is the subject of the study.source-overlay-redesign-mockups.tsxdraws one sharedMockButtoninto both the desktop and the phone frame with no flag to tell them apart.phone-inpage-navigationlives insrc/app/mockups/, where 69 utilities across four route files are still inert.globals.cssexcludes that directory with a bare-directory@source not, and seven@sourcespellings failed to re-include it. A separate defect, not addressed here.Verification
npm run verify:pr-localon the merged branch —failed: (none),not reached: (none), all 39 stages completed, including the full offline unit suite,lint,typecheckandbuild.tests/mockup-utility-emission.test.ts— 4 passed. It compiles the real stylesheet and fails if any mockup utility stops being emitted, which makes the 553 → 0 a standing check rather than a note about one afternoon.npm run format— clean, and committed.UI verification not run: the full
verify:uisuite is deferred to CI, which runs it on this PR. The route sweep above is broader than that suite for this change, since it covers every mockup route rather than the specs.An earlier gate run reported three failed test files, and it is worth recording how that was ruled out rather than waved away as a flake.
tests/clinical-hazard-controls.test.ts,tests/privacy-readiness-contract.test.tsandtests/rag-plan-package-parity.test.tseach named its own cause —reviewedCommit does not exist 883f1007a85cd4e02198f39c12c4a4e467d4b89eandmanifest reconciledBase is unavailable locally: f3d1a3cce2c943ad3083425ed9c7c46dbef23087— commits the agent container's shallow clone did not carry. Aftergit fetch --unshallow,git cat-file -tresolved both tocommitand the three passed:Test Files 3 passed (3),Tests 29 passed (29). No test was skipped, disabled, quarantined or re-run to get green. Same artefact #2559 documented on 2026-09-02, tracked as#TK9GH7/#1M0J6D.Risk and rollout
/mockups404s in production, andglobals.csskeeps its exclusion, so the production bundle is unchanged. The mockup-only sheet grows from 269.8 KB to 341.2 KB uncompressed.supabase/migrations/**.src/lib/rag/, no retrieval RPC, no ranking configuration, no golden fixture and no ranking test is modified. The diff is one mockup-only stylesheet and seven mockup components.Clinical Governance Preflight
This section is required because the diff touches two files named for privacy —
privacy-page-directions-mockups.tsxandprivacy-live-signal-perfected-mockups.tsx. Both are developer-only prototype canvases under/mockups, which 404s in production. What changes in them is a CSS class on a button and a width floor on a drawing of a desktop layout.Clinical KB Database(sjrfecxgysukkwxsowpy)Each box was checked against the diff rather than assumed. No answer, citation or source-rendering code is touched; no ingestion, upload or document workflow is added or widened; no environment value or Supabase configuration is modified and nothing here reads or writes any live service; no access-control, auth or key-handling code is touched; the mockups use their existing fixtures and no real clinical source is introduced; no metadata, governance or review-status code is touched; and no clinical decision-support behaviour changed, so the deployment classification is unaffected. The privacy prose those two mockups display is unchanged, and the production privacy page is governed by
tests/privacy-ui.test.ts, which this diff does not touch.Notes
The deeper question from #2606 is still open and is now better evidenced: the development and production builds disagree about which files Tailwind scans, so a local look at a mockup route cannot be trusted to show what production renders. This change removes the consequence for mockups; it does not explain the divergence.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CVCJgsbjoX5xqTSsj6siBc
Note
Low Risk
Changes are limited to developer mockup routes and a mockup-only stylesheet; production bundles and clinical paths are not affected.
Overview
Expands the mockup-only Tailwind sheet so utilities defined in prototype components actually emit CSS again.
mockups.cssnow pairs file-shape@sourceglobs (loose*-mockup(s).tsxfiles undercomponents) with directory@sourceentries for every mockup area—not only Caring Contacts—because each shape alone left hundreds of classes inert. Comments document the measured 553 → 0 inert count and point attests/mockup-utility-emission.test.tsas the guardrail. Productionglobals.cssexclusions are unchanged.Follow-up fixes in seven mockup components once those classes applied: phone and
compactcontrols move tomin-h-tap/h-tap(withsm:where study-page chrome should stay shorter on wide viewports), and desktop/tablet device frames getmin-w-*plus horizontal scroll so wide layout drawings stop collapsing and clipping labels on a 390px review page.Reviewed by Cursor Bugbot for commit 9717342. Configure here.