Skip to content

fix(home): centre mode homes, unclip composer dropdown, tighten hero scale#485

Merged
BigSimmo merged 7 commits into
mainfrom
claude/home-answer-page-layout-rtx10n
Jul 11, 2026
Merged

fix(home): centre mode homes, unclip composer dropdown, tighten hero scale#485
BigSimmo merged 7 commits into
mainfrom
claude/home-answer-page-layout-rtx10n

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Fix: home answer page not centred. Dashboard mode homes (Answer, Documents, Medication) dropped their viewport-height floor on sm+, so place-items-center had nothing to centre in and the hero block hugged the header with a large dead area below. The centred branch now keeps sm:min-h-[calc(100dvh-11rem)], matching the standalone services/forms/differentials homes.
  • Fix: white cutoff panel. The dashboard content wrapper used overflow-x-hidden, which makes it a scroll container (overflow-y computes to auto) — the composer's command dropdown ("Recent in Answer" / "Answer actions") was clipped mid-item at the wrapper's bottom edge and a phantom inner scrollbar appeared. Switched to overflow-x-clip, which clips horizontally without creating a scroll container.
  • Dropdown polish. The dropdown now forces text-left (it sits inside the centred mode-home template and inherited text-center section headings) and its downward list is capped to min(42dvh, 24rem) so it can never run off-screen from a mid-page composer.
  • Consistent, more refined sizing across all mode homes. The shared ModeHomeTemplate/ModeHomeHero (used by Answer, Documents, Medication, Services, Forms, Favourites, Differentials, Tools) is tightened: smaller hero icon tile (sm 3.5rem, was 4.75rem at lg), heading sm:text-3xl / lg:text-4xl (was lg:text-5xl), compact action cards (sm min-height 6.25rem, was 8.4rem at lg), reduced gaps, and a narrower hero composer slot (max 48rem, was 56rem).
  • Updated the mobile hero-sizing guard in tests/ui-tools.spec.ts to the new compact scale (2.75rem icon, 1.5rem heading) — this test asserts all mode homes share identical hero metrics, which they still do.

Before/after (1600×900, /?mode=answer with the composer dropdown open): the dropdown was previously cut off mid-item ~440px above the viewport bottom with a phantom scrollbar; it now renders fully, and the home block is vertically centred.

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed — 129/130 Chromium tests pass. The single failure (ui-smoke.spec.ts:1891 newer routed differential context wins over an older response, an API request-count assertion) fails identically on unmodified main in this environment (verified via git stash), so it is pre-existing and unrelated to this diff. Also ran npm run lint, npm run typecheck, npm run test (1474 passed), and npm run check:type-scale — all green.
  • npm run verify:release before release or handoff confidence claims

Clinical Governance Preflight

Not applicable — this change is layout/CSS only (mode-home template, dashboard wrapper overflow, command-dropdown presentation). It does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

Notes

  • overflow-x: clip (vs hidden) is the load-bearing detail: hidden on one axis forces the other axis to auto, creating the nested scroll container that clipped the dropdown; clip does not.
  • Screenshots were verified at 1600×900 desktop, 820×1180 tablet, and 390×844 phone across all eight mode homes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYqvyoocDtvjiicK6GoLYJ


Generated by Claude Code

…scale

- Dashboard mode homes (Answer, Documents, Medication) now keep a
  viewport-height floor from the sm breakpoint up, so the hero block is
  vertically centred like the standalone services/forms/differentials
  homes instead of hugging the header with a large dead area below.
- The content wrapper uses overflow-x-clip instead of overflow-x-hidden:
  hidden made it a scroll container (overflow-y computed to auto), which
  cut the composer's command dropdown off mid-panel and rendered a
  phantom inner scrollbar next to the content column.
- The command dropdown is explicitly text-left (it sits inside the
  centred mode-home template and inherited text-center headings) and its
  downward list is capped to the viewport (max-h min(42dvh, 24rem)).
- Shared mode-home template is tighter and consistent across every mode:
  smaller hero icon tile (sm 3.5rem), heading sm:text-3xl / lg:text-4xl,
  compact action cards (sm min-height 6.25rem, 2.75rem icon tiles),
  reduced section gaps, and a narrower hero composer slot.
- Updated the mobile hero-sizing guard to the new compact scale
  (2.75rem icon, 1.5rem heading).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYqvyoocDtvjiicK6GoLYJ
@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: 50ee3608-e294-43b1-a3b2-2f4e37fd115e

📥 Commits

Reviewing files that changed from the base of the PR and between 162085d and 96dbd03.

📒 Files selected for processing (4)
  • docs/branch-review-ledger.md
  • src/app/globals.css
  • src/components/ClinicalDashboard.tsx
  • tests/clinical-dashboard-merge-artifacts.test.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/branch-review-ledger.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/ClinicalDashboard.tsx
  • src/app/globals.css

📝 Walkthrough

Summary by CodeRabbit

  • UI Improvements

    • Refined responsive home-page layout, spacing, sizing, and typography across screen sizes.
    • Improved mobile vertical centering and content width constraints.
    • Enhanced command dropdown alignment and responsive list height behavior.
    • Prevented unwanted horizontal scrollbars around dropdown interactions.
  • Tests

    • Updated mobile sizing expectations and added safeguards for responsive layout regressions.
  • Documentation

    • Updated review records with verification outcomes and final checks.

Walkthrough

Responsive home-page sizing, positioning, and command dropdown behavior were adjusted across breakpoints. Mobile hero assertions and layout regression guards were updated, and review ledger entries were revised for PRs 461 and 485.

Changes

Home layout and routed-state updates

Layer / File(s) Summary
Responsive home layout
src/app/globals.css, src/components/ClinicalDashboard.tsx, src/components/mode-home-template.tsx, tests/ui-tools.spec.ts
Home composer widths, mobile container positioning, hero sizing, action tiles, quick-link spacing, and corresponding mobile test expectations were updated.
Command surface integration
src/components/ClinicalDashboard.tsx, src/components/clinical-dashboard/universal-search-command-surface.tsx
Dashboard overflow handling, command dropdown text alignment, and inline listbox height limits were adjusted.
Layout regression guards
tests/clinical-dashboard-merge-artifacts.test.ts
Source-content assertions were added for composer width clamps and the centered mobile height floor.
Review ledger update
docs/branch-review-ledger.md
The PR 461 review record was revised and a PR 485 record was added with verification status.

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


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Verification Claims ❌ Error Ledger row claims runtime/action/sitemap/type-scale/lint checks passed and browser verification pending, but doesn’t name exact commands or results. Rewrite verification notes as explicit command/result pairs, e.g. Ran npm run verify:cheap: passed, or Not run: browser verification pending because ....
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely reflects the main UI/layout changes: centering mode homes, unclipping the dropdown, and tightening hero sizing.
Description check ✅ Passed The description matches the required template sections and includes a substantive summary, verification details, clinical preflight, and notes.
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.
Generated And Sensitive Files ✅ Passed Diff only touches docs, CSS, TSX, and tests; no secrets, keys, env files, logs, caches, or build/browser artifacts are committed.
Risky Git Or Deployment Actions ✅ Passed Changed files only adjust layout/tests and a review ledger; no force-push, hard reset, destructive clean, branch deletion, or unconfirmed deployment guidance appears.
Supabase Project And Schema Safety ✅ Passed PR contains only UI/CSS styling changes and test updates; no Supabase project refs, migrations, RLS policies, or production-affecting database changes present.
Runtime And Package Manager Integrity ✅ Passed Diff only touches docs/CSS/TS tests; no package-lock/package manager/engine changes. Repo still pins npm@11.17.0, node 24.x, and engine-strict=true.
Api Route Failure Handling ✅ Passed The diff only touches docs, CSS, client layout, and test guards; no API/server/RAG/search/ingestion/provider code changed, so failure-handling review is not applicable.
✨ 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/home-answer-page-layout-rtx10n
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/home-answer-page-layout-rtx10n

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

@BigSimmo
BigSimmo marked this pull request as ready for review July 11, 2026 11:46
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

# 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: ab35628b05

ℹ️ 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 tests/ui-smoke.spec.ts Outdated
coderabbitai[bot]
coderabbitai Bot previously requested changes Jul 11, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/branch-review-ledger.md`:
- Around line 47-48: Update the reviewed HEAD SHA values in the ledger entries
for PR `#461` and PR `#485` to the full 40-character commit IDs from git rev-parse,
preserving each entry’s review scope and other details.

In `@src/app/globals.css`:
- Line 1314: Make the composer width continuous across the 1024px breakpoint by
updating the clamp at src/app/globals.css lines 1314-1314 so its upper behavior
does not exceed the desktop lower bound, and aligning the desktop clamp at
src/app/globals.css lines 1531-1531 by raising or removing its 34rem minimum.
Preserve the existing responsive width behavior while eliminating the abrupt
shrink.

In `@src/components/ClinicalDashboard.tsx`:
- Around line 3335-3339: Update the centered home section’s responsive classes
near centeredModeHome so mobile layouts retain a viewport-based minimum height
below sm; remove the conflicting max-sm:min-h-0 or otherwise ensure the
section/parent provides free space for max-sm:justify-center, while preserving
the existing desktop height behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bf80607-6cdd-4b2c-b2ff-19b35e1745b6

📥 Commits

Reviewing files that changed from the base of the PR and between 0c76030 and 162085d.

📒 Files selected for processing (6)
  • docs/branch-review-ledger.md
  • src/app/globals.css
  • src/components/ClinicalDashboard.tsx
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/components/mode-home-template.tsx
  • tests/ui-tools.spec.ts

Comment thread docs/branch-review-ledger.md Outdated
Comment thread src/app/globals.css Outdated
Comment thread src/components/ClinicalDashboard.tsx Outdated
@BigSimmo
BigSimmo dismissed coderabbitai[bot]’s stale review July 11, 2026 11:59

All three findings fixed in 96dbd03 with focused regression coverage: full ledger SHAs, continuous composer sizing at 1024px, and a mobile centering height floor.

@BigSimmo

Copy link
Copy Markdown
Owner Author

Resolved the final CodeRabbit set in 96dbd0394: full reviewed SHAs, continuous composer width across 1024px, and a real mobile viewport height floor for centered homes. Focused guards pass 30/30 with typecheck, type-scale, formatting, and diff checks clean.

@BigSimmo
BigSimmo merged commit 66883b7 into main Jul 11, 2026
21 checks passed
@BigSimmo
BigSimmo deleted the claude/home-answer-page-layout-rtx10n branch July 13, 2026 16:33
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