Skip to content

chore: prune dead mockup and primitive exports (IMP-04)#1241

Merged
BigSimmo merged 24 commits into
mainfrom
cursor/imp04-prune-dead-exports-01f2
Jul 26, 2026
Merged

chore: prune dead mockup and primitive exports (IMP-04)#1241
BigSimmo merged 24 commits into
mainfrom
cursor/imp04-prune-dead-exports-01f2

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the safe remaining follow-up from closed PR #1188 / tip commit 3bc391dff: remove dead calculator/factsheet mockup exports and unused ui-primitives tokens that have zero external importers on current main.

This is not a blind cherry-pick of the rejected tip:

  • Truly unused symbols are deleted (unexport-only left unused locals that fail eslint --max-warnings 0).
  • In-file-only helpers stay module-private.
  • Kept Skeleton and the commandInput focus shadow — the tip incorrectly removed/changed those while they are still used on main.

Merge conflict note

GitHub showed CONFLICTING/DIRTY because the branch lagged main (staleness). Local git merge origin/main was a clean auto-merge (ledger union driver; no conflict markers; no opposing edits in IMP-04 product files). Synced tip: 35decbc80. PR is now MERGEABLE.

Files

  • src/components/calculator-mockups/calculator-fixtures.ts
  • src/components/calculator-mockups/calculator-ui.tsx
  • src/components/factsheets/factsheets-data.ts
  • src/components/factsheets/factsheets-icons.ts
  • src/components/ui-primitives.tsx
  • docs/branch-review-ledger.md

