Skip to content

refactor(ui): compact mode-home heroes, cards, and headings#496

Merged
BigSimmo merged 2 commits into
mainfrom
claude/compact-design-mockup-fcfb04
Jul 11, 2026
Merged

refactor(ui): compact mode-home heroes, cards, and headings#496
BigSimmo merged 2 commits into
mainfrom
claude/compact-design-mockup-fcfb04

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Make every mode home more compact and modern. Shrinks the shared ModeHomeHero (icon, heading, subtitle) and the action cards (~45% shorter) and tightens mode-home spacing in mode-home-template.tsx, so the change applies uniformly to Forms, Services, Differentials, Medication, Documents, Favourites, Tools, and Answer.
  • Optimises headings and copy: Forms title What do you need from forms?Forms; pills relabelled Common tasksBrowse by type (they are form types, not tasks); action-card descriptions trimmed to scannable fragments across Forms, Services, Differentials, Medication, and Documents; long Favourites and Tools subtitles shortened.
  • Purely presentational — no behavioural change. No routing, data, ingestion, retrieval, answer-generation, document-access, privacy, or production surface is touched.

Verification

  • npm run verify:cheap — green (lint, typecheck, runtime/actions/sitemap; vitest 1411 passed / 1 skipped once the per-test timeout accommodates this machine's slow transform).
  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed — ran. tests/ui-tools.spec.ts (covers 100% of the changed surface: every mode-home hero, the compacted cards, and the sizing guard) is 40/40 green. The full run showed 6 failures in ui-smoke / ui-tools-task-directory; all were traced to pre-existing environmental flakes outside this diff (5 passed on isolated re-run; the 6th is an answer-generation test that fails at a different point each run). No test asserts any copy or size this PR changes. CI runs with retries: 1, which should absorb them.
  • npm run verify:release before release or handoff confidence claims — N/A (not a release).
  • npm run format:check — green for changed files.
  • npm run eval:retrieval:quality — N/A (no retrieval, ranking, selection, chunking, or scoring change).
  • npm run eval:rag / npm run eval:quality — N/A (no answer-generation, synthesis-prompt, or post-processing change).
  • npm run check:production-readiness — N/A (no clinical workflow, privacy, environment, Supabase, source-governance, or deployment change).
  • npm run check:deployment-readiness — N/A (no deployment/hosting/rollout change).

Clinical Governance Preflight

Not applicable. This change is presentational only — mode-home navigation cards, hero sizing, and heading copy. It does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

Notes

  • Test updates in tests/ui-tools.spec.ts: new headings (Forms), the compact hero sizing baseline (44px icon / 23.2px heading, still asserting all mode homes share one size), and hardening of the flaky Answer→Services mode-toggle test with the same toPass re-click guard the test already uses for its Forms switch.
  • The card descriptions were shortened for scan-ability; wording changes are copy-only.

Shrink the shared ModeHomeHero (icon, heading, subtitle) and action cards
(~45% shorter) and tighten mode-home spacing so every mode home reads more
compact. Optimise headings and copy: Forms title "What do you need from
forms?" -> "Forms", pills "Common tasks" -> "Browse by type", and fragment
the action-card descriptions across Forms, Services, Differentials,
Medication, and Documents; trim the Favourites and Tools subtitles.

Update ui-tools.spec.ts to the new headings and the compact hero sizing
baseline (44px icon, 23.2px heading), and harden the flaky Answer->Services
mode-toggle test with the same toPass re-click guard already used for the
Forms switch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@supabase

supabase Bot commented Jul 11, 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 11, 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ee455c49-b735-454d-9540-56125281ad47

📥 Commits

Reviewing files that changed from the base of the PR and between 84fbeca and 3007960.

📒 Files selected for processing (5)
  • src/components/applications-launcher-page.tsx
  • src/components/clinical-dashboard/differentials-home.tsx
  • src/components/clinical-dashboard/medication-prescribing-workspace.tsx
  • src/components/mode-home-template.tsx
  • tests/ui-tools.spec.ts
✅ Files skipped from review due to trivial changes (2)
  • src/components/clinical-dashboard/medication-prescribing-workspace.tsx
  • src/components/clinical-dashboard/differentials-home.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/applications-launcher-page.tsx
  • tests/ui-tools.spec.ts
  • src/components/mode-home-template.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Content Updates
    • Updated home page copy across Tools, Differentials, Documents, Favourites, Medications, Forms, and Services for clearer, shorter descriptions and labels (including “Browse by type” and revised “Forms” headings).
  • Design Improvements
    • Refreshed responsive spacing and typography on multiple home templates, tightening grids/cards and adjusting hero sizing for a more compact mobile layout.
  • Tests
    • Updated UI smoke/responsive checks for the Clinical KB tools launcher and shared-search headings to better match current copy and reduce test flakiness.

Walkthrough

Updated shared mode-home responsive styling, shortened application home-page copy, adjusted Tools launcher spacing, and aligned Playwright assertions with revised Forms headings, hero dimensions, and services-mode navigation.

Changes

Mode home updates

Layer / File(s) Summary
Shared mode-home layout
src/components/mode-home-template.tsx
Responsive hero sizing, typography, spacing, action grids, icons, and card dimensions were adjusted.
Application home-page copy
src/components/clinical-dashboard/*, src/components/forms/forms-home-page.tsx, src/components/services/services-home-page.tsx
Home-page subtitles, action descriptions, medication prompt text, and the Forms section label were revised.
Tools launcher presentation
src/components/applications-launcher-page.tsx
Tools description text and workspace padding and grid spacing classes were updated.
UI expectation alignment
tests/ui-tools.spec.ts
Tests were updated for revised Forms headings, compact hero dimensions, Forms geometry, and retried services-mode navigation.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 70.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main presentational refactor across mode-home heroes, cards, and headings.
Description check ✅ Passed The description follows the template structure and provides a clear summary, verification details, governance notes, and N/A rationale for irrelevant checks.
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.
Generated And Sensitive Files ✅ Passed Changed files are only TSX/test sources; no sensitive/generated paths or secrets were found. The only token hit was a benign comment.
Verification Claims ✅ Passed Verification claims name exact checks and results (verify:cheap, verify:ui, format:check), and verify:release is marked N/A.
Risky Git Or Deployment Actions ✅ Passed Changed files are UI copy/style/tests only; scans found no force-push/reset/clean/deploy instructions. The only hit was a UI footer: “Confirm locally before use.”
Supabase Project And Schema Safety ✅ Passed CI/docs keep the live ref sjrfecxgysukkwxsowpy; the only DB change is a redundant index drop with a safety note, and no RLS/policy or stale refs appear.
Runtime And Package Manager Integrity ✅ Passed PASS: packageManager/npm lockfile stayed on npm@11.17.0 with Node 24/npm 11 engines and engine-strict=true; no lockfile bypass or legacy/force install flags added.
Api Route Failure Handling ✅ Passed PASS: The changed routes keep deterministic try/catch JSON error paths, seed failures are handled and rethrown only after retries, and answer rate limiting now fails closed.
✨ 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/compact-design-mockup-fcfb04
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/compact-design-mockup-fcfb04

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 11, 2026
@BigSimmo
BigSimmo enabled auto-merge July 11, 2026 14:20
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex fix merge conflicts

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • git diff --check
  • git diff --cached --check
  • npx prettier --check src/components/applications-launcher-page.tsx src/components/clinical-dashboard/medication-prescribing-workspace.tsx src/components/mode-home-template.tsx tests/ui-tools.spec.ts
  • ⚠️ npm run format:check -- src/components/applications-launcher-page.tsx src/components/clinical-dashboard/medication-prescribing-workspace.tsx src/components/mode-home-template.tsx tests/ui-tools.spec.ts — repo script checks the whole tree and reported existing formatting warnings outside the conflict-resolution files.
  • ⚠️ npm run typecheck — could not run because node_modules/typescript/bin/tsc is missing in this environment.

View task →

@BigSimmo
BigSimmo disabled auto-merge July 11, 2026 14:29
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve the merge conflicts on this branch.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 11, 2026 14:30
@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • git diff --check
  • git diff --cached --check
  • npx prettier --check src/components/applications-launcher-page.tsx src/components/clinical-dashboard/medication-prescribing-workspace.tsx src/components/mode-home-template.tsx tests/ui-tools.spec.ts
  • ⚠️ npm run typecheck — environment limitation: node_modules/typescript/bin/tsc is missing, and the shell resolved Node.js v20.20.2 rather than the repo-required Node 24.x.

View task →

@BigSimmo
BigSimmo disabled auto-merge July 11, 2026 14:34
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 11, 2026 14:36
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

Resolved merge conflicts in:
- src/components/mode-home-template.tsx (preserved compact sizing)
- src/components/applications-launcher-page.tsx (preserved compact padding)
- src/components/clinical-dashboard/medication-prescribing-workspace.tsx (kept compact description)
- tests/ui-tools.spec.ts (updated to match compact heading size)

Merge strategy: preserved this PR's compact design values (smaller icons, text, gaps, and card heights) while incorporating main's other improvements.
@BigSimmo
BigSimmo merged commit 68d232a into main Jul 11, 2026
14 of 16 checks passed
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