Design QA: dark mode on all routes, header overlap fixes, token migration - #124
Merged
Conversation
…ken migration - Apply resolved theme before first paint via inline script in the root layout: standalone routes (/applications, /medications/*) never mounted useTheme so they always rendered light, and the dashboard flashed light before hydration for dark-theme users. - Fix header control pile-up at 640-1300px: the fixed-width mode pill overlapped the ledger and buried the "All sources" control. The pill now flexes inside its grid column and ledger counts / scope label / New chat text reveal at xl/2xl where they fit. Ledger items needed display moved from the unlayered globals.css class to call-site utilities so responsive hidden works. - Fix composer clear button overlapping typed text (unlayered .answer-footer-search-input beat the conditional pr-11); the button is now a flex sibling with a reserved 44px slot. - Replace text-white on the bright dark-theme clinical accent with the clinical-accent-contrast token (Launch buttons, mode icons, scope badge). - Migrate raw red/blue/amber/emerald palette classes in live surfaces to the semantic danger/info/warning/success tokens. - Keep dose-ceiling values on one line with tabular figures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…aya-beb836 # Conflicts: # src/components/clinical-dashboard/master-search-header.tsx
At lg-xl widths the equal-thirds header grid leaves the right column narrower than the Local only / Saved / avatar chip group, so the chips slid under the centered mode pill. Gate the group to min-[1400px] where the column is wide enough. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remaining format:check drift (CLAUDE.md, docs/rag-*, src/lib/rag*.ts, new rag tests) pre-exists on main and is left untouched here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves theme correctness and UI layout consistency across routes, focusing on eliminating dark-mode flashes on standalone pages, fixing header/composer overlaps, and migrating hardcoded palette colors to semantic theme tokens (including forced-colors compatibility).
Changes:
- Apply resolved theme (stored preference > OS preference) before first paint via an inline script in the root layout.
- Fix header/composer layout issues (clear button text overlap; standalone header status chips overlapping the centered mode pill).
- Migrate multiple UI surfaces from raw Tailwind palette colors (
red-*,blue-*,amber-*,emerald-*,text-white) to semantic CSS tokens (danger/info/warning/success + accent contrast).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/layout.tsx | Adds an inline pre-paint theme resolver to set the dark class consistently on all routes. |
| src/components/clinical-dashboard/master-search-header.tsx | Adjusts composer clear-button layout and standalone header chip visibility breakpoint. |
| src/app/globals.css | Removes orphaned universal-header CSS and updates radius usage doc comment. |
| src/components/applications-launcher-page.tsx | Replaces text-white with --clinical-accent-contrast for better dark-theme contrast on accent surfaces. |
| src/components/ClinicalDashboard.tsx | Migrates demo notice color to --warning token and minor text wrapping adjustment. |
| src/components/clinical-dashboard/medication-prescribing-workspace.tsx | Migrates info/danger styling from raw palette classes to semantic token triads; keeps dose ceiling values on one line with tabular figures. |
| src/components/settings-search-mockups/settings-search-mockup-page.tsx | Migrates success status dot from bg-emerald-600 to semantic --success token. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
BigSimmo added a commit
that referenced
this pull request
Jul 30, 2026
The open-items table was restored by hand after a #1415 conflict merge wiped it, which left it off Prettier's formatting. verify:pr-local's format:changed gate caught it. Table integrity re-verified: 59 open rows, my two rows intact as #123 and #124, no duplicate IDs, ledger guard passing at 1287 records. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
Summary
/applications,/medications/*, and now/services,/forms) never mounteduseTheme, so they always rendered light for dark-theme users, and the dashboard flashed light before hydration..answer-footer-search-inputpadding beats the conditionalpr-11utility, so the button is now a flex sibling with a reserved 44px slot (re-applied to the mergedrenderSearchComposer).min-[1400px]where the grid column fits them.text-whiteon the clinical accent (bright light teal in dark theme, ~1.6:1 contrast) with the--clinical-accent-contrasttoken across Launch buttons, mode icons, and the scope badge.red-*/blue-*/amber-*/emerald-*palette classes in live surfaces (medication workspace, answer safety notice, settings mockup) to the semantic--danger/--info/--warning/--successtoken triads, so dark theme and forced-colors mode resolve correctly..universal-header-ledger*/-avatar/-status-dotCSS orphaned by the header redesign on main; keep dose-ceiling values on one line with tabular figures.Merged
origin/main(PRs #118/#120) into the branch and resolvedmaster-search-header.tsxin favor of main's restructured header, then re-applied the composer fix on top.Verification
npm run verify:cheap— lint, typecheck, 772 Vitest tests passednpm run verify:ui— 54 Chromium Playwright tests passednpm run verify:release— not run (no release claim)npm run format:check— fails on files untouched by this branch (CLAUDE.md,docs/rag-*,src/lib/rag*.ts, new rag tests); that drift pre-exists on main. All files touched here are prettier-clean.npm run check:production-readiness— not run (styling/theme only; no clinical workflow, privacy, env, Supabase, or governance behavior changed)npm run check:deployment-readiness— not run (no deployment behavior changed)Additional browser QA: scripted element-overlap measurement across 640–1536px widths (zero overlapping header controls), theme-precedence checks (stored theme beats OS preference on all standalone routes), and composer geometry check (0px input/clear overlap).
Clinical Governance Preflight
Presentation-only change: colors, layout, and theme application. No ingestion, answer generation, search/ranking, document access, privacy, or env behavior touched.
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
🤖 Generated with Claude Code