Skip to content

Refine header and footer scroll timing#703

Merged
BigSimmo merged 2 commits into
mainfrom
codex/header-footer-scroll-timing-20260717
Jul 17, 2026
Merged

Refine header and footer scroll timing#703
BigSimmo merged 2 commits into
mainfrom
codex/header-footer-scroll-timing-20260717

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • require deliberate scroll travel before the shared header and phone composer hide or reveal
  • reset accumulated intent when direction, active state, or responsive behavior changes
  • align hide/show timing and easing while preserving reduced-motion behavior
  • add focused unit coverage for thresholds, accumulation, and direction changes

Verification

  • npm run verify:pr-local — not completed: its verify:cheap unit phase hit the existing 30-second repository graph-scan timeout under local disk contention after format, lint, and TypeScript passed
  • npm run verify:ui — full suite not repeated; the five directly affected Chromium cases passed
  • npm run verify:release — not run; no provider-backed or broad release workflow was invoked

Completed locally:

  • npm test -- --run tests/use-hide-on-scroll.test.ts — 7/7 passed on the final rebased commit
  • focused Chromium UI smoke (ui-smoke.spec.ts, header/composer grep) — 5/5 passed
  • scoped ESLint — passed
  • Prettier — passed
  • full TypeScript and full lint stages from verify:cheap — passed
  • git diff --check origin/main..HEAD — passed

Clinical Governance Preflight

Not applicable. This change is limited to local UI scroll timing and does not touch ingestion, answer generation, retrieval/ranking, sources, document access, privacy, production environment, or clinical output.

Notes

  • The browser proof used the repo-supported webpack dev path because Turbopack rejects the clean verification worktree's external node_modules junction.
  • No Supabase, OpenAI, live-provider, or production-like checks were run.

Summary by CodeRabbit

  • New Features

    • Improved hide-on-scroll behavior for headers and bottom composers by requiring deliberate scrolling before hiding or revealing them.
    • Added direction-aware handling that resets intent when scrolling changes direction.
    • Refined animation timing for smoother show and hide transitions.
  • Bug Fixes

    • Preserved existing reduced-motion, responsive breakpoint, and overscroll behavior.
    • Prevented small scroll movements from unexpectedly changing interface visibility.
  • Tests

    • Expanded coverage for scroll direction, travel thresholds, reveal behavior, and overscroll handling.

@supabase

supabase Bot commented Jul 17, 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 17, 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: d7b3e3f0-b1a1-4164-8dcf-ed8d83bc14e3

📥 Commits

Reviewing files that changed from the base of the PR and between 561cefe and 42461a3.

📒 Files selected for processing (4)
  • docs/branch-review-ledger.md
  • src/components/clinical-dashboard/master-search-header.tsx
  • src/components/clinical-dashboard/use-hide-on-scroll.ts
  • tests/use-hide-on-scroll.test.ts

📝 Walkthrough

Walkthrough

The scroll-hide computation now tracks directional travel before hiding or revealing chrome. The search header and composers use state-dependent transition timing and easing, with tests covering thresholds, reversals, overscroll, and small deltas.

Changes

Scroll chrome behavior

Layer / File(s) Summary
Directional scroll intent state
src/components/clinical-dashboard/use-hide-on-scroll.ts
computeScrollHideUpdate returns and accumulates direction/travel state, while the reporter persists and resets it.
Scroll intent validation
tests/use-hide-on-scroll.test.ts
Tests cover deliberate hide/reveal travel, direction changes, top overscroll, sub-threshold deltas, and the expanded return contract.
Header and composer transition timing
src/components/clinical-dashboard/master-search-header.tsx, docs/branch-review-ledger.md
Header, bottom-composer, and collapse transitions use conditional 200ms/240ms timing and easing; the ledger records the change and validation results.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ScrollReporter
  participant computeScrollHideUpdate
  participant SearchHeader
  User->>ScrollReporter: scroll
  ScrollReporter->>computeScrollHideUpdate: offset and directional travel
  computeScrollHideUpdate-->>ScrollReporter: hidden state and updated intent
  ScrollReporter->>SearchHeader: header/composer visibility state
  SearchHeader->>SearchHeader: apply show or hide transition timing
Loading

Possibly related PRs

  • BigSimmo/Database#421: Connects hide-on-scroll behavior to the main content scroll container and related header/composer plumbing.
  • BigSimmo/Database#578: Adds related reset behavior for hide-on-scroll state when allowAllBreakpoints changes.

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: scroll timing refinements for the shared header and bottom composer.
Description check ✅ Passed The description covers the required Summary and Verification sections and includes the relevant completed and skipped checks.
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 codex/header-footer-scroll-timing-20260717

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

@BigSimmo
BigSimmo merged commit e36ac0c into main Jul 17, 2026
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.

1 participant