refactor: decompose ClinicalDashboard — answer-content + evidence-panels (move-only) - #211
Merged
Merged
Conversation
…nolith Move-only extraction of the answer render family (SourceImage, ScopeAndGovernanceNotice, the answer/source formatters, SourcePreviewContent, NaturalLanguageAnswer, UserQuestionBubble, KeyClinicalItems) into clinical-dashboard/answer-content.tsx. Block moved verbatim — the original 510-1249 range diffs empty against the new module body, and the data-testid/aria-label sha1 checksum over ClinicalDashboard.tsx + clinical-dashboard/*.tsx is byte-identical before/after. Two monolith-internal helpers used by both the moved block and the code that stays behind went to clean shared homes instead of a monolith<->module import cycle: - useMobilePreviewSheet (+ its media-query snapshot helpers) -> clinical-dashboard/use-mobile-preview-sheet.ts (matches use-theme.ts pattern) - comparableAnswerText -> clinical-dashboard/display-text.ts Retargeted the pinned guards without weakening them: the NaturalLanguageAnswer AST pin now scans answer-content.tsx (via a scannedFiles array), and the rendered-text-formatting negative regexes now scan the monolith+module corpus (verified the module trips none). Stripped the imports the move orphaned; pre-existing dead-code warnings left untouched (move-only). Gates: typecheck, lint (0 errors), pinned vitest 12/12, testid/aria checksum identical, format:check, verify:cheap (903/906; the one failure is an unrelated rag-cache timeout that passes in isolation). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…onolith Move-only extraction of the answer-evidence family (the clinical-detail/notes helper family plus AnswerSupportSummaryCard, ClinicalNotesChecklistPanel, SafetyFindingsPanel, EvidenceGapPanel, EvidenceCounts, AnswerSourceStatus, EvidenceSummaryCard, AnswerInsightBar, EvidenceVerificationStrip, AnswerFeedbackPanel, RenderModelSourceList, VerificationWorkspace, AnswerViewModeControl, EvidenceMapTable, AnswerSafetyNotice, QuoteCards) into clinical-dashboard/evidence-panels.tsx. Contiguous block 484-2311 moved verbatim — it diffs empty against the new module body, and the data-testid/aria-label sha1 checksum over ClinicalDashboard.tsx + clinical-dashboard/*.tsx is byte-identical. Monolith 7909 -> 6084 lines. This module needs a monolith<->module cycle: ClinicalNotesChecklistPanel renders <ClinicalOutputPanel/>, which stays in the monolith as the deferred B3 (output-panel) module. So evidence-panels imports ClinicalOutputPanel, clinicalQueryModeOptions, and type AnswerFeedbackType back from @/components/ClinicalDashboard - the same back-import pattern global-mockup-search-shell.tsx already uses for SettingsDialog. The repo has no import/no-cycle rule and every cyclic reference is render/runtime-time, so module init is safe (ui-smoke is the definitive build-time cycle check). The monolith imports 26 symbols back, including the exported clinical-detail helper family that output-panel will consume when it lands next. Widened rendered-text-formatting.test.ts to scan the monolith + answer-content + evidence-panels corpus (QuoteCards/EvidenceMapTable/source-snippet render surfaces moved into evidence-panels); verified the module trips none of the raw-render negative regexes. Stripped the imports the move orphaned; the two pre-existing dead imports (clinicalNotesRow, evidenceRow) are left untouched. Gates: typecheck, lint (0 errors), pinned vitest 12/12, testid/aria checksum identical, format:check, verify:cheap 906/906. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BigSimmo
enabled auto-merge (squash)
July 2, 2026 19:00
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 2, 2026
Merged
BigSimmo pushed a commit
that referenced
this pull request
Aug 14, 2026
Queues six immutable inbox requests for the work in this PR. Ordinary branches never edit the canonical ledger, so these reconcile after it lands. - done #313: the dirty-tree refusal shipped. Records the two traps only running it surfaced (the trimmed porcelain that silently disabled the guard, and guard-push's explicit --head), and notes the row's related outstanding-issues.mjs vs issues:done confusion is NOT addressed. - update #211: the plan exists, the migration does not, so the row stays open and stays deprioritised. Carries the 2026-08-12 deprioritisation conclusion forward and corrects the count it rested on — 1,445 across 269 files, not 1,266. - cancel 0e47904b: superseded by that update, which is a strict superset of it. Two pending updates on one row force a cancellation decision at reconcile regardless, so this makes the decision explicit rather than leaving it for whoever reconciles. - update #168 and #258: design and gap documentation landed; neither row is closed, because neither asked only for a document. #258's update records that its cheapest-first option is currently unavailable — checked against all three manifests, not assumed. - add: one new P2 recommendation. Two merge-loss detectors now exist and measure different things — this PR's catches a landing whose content was reverted, PR #1937's concerns a file that never landed at all — and neither covers the other's case. Also carries the undecided scheduling question this PR deliberately left open. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Chrn9bTYFFYzrLZqtpVptW
BigSimmo pushed a commit
that referenced
this pull request
Aug 14, 2026
Applies the pending inbox to docs/outstanding-issues.md as one serial transaction from a fresh origin/main base (0011a05), which is the only path allowed to edit the canonical ledger. 35 requests: 17 done, 7 add, 6 update, 5 cancel. Every request moves verbatim to docs/outstanding-issues-inbox/applied/ as its immutable audit record. One row carried competing mutations — #213, two done requests — resolved by the cancel already queued against one of them. Ledger goes from 328 to 334 rows, 115 open to 99. Includes the five requests queued by PR #1944 but left pending when it merged: closes#313 (the write-discipline dirty-tree refusal shipped), carries #211 forward with its re-measured 1,445 errors while keeping the 2026-08-12 deprioritisation judgment, records the documented state of #168 and #258, and opens #335 for the gap between the two merge-loss detectors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Chrn9bTYFFYzrLZqtpVptW
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Continues the move-only decomposition of
src/components/ClinicalDashboard.tsx(AuthPanel already landed via #202). Extracts the next two modules; the monolith shrinks from ~8.8k to ~6.1k lines.answer-content.tsx—SourceImage,ScopeAndGovernanceNotice, the answer/source formatters,SourcePreviewContent,NaturalLanguageAnswer,UserQuestionBubble,KeyClinicalItems. Two shared helpers went to clean homes (not a cycle):useMobilePreviewSheet→ newuse-mobile-preview-sheet.ts,comparableAnswerText→display-text.ts.evidence-panels.tsx— the clinical-detail/notes helper family +AnswerSupportSummaryCard,ClinicalNotesChecklistPanel,SafetyFindingsPanel,EvidenceGapPanel,EvidenceCounts,AnswerSourceStatus,EvidenceSummaryCard,AnswerInsightBar,EvidenceVerificationStrip,AnswerFeedbackPanel,RenderModelSourceList,VerificationWorkspace,AnswerViewModeControl,EvidenceMapTable,AnswerSafetyNotice,QuoteCards(contiguous block, moved verbatim).evidence-panelsneeds a monolith to module cycle:ClinicalNotesChecklistPanelrendersClinicalOutputPanel, which stays in the monolith as the deferredoutput-panel(B3). So it importsClinicalOutputPanel+clinicalQueryModeOptions+type AnswerFeedbackTypeback from@/components/ClinicalDashboard— the same patternglobal-mockup-search-shell.tsxalready uses forSettingsDialog. Noimport/no-cyclerule; all cyclic refs are render-time so init is safe (ui-smoke is the definitive check). The monolith imports 26 symbols back, including the detail-helper family output-panel will consume.Move fidelity
data-testid/aria-labelsha1 checksum overClinicalDashboard.tsx+clinical-dashboard/*.tsxis byte-identical tomain.Pinned guards — retargeted, not weakened
clinical-dashboard-merge-artifacts.test.ts: scans ascannedFilesarray;NaturalLanguageAnswerpin inanswer-content,ClinicalOutputPanelstill in the monolith, absence checks cover all files.rendered-text-formatting.test.ts: scans monolith + answer-content + evidence-panels corpus; verified modules trip none of the raw-render negative regexes.Gates
typecheck; lint 0 errors; pinned vitest 12/12; testid/aria checksum identical; format:check; verify:cheap 906/906.
Deferred (hand-off in
docs/process-hardening.mdPhase 3)output-panel.tsx(AST-pinnedClinicalOutputPanel; repoint evidence-panels' back-import when it moves), thenvisual-evidence.tsx,document-results.tsx.🤖 Generated with Claude Code