Skip to content

fix(ui): hide differentials compare dock on scroll down - #930

Merged
BigSimmo merged 2 commits into
mainfrom
cursor/compare-bar-scroll-hide-6f94
Jul 19, 2026
Merged

fix(ui): hide differentials compare dock on scroll down#930
BigSimmo merged 2 commits into
mainfrom
cursor/compare-bar-scroll-hide-6f94

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

On differentials search results, the phone bottom search dock was intentionally pinned whenever the Compare selected addon was present, which blocked the usual scroll-down hide behaviour.

This restores hide/reveal for the whole bottom chrome cluster (search pill + Compare selected / Tick results bar) on phone widths, keeps Compare in-flow inside the dock so it travels with the hide animation, and updates the UI regression accordingly.

Changes

  • Re-enable bottomComposerScrollHiddenActive / shouldHideBottomOnScroll when the compare addon slot is active
  • Convert .differentials-mobile-compare-fab from viewport-fixed to in-dock relative layout
  • Extra translate clearance for the compare-addon dock so Compare does not peep at the viewport edge
  • Rewrite the differentials compare Playwright coverage for hide on scroll down / reveal on scroll up

Verification

  • npm run verify:ui — 240/240 Chromium tests passed (includes differentials compare dock hide + forms dock hide regression)
  • npm run verify:pr-local — format, lint, typecheck, and CI Build / Unit coverage / Production UI passed; local unit suite only blocked by container-only pdf-extraction-budget (python ENOENT)
  • npm run verify:cheap — lint/typecheck passed; same container-only PDF budget failures as above

Risk and rollout

  • Risk: low — phone UI chrome only; differentials compare addon now hides/reveals with the existing search dock scroll-hide behaviour; no API, retrieval, or answer-generation contract changes
  • Rollback: revert this PR; dock pinning behaviour returns to always-visible compare + search chrome
  • Provider or production effects: None

Clinical Governance Preflight

  • 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

Notes

  • Worktree: /home/ubuntu/wt-compare-bar-scroll-hide on cursor/compare-bar-scroll-hide-6f94
  • No actionable review threads; Codex review skipped (usage limits) and CodeRabbit skipped while draft
Open in WebOpen in Cursor

Summary by CodeRabbit

  • Bug Fixes

    • Improved mobile Compare controls so they stay aligned within the search dock and hide or reappear together during scrolling.
    • Removed a visual edge artifact when the dock hides near the viewport boundary.
    • Restored tappability of the Compare control after the dock reappears.
  • Tests

    • Expanded mobile UI coverage for dock visibility, scrolling transitions, positioning, and pointer interaction.

Re-enable phone bottom-composer scroll-hide when the compare addon is
present, keep Compare selected in-flow with the dock, and update the UI
regression to assert hide/reveal instead of a pinned dock.
@supabase

supabaseBot commented Jul 19, 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

coderabbitaiBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The mobile differentials compare control now renders within the phone composer dock, hides and reveals with the dock during scroll, receives additional hidden-position clearance, and has expanded geometry and tappability coverage.

Changes

Mobile compare dock behavior

Layer / File(s)Summary
Composer dock hide logic
src/components/clinical-dashboard/master-search-header.tsx, src/components/clinical-dashboard/differentials-home.tsx, src/components/clinical-dashboard/global-search-shell.tsx
The phone composer dock now applies hide-on-scroll behavior to the differentials compare addon, with updated comments describing the shared composer chrome and reserve conditions.
Dock layout and hide clearance
src/app/globals.css
The compare control is positioned in flow within the dock, and its hidden transform adds extra viewport clearance.
Scroll hide and tappability validation
tests/ui-tools.spec.ts
The mobile test verifies dock hiding, transition completion, offscreen positioning, reveal behavior, geometry, and pointer interaction.

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

Possibly related PRs

  • BigSimmo/Database#684: Updates mobile differentials compare dock hide/reveal behavior and related UI coverage.
  • BigSimmo/Database#877: Modifies the mobile differentials compare FAB styling and associated scroll/tappability tests.
  • BigSimmo/Database#899: Uses the bottom composer hidden state for mobile reserve padding.

Suggested labels:codex

Suggested reviewers:claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes the main UI behavior change: hiding the differentials compare dock on scroll down.
Description check✅ PassedThe description matches the template with Summary, Changes, Verification, Risk and rollout, Clinical Governance Preflight, and Notes filled in.
✨ 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 cursor/compare-bar-scroll-hide-6f94

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

Add a small extra translate for the differentials compare addon dock and
poll until Compare is off-screen so the hide transition does not leave a
viewport-edge peep in UI coverage.
@BigSimmo
BigSimmo marked this pull request as ready for review July 19, 2026 15:23
@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cursor

cursorBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@BigSimmo
BigSimmo merged commit 274b40f into mainJul 19, 2026
19 of 22 checks passed
@BigSimmo
BigSimmo deleted the cursor/compare-bar-scroll-hide-6f94 branch July 19, 2026 16:24
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.

2 participants

@BigSimmo@cursoragent