Skip to content

Design QA: dark mode on all routes, header overlap fixes, token migration - #124

Merged
BigSimmo merged 4 commits into
mainfrom
claude/kind-visvesvaraya-beb836
Jul 2, 2026
Merged

Design QA: dark mode on all routes, header overlap fixes, token migration#124
BigSimmo merged 4 commits into
mainfrom
claude/kind-visvesvaraya-beb836

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Apply the resolved theme before first paint via an inline script in the root layout. Standalone routes (/applications, /medications/*, and now /services, /forms) never mounted useTheme, so they always rendered light for dark-theme users, and the dashboard flashed light before hydration.
  • Fix the composer clear (✕) button overlapping typed text: the unlayered .answer-footer-search-input padding beats the conditional pr-11 utility, so the button is now a flex sibling with a reserved 44px slot (re-applied to the merged renderSearchComposer).
  • Fix the standalone-home header status chips (Local only / Saved / avatar) sliding under the centered mode pill at lg–xl widths; they now reveal at min-[1400px] where the grid column fits them.
  • Replace text-white on the clinical accent (bright light teal in dark theme, ~1.6:1 contrast) with the --clinical-accent-contrast token across Launch buttons, mode icons, and the scope badge.
  • Migrate raw red-*/blue-*/amber-*/emerald-* palette classes in live surfaces (medication workspace, answer safety notice, settings mockup) to the semantic --danger/--info/--warning/--success token triads, so dark theme and forced-colors mode resolve correctly.
  • Remove the now-dead .universal-header-ledger*/-avatar/-status-dot CSS 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 resolved master-search-header.tsx in favor of main's restructured header, then re-applied the composer fix on top.

Verification

  • npm run verify:cheap — lint, typecheck, 772 Vitest tests passed
  • npm run verify:ui — 54 Chromium Playwright tests passed
  • npm 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.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources (demo notice restyled to the warning token, wording unchanged)
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed — N/A, no decision-support behavior changed

Notes

  • Known non-blocking observation: the composer mic buttons remain non-functional placeholders (pre-existing; flagged for a wire-or-hide decision).

🤖 Generated with Claude Code

BigSimmoand others added 4 commits July 2, 2026 11:30
…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>
CopilotAI review requested due to automatic review settings July 2, 2026 04:09

CopilotAI 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.

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
FileDescription
src/app/layout.tsxAdds an inline pre-paint theme resolver to set the dark class consistently on all routes.
src/components/clinical-dashboard/master-search-header.tsxAdjusts composer clear-button layout and standalone header chip visibility breakpoint.
src/app/globals.cssRemoves orphaned universal-header CSS and updates radius usage doc comment.
src/components/applications-launcher-page.tsxReplaces text-white with --clinical-accent-contrast for better dark-theme contrast on accent surfaces.
src/components/ClinicalDashboard.tsxMigrates demo notice color to --warning token and minor text wrapping adjustment.
src/components/clinical-dashboard/medication-prescribing-workspace.tsxMigrates 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.tsxMigrates 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.

@BigSimmo
BigSimmo merged commit 87b9b15 into mainJul 2, 2026
3 checks passed
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>
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.

2 participants

@BigSimmo