Skip to content

polish(design): Phase 5 sweep — forced-colors button labels, tools rail titles, privacy microcopy#896

Merged
BigSimmo merged 4 commits into
mainfrom
claude/clinical-kb-pwa-review-asi3wb
Jul 18, 2026
Merged

polish(design): Phase 5 sweep — forced-colors button labels, tools rail titles, privacy microcopy#896
BigSimmo merged 4 commits into
mainfrom
claude/clinical-kb-pwa-review-asi3wb

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Final phase (Phase 5, design-polish sweep) of the approved PWA perfection plan: audit-then-fix against the settled token system, tokens/CSS/microcopy only, no behaviour change.
  • Audit: three design guards clean (check:type-scale / check:icon-scale / brand:check strict); full re-run of the docs/redesign/07-token-adoption-audit.md grep method shows all July 3 debt resolved on current main (M1–M3 done; L4 down to a deliberate theme-aware glass-highlight idiom; L5/L7 gone; production components have 0 raw-palette classes and 0 non-legitimate hex). Live route sweep: 43 captures across 15 production routes × (1440×1000 + 390×844) + 320×844 spots + dark/reduced-motion/forced-colors spots — 0 horizontal overflow, 0 console errors, 0 failed requests. Dated "July 18 run" appended to docs/redesign/07-token-adoption-audit.md (the archived docs/archive/design-qa.md was not resurrected; the rubric doc carries dated runs).
  • Fix 1 — forced-colors blank button labels (src/app/globals.css, tokens-only): Chromium paints a Canvas backplate behind every glyph run in forced-colors mode, so glyph tokens resolving to the Canvas/ButtonFace family rendered solid-button labels as blank white boxes (sidebar "New chat", every accent-filled labeled button such as the tools "Ask" CTA). axe cannot detect this — it reads CSS, not painted pixels. SVG strokes get no backplate, so the dark --command fill also swallowed ButtonText icons. Fix inside the existing @media (forced-colors: active) block: command controls flatten to the native HCM pairing (ButtonFace fill / ButtonText glyphs); accent fills keep their system colors and flip only their glyph tokens (--primary-contrast, --clinical-accent-contrast, --danger-solid-contrast) to ButtonText. Non-forced modes untouched. A new ui-accessibility.spec.ts test locks all four glyph tokens off the Canvas resolution and asserts the visible New chat label color.
  • Fix 2 — tools quick-action rail title truncation (src/components/applications-launcher-page.tsx): the desktop 6-up rail truncated card titles at 1440×1000 ("Ask eviden…", "Safety che…"). Tightened card metrics (icon column 2.25rem→2rem, gap-3→gap-2, px-3→px-2.5, icon h-9→h-8); verified programmatically that all six titles now render unclipped. Descriptions remain designed-supplementary ellipsis (full copy lives in the All-tools cards and aria-labels). The phone icon-grid variant is untouched.
  • Fix 3 — privacy page microcopy (src/app/privacy/page.tsx): rendered "…not a patient-record systemand does not ask…" because JSX drops a newline adjacent to a tag. Fixed with an explicit same-line space; locked by a new tests/privacy-ui.test.ts assertion on the server-rendered markup.

Verification

Risk and rollout

  • Risk: low — visual-only. The forced-colors change alters rendering only inside @media (forced-colors: active); the launcher change alters only desktop card metrics; the privacy change is a one-space microcopy fix. No cache semantics, no PWA surface, no behaviour change.
  • Rollback: plain revert of the single content commit; no version bumps or data migrations involved.
  • Provider or production effects: None.

Clinical Governance Preflight

  • 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
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Governance context: the only clinical-risk-classified path in this diff is src/app/privacy/page.tsx, a rendered-whitespace microcopy fix with identical copy semantics. No answer/citation, source-governance, document-access, Supabase, or decision-support surface is touched; the checklist above was verified against that scope.
  • Evidence (session scratchpad): 43-capture sweep + sweep-results.json, 4× zoomed before/after forced-colors captures, post-fix rail clip-state probe (all six titleClipped: false).
  • The plan's second verify:release confirmation checkpoint is now due; it runs only with explicit user confirmation.
  • Ledger row for this phase is the follow-up commit on this branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9

