Skip to content

Design review: bug fixes, token convergence, and a consolidated design-system guide - #324

Merged
BigSimmo merged 11 commits into
mainfrom
claude/design-review-system-plan-c1aios
Jul 6, 2026
Merged

Design review: bug fixes, token convergence, and a consolidated design-system guide#324
BigSimmo merged 11 commits into
mainfrom
claude/design-review-system-plan-c1aios

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bug fixes
    • Applications launcher: the three mobile detail rows ("Check first" / "Needed input" / "Output") were buttons with a chevron affordance but no handler — they now expand as accessible disclosures (aria-expanded/aria-controls, chevron rotation with motion-reduce handling).
    • Applications launcher: the hand-rolled detail modal (Escape + backdrop only) is replaced by the shared Sheet primitive, gaining focus trap, initial focus, and return-focus-on-close.
    • New styled src/app/not-found.tsx (modeled on the root error boundary, info-toned) — notFound() calls in differentials and unknown URLs no longer render the unstyled Next.js default.
    • /documents/[id]?page=abc no longer leaks NaN into the viewer header and page input — the param is parsed and clamped to ≥ 1.
  • Accessibility & dark mode
    • Launcher filter tablists gained aria-controls and a role="tabpanel" results region (matching the dashboard upload-tabs precedent); answer images get a fallback alt; launcher icon tones and the safety selection state move from raw Tailwind palette classes to the categorical --type-* / semantic danger token triads so they respond to dark mode and forced-colors.
  • Design convergence
    • Deleted services-navigator-preview.tsx (dead export carrying ~80 pre-token hex hardcodes) and tokenized the live /services navigator's residual hardcodes — the route now follows dark mode like every other surface.
    • Type-scale migration: arbitrary px font sizes reduced 168 → 20 (remaining are accepted rem display headings + one mockup file); leading pinned where Tailwind's baked line-heights would have shifted layout.
    • Z-index ladder documented in globals.css; one rounded-[var(--radius-md)]rounded-md; /mockups/* layout now emits robots: noindex.
  • Durable deliverable: docs/design-system.md — a consolidated front-door design guide (token contract, legacy-hex migration table, type-scale rules and ratchet, tap targets, z-ladder, Sheet-only modal policy, a11y requirements, do/don't gallery, UI Definition of Done). docs/redesign/* deep docs gain entry-point pointers; docs/process-hardening.md records the ratchet baseline and cleared debts.
  • Dev-environment hardening (needed to run the UI gates in a sandboxed container, useful generally): port probes in dev-free-port.mjs/run-playwright.mjs no longer treat a missing IPv6 stack as "every port busy"; playwright.config.ts honours an optional PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH override.

Verification

  • npm run verify:cheap (lint, typecheck, 1097 vitest tests, runtime + sitemap checks — green)
  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed — 103/103 Chromium Playwright tests passed (smoke, stress, accessibility incl. reduced-motion + forced-colors, tools, overlap)
  • npm run verify:release before release or handoff confidence claims — not run (not a release/handoff PR)
  • npm run format:check
  • npm run eval:retrieval:quality — not applicable: no retrieval, ranking, selection, chunking, or scoring behavior changed
  • npm run eval:rag / eval:quality --rag-only — not applicable: no answer generation or post-processing changed
  • npm run check:production-readiness — not applicable: no clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness — not applicable: no deployment startup/hosting changes

Manual checks on the running app: styled 404 at unknown URLs and bad differential slugs; ?page=abc / ?page=-3 render page 1 with no NaN; /applications and /services?q=crisis&run=1 render correctly.

Clinical Governance Preflight

This change is UI-only: no ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output behavior was touched. For completeness:

  • 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 — no decision-support behavior changed

Notes

  • The type-scale ratchet baseline (20 hits / 9 files) is recorded in docs/process-hardening.md; UI PRs must not raise it. Flip check:type-scale --strict into verify:cheap only once the accepted rem display exceptions are tokenized.
  • Mockup routes stay shipped (they're a working design tool); they are robots-disallowed and now also emit noindex metadata.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG


Generated by Claude Code


Note

Low Risk
UI, documentation, and dev-script changes only; no auth, RAG, or data-path changes. Launcher modal migration is the main behavioral surface area and aligns with an existing Sheet primitive.

Overview
Adds docs/design-system.md as the day-to-day UI contract and points docs/redesign/* and docs/process-hardening.md at it (type-scale ratchet baseline 20 hits, cleared debts).

Behavior & a11y: Applications launcher mobile detail sections become real disclosures; the detail overlay moves to Sheet; filter tabs wire aria-controls and a role="tabpanel" results region. New token-styled not-found, safe ?page= parsing on document routes, and fallback image alt in answer content.

Design convergence: Removes dead services-navigator-preview and tokenizes live services UI; swaps arbitrary px type for named scale steps across dashboard/launcher surfaces; documents z-index in globals.css; mockups layout gets robots: noindex.

Tooling: Playwright can use PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH; dev port probes ignore IPv6 EAFNOSUPPORT so sandboxes can start the app and run UI gates.

Reviewed by Cursor Bugbot for commit 78ccd3a. Configure here.

claude added 8 commits July 6, 2026 11:10
…igrate detail dialog to Sheet
The three mobile detail rows (Check first / Needed input / Output) were
rendered as buttons with a chevron affordance but no handler; they now
expand accordion-style with aria-expanded/aria-controls wiring. The
hand-rolled detail modal is replaced by the shared Sheet primitive,
gaining focus trap, initial focus, and return-focus-on-close.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
notFound() calls previously fell through to the unstyled Next.js default;
the new not-found page mirrors the root error boundary's card. The
document viewer page param is now parsed and clamped so ?page=abc no
longer renders "page NaN" in the header and page input.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…launcher tones
The launcher category filters exposed role=tab with aria-selected but no
aria-controls or tabpanel; the results region is now the referenced panel,
matching the dashboard upload-tabs precedent. Answer images fall back to
a descriptive alt when the caption is empty. Launcher icon tones and the
safety selection state move from raw Tailwind palette classes to the
categorical --type-* and semantic danger triads so they respond to dark
mode and forced-colors.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…ze residuals
ServicesNavigatorPreview was exported but referenced nowhere; it carried
~80 hardcoded hex values from a pre-token palette. The live navigator's
remaining hardcodes (Filters/Sort buttons, best-fit chip glow, badge
inset highlight, Suspense fallback wash) now use the design tokens, so
the /services route follows dark mode like every other surface.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…dder doc, mockups noindex
Migrates arbitrary px font sizes to the named size-only scale steps
(9→4xs, 10→3xs, 11→2xs, 13→sm-minus, 15→base-minus) across production
components; the [12px]/[18px] sites move to text-xs/text-lg with explicit
leading pinned where none was set so nothing shifts. Remaining hits are
rem display headings (accepted exceptions) and one mockup file. Also:
documents the z-index ladder alongside the radius rules in globals.css,
replaces the one rounded-[var(--radius-md)] with rounded-md, and adds
noindex metadata to the mockups layout.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…tchet
docs/design-system.md becomes the single front door for UI work: token
contract (semantic vs categorical vs brand), legacy-hex migration table,
type-scale rules and ratchet, tap-target and radius/shadow rules, the
z-index ladder, Sheet-only modal policy, accessibility requirements,
a do/don't gallery drawn from this branch's fixes, verification gates,
and file conventions. The deep docs in docs/redesign/ gain entry-point
pointers; process-hardening records the new type-scale baseline (20,
was 168) and the debts cleared this pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…teral in design guide
The free-port scan required binding every address family, so containers
without IPv6 (EAFNOSUPPORT) reported every port busy and the dev server
could never start. An unsupported family cannot host a conflicting
listener, so it no longer vetoes the port. Also rewords one design-guide
example: Tailwind v4 scans markdown sources, and the literal
rounded-[var(--radius-star)] pattern generated unparseable CSS that
broke the dev build.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
…n Playwright port probe
Sandboxed containers pre-install one Chromium at a fixed path rather
than the revision this Playwright version pins; an optional
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH env var now routes the chromium
project at it. The Playwright runner's free-port probe gets the same
unsupported-address-family tolerance as dev-free-port.mjs so it can
start its own server in IPv6-less containers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
@supabase

supabaseBot commented Jul 6, 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 ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 6, 2026 12:38
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Tabpanel label ignores active filter
    • The tabpanel aria-label now derives from the active filter via launcherFilterPanelLabel(activeFilter), so screen readers announce Assess, Evidence, Treat, Saved, More, or All tools to match the filtered list.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 78ccd3a. Configure here.

Comment threadsrc/components/applications-launcher-page.tsx Outdated
claudeand others added 2 commits July 6, 2026 12:44
The tabpanel kept a static "All tools" aria-label while the filter tabs
changed what the list shows; assistive tech now hears the active
filter's name (e.g. "Assess tools", "Saved tools").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
Fall back to mobileFilters when resolving the results tabpanel label so
the More tab announces a matching region name for screen readers.
@BigSimmo
BigSimmo enabled auto-merge July 6, 2026 13:12
Resolves conflicts by taking main's equivalents of the dev-environment
fixes (independently landed there), keeping both process-hardening
sections, and combining the launcher's Sheet dialog work with main's
tools-catalog extraction.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEEkTKt4eS4oqftBsaQKpG
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.

3 participants

@BigSimmo@claude@cursoragent