Skip to content

feat(settings): add a gated Development section that opens the Caring Contact prototype - #2109

Merged
BigSimmo merged 6 commits into
mainfrom
claude/settings-development-section
Aug 18, 2026
Merged

feat(settings): add a gated Development section that opens the Caring Contact prototype#2109
BigSimmo merged 6 commits into
mainfrom
claude/settings-development-section

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Adds a Development section at the bottom of Settings, holding in-progress surfaces while they are being built. Its first entry opens the Caring Contact linked prototype (/mockups/caring-contacts, merged in feat(mockups): linked Caring Contact suicide-prevention prototype #2095).
  • Gated on the same two conditions as mockupsEnabled() in src/lib/env.tsNODE_ENV !== "production" or NEXT_PUBLIC_MOCKUPS_ENABLED === "true" — 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 anyway.
  • The desktop section rail is filtered from the same predicate, so it cannot advertise a section the body will not render. The scroll-spy already reads section ids from the DOM (there is a comment in settings-dialog.tsx saying precisely why), so a conditional 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 — 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.tsTest Files 2 passed (2) / Tests 13 passed (13). The new case asserts the section renders, contains the link with href="/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.tsx and tests/route-reachability.test.ts green 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

  • Risk: Low. One conditional section in settings-dialog.tsx; nothing else changes, and the section is invisible in production unless NEXT_PUBLIC_MOCKUPS_ENABLED is explicitly set.
  • Rollback: revert this PR's squash commit.
  • Provider or production effects: None.

Notes

  • Temporary by design, and labelled as such in the UI: it is a development affordance while the Caring Contact system is being built, not a permanent product surface. When the prototype graduates or is dropped, this section goes with it.

… 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>
@supabase

supabaseBot commented Aug 18, 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

coderabbitaiBot commented Aug 18, 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: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 @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: 15e2189d-d645-4321-8fd8-e2cc58ae54ab

📥 Commits

Reviewing files that changed from the base of the PR and between 9c79fa0 and 5e96922.

📒 Files selected for processing (3)
  • docs/branch-review-records/5b03318c07763efecca63e3f476dd4dfa1757c1297c491599e715bfbe3739a04.record.md
  • src/components/clinical-dashboard/settings-dialog.tsx
  • tests/settings-dialog-actions.dom.test.tsx

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

@github-actions

github-actionsBot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Production UI (1)needs 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 #12062 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo marked this pull request as ready for review August 18, 2026 11:33
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 18, 2026 11:34
BigSimmoand others added 4 commits August 18, 2026 19:51
… 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.
@BigSimmo
BigSimmo merged commit bf85de9 into mainAug 18, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the claude/settings-development-section branch August 18, 2026 12:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude