Skip to content

fix(mobile): fully hide dashboard header on phone scroll down#415

Merged
BigSimmo merged 2 commits into
mainfrom
cursor/fix-phone-header-hide-scroll-4142
Jul 9, 2026
Merged

fix(mobile): fully hide dashboard header on phone scroll down#415
BigSimmo merged 2 commits into
mainfrom
cursor/fix-phone-header-hide-scroll-4142

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes phone hide-on-scroll for the universal header in the dashboard (Answer mode and other routes using ClinicalDashboard).

Two issues prevented the header from fully disappearing when scrolling down on phones:

  1. Sticky vs collapse conflict — The collapse strategy animates the header wrapper to 0fr, but the header stayed sticky top-0, which pinned ~19px of chrome in the viewport. Collapse hosts now use max-sm:relative (overlay/document-scroll hosts keep sticky).
  2. Scroll listener target — Hide state now reports from ClinicalDashboard's <main onScroll> via useScrollHideReporter, with the passive element/window listener kept as a backup.

Verification

  • npm run verify:cheap
  • npm run verify:ui — mobile header translate/collapse; recommend a quick phone scroll check on Answer results
  • npm run verify:release not run (scoped mobile chrome fix)

Clinical Governance Preflight

Not applicable — UI chrome only; no ingestion, answer generation, search, privacy, or clinical output changes.

Notes

  • Standalone mode pages (/forms, /services, etc.) use the overlay strategy and were already hiding correctly via document scroll + translate.
  • Manually verified on phone viewport: scrolling <main> collapses header to 0 visible pixels.
Open in Web Open in Cursor 

On phones the dashboard uses a collapse hide-on-scroll strategy where the
header sits above an internally scrolling <main>. Sticky positioning fought
the 0fr grid collapse, leaving ~19px of header chrome visible. Switch the
header to relative positioning on max-sm for collapse hosts.

Also wire scroll reporting through ClinicalDashboard main onScroll so hide
state updates reliably from the real scroll container, keep the passive
listener as a backup, and harden useHideOnScroll state tracking.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@supabase

supabase Bot commented Jul 8, 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 8, 2026 18:22
@BigSimmo
BigSimmo enabled auto-merge (squash) July 9, 2026 03:40
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo merged commit 133165f into main Jul 9, 2026
6 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