Skip to content

refactor: extract document-admin — completes ClinicalDashboard decomposition (move-only) - #251

Merged
BigSimmo merged 1 commit into
mainfrom
claude/clinical-dashboard-admin-2
Jul 3, 2026
Merged

refactor: extract document-admin — completes ClinicalDashboard decomposition (move-only)#251
BigSimmo merged 1 commit into
mainfrom
claude/clinical-dashboard-admin-2

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

What — completes the ClinicalDashboard decomposition 🎉

Extracts the last admin surface, the document-management family, into clinical-dashboard/document-admin.tsx (~1,050-line block, move-only): the label helpers (tagQualityTone, labelTierTone, documentLabelTypeOptions, tagQualityLabel, normalizedLabelReviewRow, labelTypeDisplay, LabelReviewMutationBody), DocumentLabelReviewPanel, DocumentTagQualityPanel, DocumentIndexRepairPanel, DocumentDrawer, the drawer types/helpers, and DrawerGroupLabel.

Monolith 3,934 → 2,890 lines. This finishes the whole initiative: ClinicalDashboard.tsx is now just the main orchestrator + its state hooks (~8,800 → 2,890 lines overall).

No runtime cycle

The only monolith dependency is the erased type DocumentPagination (now exported for the back-import). The monolith imports DocumentDrawer + DrawerGroupLabel + 6 drawer types back; the label helpers and the three review panels are internal (only DocumentDrawer renders them). It's a leaf — no extracted module references it.

Move fidelity

  • Block cut verbatim — the original range diffs empty against the new module body.
  • data-testid / aria-label sha1 checksum over ClinicalDashboard.tsx + clinical-dashboard/*.tsx is byte-identical to main.
  • Stripped 39 orphaned monolith imports via the import-aware trimmer; two pre-existing dead imports left untouched.

Gates

typecheck; lint 0 errors; pinned vitest 12/12; testid/aria checksum identical; format:check; verify:cheap 994/994.

Decomposition complete

Nine modules now live in src/components/clinical-dashboard/: auth-panel, answer-content, evidence-panels, output-panel, visual-evidence, document-results, settings-dialog, dashboard-nav, document-admin. Nothing of the approved-or-deferred scope remains in the monolith beyond the orchestrator and its hooks.

🤖 Generated with Claude Code

…mposition
Move-only extraction of the document-management admin family (label helpers
tagQualityTone/labelTierTone/documentLabelTypeOptions/tagQualityLabel/
normalizedLabelReviewRow/labelTypeDisplay + LabelReviewMutationBody type,
DocumentLabelReviewPanel, DocumentTagQualityPanel, DocumentIndexRepairPanel,
DocumentDrawer, drawer types/helpers, DrawerGroupLabel) into
clinical-dashboard/document-admin.tsx. Block 401-1454 moved verbatim; testid/aria
checksum byte-identical. Monolith 3934 -> 2890 lines.
No runtime cycle: the only monolith dependency is the erased type DocumentPagination
(now exported for the back-import). The monolith imports DocumentDrawer +
DrawerGroupLabel + 6 drawer types back; the label helpers and the three review
panels are internal (only DocumentDrawer renders them). Stripped 39 orphaned
monolith imports via the import-aware trimmer.
This completes the ClinicalDashboard decomposition: the monolith is now the main
orchestrator + state hooks only (~8.8k -> 2.9k lines). Nine modules live in
clinical-dashboard/: auth-panel, answer-content, evidence-panels, output-panel,
visual-evidence, document-results, settings-dialog, dashboard-nav, document-admin.
Gates: typecheck, lint (0 errors), pinned vitest 12/12, testid/aria checksum
identical, format:check.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 3, 2026 14:43
@BigSimmo
BigSimmo merged commit a0a600f into mainJul 3, 2026
4 checks passed
@BigSimmo
BigSimmo deleted the claude/clinical-dashboard-admin-2 branch July 3, 2026 14:50
BigSimmo added a commit that referenced this pull request Aug 5, 2026
* issues: clarify #250 waves do not outrank A1 acuity
Orphaned follow-up from PR #1624 auto-merge race. Wave packaging is the
engineering track only; recommended-queue A1 rows stay acuity-first, and
Wave 0 queue repair is marked landed with the #249#251 capture.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* ledger: record prlanded for merged PR #1624
Squash b03b51d landed the 1:1 queue repair; note orphaned #250 clarify
fix-forwarded on this branch.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* fix(issues): clarify #250 A1 track vs engineering waves
Separate approval-gated A1 work from Wave 4, keep #22/#183 as A2 operator
track, and restore append-only ledger order for the #1624 prlanded row.
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>
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.

1 participant

@BigSimmo