Skip to content

Wire clinical calculators into Tools catalogue#1227

Merged
BigSimmo merged 23 commits into
mainfrom
cursor/wire-calculators-tools-2bcb
Jul 26, 2026
Merged

Wire clinical calculators into Tools catalogue#1227
BigSimmo merged 23 commits into
mainfrom
cursor/wire-calculators-tools-2bcb

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes the best calculators design (calculators-search-page) to a production /calculators route and adds it to the Tools catalogue so clinicians can open bedside rating-scale calculators from /tools.

Changes

  • New production page: /calculators (src/app/(search-app)/calculators/page.tsx) using the search-results + popup scoring UI.
  • Moved src/components/calculator-mockups/src/components/calculators/ (production-safe imports; mockup routes kept as thin wrappers).
  • Tools catalogue + launcher tile: Calculators/calculators.
  • Shell: hide the global composer on /calculators (page-owned desktop top + phone dock); zero shell reserve with page pad.
  • Docs: docs/site-map.md, docs/codebase-index.md, docs/search-chrome-behaviour.md.
  • CI follow-up: Prettier on calculators page / codebase index; Tools task-directory mockup counts updated for the 9th tool.

Proof

Tools page showing Calculators tile
Calculators page

RAG impact: no retrieval behaviour change — Tools navigation and a client-side calculator UI only.

Verification

  • npm run verify:cheap (3424 passed)
  • Focused Vitest: tools-catalog, search-shell-props, mobile-composer-reserve, route-reachability (26/26)
  • npm run format:check / Prettier on changed files
  • UI verification not run: used targeted browser smoke via npm run ensure (Tools → Calculators); Advisory/Production UI CI covers Playwright
  • Verification not run: npm run verify:pr-local full gate deferred to CI after the Prettier/count fix push

Risk and rollout

  • Risk: Medium clinical-surface risk — ships psychiatry rating-scale calculators as a Tools entry. Scores are source-cited decision support and explicitly do not replace clinical assessment; fixture pathway links remain local until live related-content wiring.
  • Rollback: Revert this PR / remove the Tools catalogue entry and /calculators route.
  • Provider or production effects: None

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Calculators are client-side scoring fixtures with cited sources and severity bands; UI copy states they support clinical judgement and never replace a full assessment.
  • Advanced filters remain an explicit coming-soon placeholder.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Promote the calculators search-page mockup to a production route under
the shared search shell, add a Tools catalogue entry linking to
/calculators, and teach the shell that calculators owns its composer.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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 Plus

Run ID: ff184aca-fa1e-44ad-9f64-8c5df7699bc1

📥 Commits

Reviewing files that changed from the base of the PR and between 39d509e and 98603bf.

📒 Files selected for processing (34)
  • docs/codebase-index.md
  • docs/search-chrome-behaviour.md
  • docs/site-map.md
  • scripts/check-design-system-contract.mjs
  • src/app/(search-app)/calculators/page.tsx
  • src/app/mockups/calculators-bedside-sheet/page.tsx
  • src/app/mockups/calculators-clinical-console/page.tsx
  • src/app/mockups/calculators-directory-grid/page.tsx
  • src/app/mockups/calculators-guided-flow/page.tsx
  • src/app/mockups/calculators-popup-sheet/page.tsx
  • src/app/mockups/calculators-search-page/page.tsx
  • src/app/mockups/calculators-search/page.tsx
  • src/components/applications-launcher-page.tsx
  • src/components/calculator-mockups/index.ts
  • src/components/calculators/bedside-sheet.tsx
  • src/components/calculators/calculator-fixtures.ts
  • src/components/calculators/calculator-pathways.ts
  • src/components/calculators/calculator-sheet.tsx
  • src/components/calculators/calculator-ui.tsx
  • src/components/calculators/clinical-console.tsx
  • src/components/calculators/directory-grid.tsx
  • src/components/calculators/guided-flow.tsx
  • src/components/calculators/index.ts
  • src/components/calculators/search-detail.tsx
  • src/components/calculators/search-page.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/mobile-composer-reserve.ts
  • src/components/tools-page-mockups/tool-fixtures.ts
  • src/lib/search-shell-props.ts
  • src/lib/tools-catalog.ts
  • tests/mobile-composer-reserve.test.ts
  • tests/search-shell-props.test.ts
  • tests/tools-catalog.test.ts
  • tests/ui-tools-task-directory.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/wire-calculators-tools-2bcb

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.

❤️ Share

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

@supabase

supabase Bot commented Jul 25, 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 ↗︎.

cursoragent and others added 3 commits July 25, 2026 16:53
Drop the Mockup alias and point the mockup route at the production export.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Production calculators must use size-tap tokens for the design-system contract.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Static PR checksneeds 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 #5784 (success).

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 July 26, 2026 00:25
@BigSimmo
BigSimmo enabled auto-merge (squash) July 26, 2026 00:29

@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

onFocusCapture={() => setDockFocused(true)}

P2 Badge Clear the dock focus latch when opening a calculator

On a phone, focus the bottom input, narrow the query to one result, and press Enter: submitSearch sets openId, so activeCalc immediately unmounts this focused dock without firing its blur handler and dockFocused remains true. After closing the sheet, dockHidden = footerHidden && !dockFocused keeps the footer forced visible until another explicit focus/blur cycle, while the shell header can still hide; reset the latch when opening/unmounting and cover the submit-close-scroll sequence.

AGENTS.md reference: AGENTS.md:L219-L219

ℹ️ 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/app/(search-app)/calculators/page.tsx
Comment thread src/app/(search-app)/calculators/page.tsx
Comment thread src/lib/tools-catalog.ts
@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. 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. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. 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. Chef's kiss.

Reviewed commit: 76b6f8d562

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

Prettier was failing on the calculators page and codebase index.
Advisory UI expected 8 tools; Calculators brings the mockup catalog to 9.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…om/BigSimmo/Database into cursor/wire-calculators-tools-2bcb

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo merged commit 5475fcf into main Jul 26, 2026
34 of 35 checks passed
@BigSimmo
BigSimmo deleted the cursor/wire-calculators-tools-2bcb branch July 26, 2026 01:22
cursor Bot pushed a commit that referenced this pull request Jul 26, 2026
Git merge-tree was clean (staleness). Accepts main #1227 calculator
package relocation; calculator-mockups prune from this branch is
superseded by that move and needs a separate re-port decision.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 26, 2026
GitHub CONFLICTING was staleness; merge-tree clean. Calculator rename from
#1227 carried the IMP-04 prune onto src/components/calculators/.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sign up for free to 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