Clinical Governance Preflight

  • Not applicable — mockup/export hygiene only; no clinical answer, retrieval/ranking, source governance, privacy, ingestion, document access, or production env changes.
  • RAG impact: no retrieval behaviour change — no src/lib/rag/** or ranking surfaces touched.

Test plan

  • npm run typecheck
  • eslint on touched files (--max-warnings 0)
  • npm run check:branch-review-ledger
  • Hosted PR required CI
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Accessibility

    • Improved factsheet icon rendering by ensuring decorative glyphs are hidden from assistive technologies.
  • Style

    • Refined calculator checkbox visuals (updated checkmark styling).
  • Documentation

    • Added a completed review record documenting verification steps.
    • Updated design system and UI “recipe” guidance, including aligning “warning” badges to the standard warning tone (with “quiet warning” kept private).

BigSimmo added 2 commits July 26, 2026 04:25
Delete unused calculator/factsheet helpers and ui-primitives tokens with
zero external importers. Unexport in-file-only tokens. Keep Skeleton and
the commandInput focus shadow from current main.
@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 ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 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: c2f88e58-6b5c-469b-8a81-67a30023e59a

📥 Commits

Reviewing files that changed from the base of the PR and between 9df51d7 and 7f9c56c.

📒 Files selected for processing (5)
  • docs/branch-review-ledger.md
  • docs/clinical-badge-system-guide.md
  • docs/redesign/09-ui-primitives-recipes.md
  • src/components/calculators/calculator-fixtures.ts
  • src/components/calculators/calculator-ui.tsx
📝 Walkthrough

Walkthrough

Reduced public exports across calculator mockups, factsheet modules, and shared UI primitives. Added rendered factsheet glyph helpers, removed an unused calculator hook, synchronized recipe guidance, and recorded the pruning work in the review ledger.

Changes

Dead export pruning

Layer / File(s) Summary
Calculator module surface
src/components/calculator-mockups/*
Calculator types, helpers, components, and calculatorById are now module-internal or removed; the unused state hook and related React imports were also removed.
Factsheet data and icon surface
src/components/factsheets/*
Factsheet content types and icon maps are no longer exported, while factsheetGlyph and factsheetCategoryGlyph provide rendered icon helpers.
Shared styling surface
src/components/ui-primitives.tsx, .design-sync/conventions.md, docs/clinical-badge-system-guide.md, docs/design-system.md, docs/redesign/09-ui-primitives-recipes.md
Unused styling exports were narrowed or removed, and documentation now reflects the remaining recipe, tone, icon, and focus-state contracts.
Review record updates
docs/branch-review-ledger.md
The ledger records the IMP-04 pruning port and the follow-up synchronization of UI and primitive recipe catalogs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Clear, concise title matches the main change: pruning dead mockup and primitive exports for IMP-04.
Description check ✅ Passed Covers summary, changed files, governance note, and test plan; only the template's exact verification/risk sections are partially adapted.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/imp04-prune-dead-exports-01f2

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.

@BigSimmo
BigSimmo marked this pull request as ready for review July 25, 2026 23:58
Clean auto-merge after bot sync lagged main. No content conflicts with the
dead-export prune; ledger union merge succeeded.

@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: 5a04654fcc

ℹ️ 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/ui-primitives.tsx

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/branch-review-ledger.md`:
- Line 1036: Update the READY row for commit
4739510e8650e38e3c3a3cd2d8866dcf3abb8ab6 to record npm run ensure, npm run
verify:ui, the smallest relevant domain check, npm run
check:production-readiness, and the clinical governance preflight alongside the
existing typecheck and ESLint checks.
- Around line 1035-1036: Remove the blank line separating the new 2026-07-25
record from the surrounding Markdown table in the branch review ledger, keeping
the row directly adjacent to the other table rows so it renders as a Review
Records entry.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 813698cb-d83a-467d-99ab-2585e2c66025

📥 Commits

Reviewing files that changed from the base of the PR and between c612c88 and 5a04654.

📒 Files selected for processing (6)
  • docs/branch-review-ledger.md
  • src/components/calculator-mockups/calculator-fixtures.ts
  • src/components/calculator-mockups/calculator-ui.tsx
  • src/components/factsheets/factsheets-data.ts
  • src/components/factsheets/factsheets-icons.ts
  • src/components/ui-primitives.tsx

Comment thread docs/branch-review-ledger.md Outdated
Comment thread docs/branch-review-ledger.md
@BigSimmo
BigSimmo enabled auto-merge (squash) July 26, 2026 00:16
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

The agent ran but didn't make any changes. The issues may already be fixed or require manual intervention.

@BigSimmo

Copy link
Copy Markdown
Owner Author

Hygiene review (2026-07-26): this PR is MERGEABLE against current main with green required checks (or Production UI finishing). Prior contaminated Antigravity originals were closed; this clean supersede/fix is the intended land path. No code change from this note — ready for human merge when review/blockers clear.

cursoragent and others added 2 commits July 26, 2026 00:18
Update design-sync conventions and the ui-primitives recipe reference so
they no longer advertise deleted or module-private recipes (insetCard,
iconTile, compactMetadataRow, commandInput, toneWarningQuiet, etc.).

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

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/redesign/09-ui-primitives-recipes.md`:
- Around line 165-167: Update the gap-status paragraph in the UI primitives
recipes documentation to remove gap 5 from the unresolved “Remaining” list,
leaving only gap 2 as unresolved; if gap 5 must be mentioned, label it
separately as an accepted convention rather than a remaining gap.
- Around line 80-81: Update the `commandInput` removal note in the documented
catalogue to clarify that only the exported recipe/catalogue entry was removed;
retain and explicitly identify its focus-shadow styling as global class/layer
rules, not a re-exportable utility or recipe.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 51960839-1036-4686-9ed8-274f814a13a7

📥 Commits

Reviewing files that changed from the base of the PR and between 5a04654 and 9df51d7.

📒 Files selected for processing (5)
  • .design-sync/conventions.md
  • docs/branch-review-ledger.md
  • docs/clinical-badge-system-guide.md
  • docs/design-system.md
  • docs/redesign/09-ui-primitives-recipes.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/branch-review-ledger.md

Comment thread docs/redesign/09-ui-primitives-recipes.md
Comment thread docs/redesign/09-ui-primitives-recipes.md Outdated
BigSimmo and others added 6 commits July 26, 2026 08:23
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo disabled auto-merge July 26, 2026 00:33
@BigSimmo
BigSimmo enabled auto-merge (squash) July 26, 2026 01:47
cursoragent and others added 3 commits July 26, 2026 01:49
GitHub CONFLICTING on #1241 was staleness. Merged origin/main cleanly;
removed two exact-duplicate #1238 rows re-appended by the ledger union
driver and recorded the sync.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GitHub CONFLICTING was staleness behind phone-chrome and desktop-search
fixes. merge-tree clean; only overlapping path is the append-only ledger.

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

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • docs/redesign/09-ui-primitives-recipes.md

Commit: d1d1c272bbf8ab854475da17f7d600e7d14064c0

The changes have been pushed to the cursor/imp04-prune-dead-exports-01f2 branch.

Time taken: 2m 38s

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

The agent ran but didn't make any changes. The issues may already be fixed or require manual intervention.

coderabbitai Bot and others added 7 commits July 26, 2026 03:26
Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
…ad-exports-01f2

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…01f2' into cursor/imp04-prune-dead-exports-01f2
@BigSimmo
BigSimmo merged commit 5d6f061 into main Jul 26, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the cursor/imp04-prune-dead-exports-01f2 branch July 26, 2026 04:00
cursor Bot pushed a commit that referenced this pull request Jul 26, 2026
* fix: stop choppy screen resize when switching modes

Mode switches animated phone composer reserve because searchMode updated
before the pathname landed, briefly leaving isStandaloneModeHome false and
running the 200ms padding transition. Detect mode homes from pathname only,
navigate without optimistic mode state, and limit padding transitions to
scroll-hide.

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

* test: align therapy-compass wiring with pathname mode-home gate

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

* docs(ledger): record mode-switch lag same-class bug hunt

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

* fix: close same-class mode-switch layout thrash bugs

After the reserve-flip fix, related choppiness remained from eager
crossModeSearch chrome updates, inherited phone scroll/hide across mode
homes, a hero-portal null gap while slots rebound, a taller mode-home
loading skeleton, and services/forms contentAlign jumping after registry
load. Navigate out of the dashboard without rewriting chrome, reset
scroll-hide on pathname change, keep the default composer until the
portal attaches, align the skeleton to the shell header token, and keep
loading homes top-aligned on phone.

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

* docs(ledger): record mode-switch thrash review fixes

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

* fix: satisfy lint for mode-switch scroll and portal cleanup

Reset bottom-composer hidden state during render on pathname change
instead of setState-in-effect, and drop the unused hero-portal fallback
flag now that the default composer stays mounted until the host attaches.

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

* docs(ledger): record mode-switch thrash lint closeout

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

* docs(ledger): record frontend-architecture loading/nav review

Append review of mode/page loading and navigation architecture at HEAD
0ef62ff: P1 shell bundle + hydration blanking; residual remount/tools dual.

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

* fix: reduce mode/page loading blanking and layout rework

Parallel loading review found hard-load blanking from ClientHydrationBoundary,
mismatched/missing mode-home loading skeletons, forms catalog in the client
chunk, ClinicalDashboard static weight on namespaced routes, sidebar column
animation on remount, forms query remounts, and document viewer remounts on
page flips. Paint RSC children immediately, align ModeHomeRouteLoading, wire
mode-home loading.tsx files, server-pass the default form slug, dynamic-import
ClinicalDashboard, gate sidebar transitions after mount, and stop unnecessary
remount keys.

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

* docs(ledger): record parallel loading behaviour review fixes

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

* refactor: extract sidebar transition hook and private-scope URL helper

Keeps ClinicalDashboard inside the maintainability budget after the
loading-performance pass, and shares the remount-safe sidebar transition
gate with GlobalSearchShell.

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

* test: allow DocumentViewer identity-only remount key

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

* test: align chrome contracts with pathname reset and gated padding

After merging main's cross-breakpoint scroll-hide wiring, update static
contracts for resetKey=pathname, and keep phone padding transitions gated
to scroll-hide only so mode switches still snap.

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

* fix: clear CI hydration and phone-scroll failures

Gate desktop composer portal adoption until page-owned slots mark
themselves ready after hydration, so hard-loads no longer inject a
display:contents host into still-unhydrated RSC HTML (React #418).
Update phone-scroll expectations for scroll-hide-only reserve transitions.

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

* style: prettier-format portal ready-gate files

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

* fix: keep document searches dashboard-owned and animate reserve reveal

Treat /documents/search as in-shell for cross-mode sync, keep a short-lived reserve-transition marker through hide and reveal, omit readiness cards without a default slug, and preserve URL hashes when clearing private scope refs.

* fix: stop duplicate page-root testids from searchParams Suspense

Nesting route children inside the shell's useSearchParams Suspense left a
hidden Next streaming S: clone of forms/favourites/presentation roots under
CI load. Gate always-standalone paths off that boundary and bridge params
beside the shell body so mode-home RSC paint stays.

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

* style: prettier format DocumentViewer reserve-transition import

* docs: record babysit sweep ledger rows for #1241/#1248/#1254/#1257/#1253/#1255

* refactor: extract DocumentViewer/Dashboard helpers under budgets

Pull PDF viewer mode helpers and document chrome scroll wiring into
focused modules, and isolate the dashboard desktop result composer slot,
so maintainability no-growth budgets pass after the reserve-transition
and portal ready-gate work.

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

* test: align desktop page-slot contract with extracted helper

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

* fix: satisfy hooks lint for searchParams Suspense bridge

Use useSyncExternalStore for the client-only gate and call the param
callback from layout effect deps instead of updating a ref during render.

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

* fix: seed standalone submitted search params

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

* test: stabilize phone-scroll and presentation page assertions

Drop the settled-bottom 0.24s reserve check (transition is short-lived on
data-reserve-transitioning), and scope differential presentation lookups to
the live shell scrollport so hidden Next streaming clones cannot fail strict
mode under CI load.

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

* fix: narrow submitted search param seeding

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 26, 2026
Append final land/close rows for the authorized open-PR triage:
closed unsafe audit tips #1255/#1253, and prlanded #1257/#1212/#1241/#1248/#1254/#1259.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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