Summary by CodeRabbit

  • Accessibility

    • Improved button, accent, and contrast color handling in forced-colors mode.
    • Added forced-colors UI accessibility test coverage (including “New chat” visibility and color/contrast assertions).
  • UI Improvements

    • Reduced desktop quick-action spacing to prevent title truncation.
    • Fixed privacy-page wording spacing/line wrapping around the “not a patient-record system” message.
  • Documentation

    • Updated design/audit and review records with the latest Phase 5 sweep details and validation results.

…n, privacy microcopy

Phase 5 design-polish sweep (audit-then-fix). Audit: 3 design guards clean;
static re-score of docs/redesign/07-token-adoption-audit.md (all July 3 debt
resolved); 43-capture route sweep (15 routes x desktop/phone + 320px spots +
dark/reduced-motion/forced-colors) with 0 overflow / 0 console errors.

Fixes:
- globals.css forced-colors block: Chromium paints a Canvas backplate behind
  glyph runs, so glyph tokens resolving to Canvas/ButtonFace rendered solid
  button labels as blank boxes (axe-invisible). Command controls flatten to
  the native HCM pairing (ButtonFace fill / ButtonText glyphs — SVG strokes
  get no backplate, so a dark fill also swallows icons); accent fills keep
  their system colors and flip only glyph tokens to ButtonText. New
  ui-accessibility.spec.ts test locks the tokens off the Canvas resolution.
- applications-launcher-page.tsx: desktop 6-up quick-action rail truncated
  card titles at 1440x1000 ("Ask eviden...", "Safety che..."); tightened card
  metrics (icon col 2.25rem->2rem, gap-3->gap-2, px-3->px-2.5, icon h-9->h-8)
  so all six titles render whole. Phone icon grid untouched.
- privacy/page.tsx: JSX drops a newline adjacent to a tag, rendering
  "patient-record systemand does not ask"; explicit interword space added and
  locked by a privacy-ui.test.ts assertion.

Dated July 18 run appended to docs/redesign/07-token-adoption-audit.md
(design-qa.md is archived; the rubric doc carries dated audit runs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
@supabase

supabase Bot commented Jul 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dadd3dc7-9446-49b1-82ff-09bc1cf3870a

📥 Commits

Reviewing files that changed from the base of the PR and between 0c407d1 and 4b9e5ed.

📒 Files selected for processing (4)
  • docs/branch-review-ledger.md
  • src/app/globals.css
  • src/components/applications-launcher-page.tsx
  • tests/ui-accessibility.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/ui-accessibility.spec.ts
  • docs/branch-review-ledger.md
  • src/components/applications-launcher-page.tsx

📝 Walkthrough

Walkthrough

This change updates forced-colors token mappings, adjusts desktop quick-action sizing, reformats privacy-page copy, adds accessibility and privacy UI assertions, and records the Phase 5 design-polish audit results.

Changes

Design polish

Layer / File(s) Summary
Forced-colors token mapping and coverage
src/app/globals.css, tests/ui-accessibility.spec.ts
Forced-colors system tokens were remapped for contrast and glyph rendering, with a browser test checking button and token colors against the Canvas color.
Launcher and privacy presentation fixes
src/components/applications-launcher-page.tsx, src/app/privacy/page.tsx, tests/privacy-ui.test.ts
Desktop quick-action spacing and icon sizing were adjusted, while privacy copy formatting and its exact rendered markup assertion were updated.
Design-polish audit records
docs/redesign/07-token-adoption-audit.md, docs/branch-review-ledger.md
The Phase 5 audit findings, resolved items, validations, and review record were documented.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: claude, cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the Phase 5 design-polish changes.
Description check ✅ Passed The description matches the template with summary, verification, risk, governance, and notes sections filled in.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/clinical-kb-pwa-review-asi3wb

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 18, 2026 17:53
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

…a-review-asi3wb

# Conflicts:
#	docs/branch-review-ledger.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c407d1c1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/globals.css Outdated
@BigSimmo
BigSimmo enabled auto-merge July 18, 2026 18:00
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

Review follow-up: ButtonText is not palette-guaranteed to contrast a Mark
fill in arbitrary forced-colors schemes; MarkText is Mark's paired
foreground. No visual change in the emulated palette (both resolve black).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 4b9e5ed9ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BigSimmo
BigSimmo merged commit ef042ca into main Jul 18, 2026
28 checks passed
@BigSimmo
BigSimmo deleted the claude/clinical-kb-pwa-review-asi3wb branch July 18, 2026 18:08
Sign up for free to 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