feat(settings): add a gated Development section that opens the Caring Contact prototype - #2109
Conversation
… Contact prototype Settings gains a Development section at the bottom of the rail, holding the in-progress surfaces while they are being built. Its first entry opens the Caring Contact linked prototype. - Gated on the same two conditions as `mockupsEnabled()` in src/lib/env.ts, read from bundler-inlined values rather than by importing that module: no client component imports the server env contract, and tests/client-secret-surface.test.ts holds that boundary. In a production deploy that has not opted in, the section does not render — which is exactly when /mockups/* would 404. - The desktop rail is filtered from the same predicate, so it cannot advertise a section the body does not render. The scroll-spy already reads section ids from the DOM, so a hidden section cannot desync it. - Navigation uses <Link> per docs/wiring-conventions.md and closes the sheet behind it. The card states plainly that the prototype is synthetic-only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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:26 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 101 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. 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 (3)
Comment |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #12062 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… alias The new Development section's shadow used var(--shadow-soft), tripping the design-system-contract ratchet (legacyShadowAliases 3 -> 4 for this file). Switch to shadow-[var(--e2),var(--shadow-inset)], the same pattern already used in account-setup-dialog.tsx for an identical visual effect (--shadow-soft is itself just an alias for --e2). Fixes CI job "Static PR checks" on PR #2109.
Summary
/mockups/caring-contacts, merged in feat(mockups): linked Caring Contact suicide-prevention prototype #2095).mockupsEnabled()insrc/lib/env.ts—NODE_ENV !== "production"orNEXT_PUBLIC_MOCKUPS_ENABLED === "true"— read from bundler-inlined values rather than by importing that module. No client component imports the server env contract, andtests/client-secret-surface.test.tsholds that boundary. In a production deploy that has not opted in, the section does not render, which is exactly when/mockups/*would 404 anyway.settings-dialog.tsxsaying precisely why), so a conditional section cannot desync it.<Link>perdocs/wiring-conventions.mdand closes the sheet behind it. The card states plainly that the prototype is synthetic-only — no real patient record, message or schedule.Verification
npm run verify:pr-local— by selection; the diff is one client component and one DOM test.tests/settings-dialog-actions.dom.test.tsx+tests/client-secret-surface.test.ts—Test Files 2 passed (2)/Tests 13 passed (13). The new case asserts the section renders, contains the link withhref="/mockups/caring-contacts", carries the "Temporary" marker, and that the rail lists exactly the sections that render.tsc -p tsconfig.typecheck.json --noEmit— no diagnostics, exit 0.npm run lint— exit 0.npm run check:type-scale --strict— no arbitrary font sizes.Also re-ran
tests/settings-inert-preferences.dom.test.tsxandtests/route-reachability.test.tsgreen on the pre-rebase commit.Not run, with reason: the full unit suite and
verify:ui. The change adds one conditional section to an existing dialog and no route, so the plausible failure classes are compile, lint and this dialog's own DOM contract — all covered above. CI runs the rest.npm run verify:release— provider-backed, not authorized.npm run eval:*— no retrieval, ranking or answer-generation change.npm run check:production-readiness— no clinical workflow, privacy, environment, Supabase or deployment behaviour change.Risk and rollout
settings-dialog.tsx; nothing else changes, and the section is invisible in production unlessNEXT_PUBLIC_MOCKUPS_ENABLEDis explicitly set.Notes