refactor: extract ClinicalOutputPanel into output-panel module (move-only) - #214
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>
…dule Move-only extraction of ClinicalOutputPanel (block 487-688) into clinical-dashboard/output-panel.tsx. Moved verbatim — the original 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. Monolith 6084 -> 5882 lines. Cleanest move so far: empty danger set (no monolith-internal deps) and empty reverse set (the monolith never rendered ClinicalOutputPanel — its only consumer is evidence-panels' ClinicalNotesChecklistPanel). This replaces the previous evidence-panels<->monolith cycle with an evidence-panels<->output-panel one: evidence-panels now imports ClinicalOutputPanel from clinical-dashboard/output-panel (it still imports clinicalQueryModeOptions + type AnswerFeedbackType from the monolith); output-panel imports the detail-helper family + AnswerViewModeControl/EvidenceMapTable from evidence-panels. Same runtime-safe cycle pattern; ui-smoke is the build check. Retargeted the AST pin (ClinicalOutputPanel now resolves via the scannedFiles array's output-panel.tsx entry) and added output-panel.tsx to the rendered-text-formatting corpus. Stripped 8 now-orphaned monolith imports. Gates: typecheck, lint (0 errors), pinned vitest 12/12, testid/aria checksum identical, format:check, verify:cheap 907/907. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BigSimmo
enabled auto-merge (squash)
July 2, 2026 19:46
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 3, 2026
Merged
4 tasks
cursorBot
pushed a commit
that referenced
this pull request
Aug 6, 2026
Close the order gap so the recommended execution queue no longer points at resolved viewer gesture/a11y work. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
11 tasks
BigSimmo added a commit
that referenced
this pull request
Aug 6, 2026
* docs: plan PDF and photo viewer redesign programme Capture a phased plan for DocumentViewer/PDF canvas/lightbox work: Phase 0 gesture+a11y debt (#214/#219/#215), shell extraction, unified DocumentFrame chrome, then function and optimisation — with hard chrome/privacy/pixel-fidelity constraints and verification ladders. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * ci: retrigger after Actions queue timeout Prior CI run cancelled/timed out while queued during the GitHub Actions major outage. Empty commit to re-fire checks on current tip. 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>
BigSimmo added a commit
that referenced
this pull request
Aug 7, 2026
* fix: close high-win Grok batch (tokens, a11y, perf, gates) - Drop unused --med-accent-soft (#157) - Document Chip compact=11px / standard=12px (#220) - Reveal phone chrome on source change at top (#176) - Passive wheel listener for modifier-gated PDF zoom (#214) - Point npm run typecheck at source-only tsconfig (#210) - Fail outstanding-issues when queue cites non-open IDs (#201) Also confirms MatchExplanationChips, Favourites empty-state, DocumentFrame role=alert, and refetching dimming claim are already resolved on main (#223/#225/#219/#246). * issues: archive grok-batch wins #157#176#201#210#214#219#220#223#225#246 Prune them from the recommended queue so the new queue-membership gate stays green. * fix: address PR #1651 review (double-zoom, issues:done, tokens) - Keep viewer wheel listener non-passive while wheelZoom is on and preventDefault on Ctrl/⌘+wheel / trackpad pinch so PDF zoom does not also zoom the browser page (Sentry/Devin). - Prune recommended-queue ID citations in resolveIssue so issues:done stays writable under the #201 gate. - Drop restated Chip pixel values from TOKENS.md; amend #214 archive note. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix: recompute issues-queue Order boundary after deletions Devin: pruneResolvedIdFromQueue used a pre-splice openStart for renumbering, so enough solo-queue deletions could rewrite Open items headers/ids. Recompute the section limit after edits and cover it in the writer self-test. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs: record Run PR sweep ledger for PR #1651 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>
cursorBot
pushed a commit
that referenced
this pull request
Aug 7, 2026
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo added a commit
that referenced
this pull request
Aug 7, 2026
* fix(viewer): Phase 0 gesture INP, preview a11y, image decode Make PDF wheel listeners passive by default and attach non-passive only for unmodified wheel-zoom or active Ctrl/⌘ pinch (#214). Announce canvas/non-PDF preview failures with role=alert and LiveAnnouncer (#219). Add lightbox decoding=async and SignedImage priority for above-fold loads (partial #215). Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * chore: format Phase 0 viewer fixes and close#214/#219 Archive gesture INP and preview-announce ledger rows; note partial #215 progress for lightbox decode and SignedImage priority. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * issues: drop #214/#219 from recommended queue after archive Close the order gap so the recommended execution queue no longer points at resolved viewer gesture/a11y work. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * test: fix SignedImage priority IntersectionObserver mock types Avoid assigning read-only observer fields in the jsdom mock so typecheck stays green under the Phase 0 priority coverage. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix(ui-smoke): scope document-frame asserts to the visible owner Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix(viewer): single preview-failure announce path; complete issues queue Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix(viewer): align gesture tests with main non-passive #214 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>
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
ClinicalDashboard.tsx(AuthPanel via #202; answer-content + evidence-panels via #211). ExtractsClinicalOutputPanel(block 487–688) intoclinical-dashboard/output-panel.tsx. Monolith 6084 → 5882 lines.The cleanest move so far: empty danger set (no monolith-internal dependencies) and empty reverse set — the monolith never rendered
ClinicalOutputPanel; its only consumer is evidence-panels'ClinicalNotesChecklistPanel.Cycle cleanup
This replaces the evidence-panels↔monolith cycle (introduced in #211) with a tidier evidence-panels↔output-panel one:
evidence-panelsnow importsClinicalOutputPanelfromclinical-dashboard/output-panel(it still importsclinicalQueryModeOptions+type AnswerFeedbackTypefrom the monolith).output-panelimports the detail-helper family +AnswerViewModeControl/EvidenceMapTablefromevidence-panels.Same runtime-safe cycle pattern (no
import/no-cyclerule; render-time refs); ui-smoke is the build-time check.Move fidelity
data-testid/aria-labelsha1 checksum overClinicalDashboard.tsx+clinical-dashboard/*.tsxis byte-identical tomain.Pinned guards
clinical-dashboard-merge-artifacts.test.ts: addedoutput-panel.tsxto thescannedFilesarray — the AST-pinnedClinicalOutputPanelnow resolves there.rendered-text-formatting.test.ts: addedoutput-panel.tsxto the scanned corpus (verified it trips none of the raw-render negative regexes).Gates
typecheck; lint 0 errors; pinned vitest 12/12; testid/aria checksum identical; format:check; verify:cheap 907/907.
Deferred (hand-off in
docs/process-hardening.mdPhase 3)2 modules left:
visual-evidence.tsx,document-results.tsx.🤖 Generated with Claude Code