Skip to content

Match tablet search header behavior to desktop - #1435

Merged
BigSimmo merged 19 commits into
mainfrom
codex/fix-header-behavior-on-medium-screens
Jul 31, 2026
Merged

Match tablet search header behavior to desktop#1435
BigSimmo merged 19 commits into
mainfrom
codex/fix-header-behavior-on-medium-screens

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Tablet breakpoints were keeping the search composer pinned/sticky while desktop used normal page flow, causing inconsistent header/search behaviour between tablet and desktop viewports.
  • The goal is to make tablet behave like desktop so submitted/result search composers are part of page flow (scroll away) while phones keep the bottom dock behaviour.

Description

  • Move the desktop/result composer activation down to the sm breakpoint by changing desktopPageComposerMediaQuery from "(min-width: 1024px)" to "(min-width: 640px)" and rendering the page-slot host from lgsm (className="hidden sm:block sm:empty:hidden").
  • Keep phone dock behaviour unchanged and retain heroComposerBreakpoint="all" for mode-home hero ownership; ensure PhoneFooterLayerPortal still ports the phone dock during overlay hide.
  • Update related components and helpers to use the new tablet threshold (master-search-header.tsx, global-search-shell.tsx, dashboard-desktop-result-composer-slot.tsx) and adjust comments documenting the decision logic.
  • Update docs and static contract tests to reflect the tablet+desktop page-flow behaviour (docs/search-chrome-behaviour.md, tests/* changes) so tests and documentation match the new contract.

Testing

  • Ran npm run test -- --run tests/header-scroll-hide-contract.test.ts and the focused contract passed (29 tests passed).
  • Ran Playwright e2e for the impacted flows with `npm run test:e2e -- tests/ui-chrome-scroll.spec.ts tests/ui-tools.spec.ts --project=chromium --grep

Codex Task

Summary by CodeRabbit

  • Bug Fixes

    • Updated tablet and desktop search behavior so search headers scroll naturally with page content instead of remaining pinned.
    • Improved search composer placement across tablet and desktop screen sizes.
    • Preserved existing mobile search docking behavior.
  • Documentation

    • Clarified responsive search layout, scrolling, overlay behavior, and page-flow ownership rules.
  • Tests

    • Updated responsive and scroll behavior coverage for the revised tablet and desktop experience.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 1 minute

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dc2cb5f0-e8a4-4a4b-b211-b727354c819e

📥 Commits

Reviewing files that changed from the base of the PR and between b9838fc and b448955.

📒 Files selected for processing (8)
  • docs/branch-review-ledger.md
  • docs/search-chrome-behaviour.md
  • src/components/clinical-dashboard/dashboard-desktop-result-composer-slot.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • tests/header-scroll-hide-contract.test.ts
  • tests/ui-chrome-scroll.spec.ts
  • tests/ui-tools.spec.ts
📝 Walkthrough

Walkthrough

Tablet and desktop result search now portals into normal page flow from the sm breakpoint. The sticky stack retains only the auto-hiding top bar, while phone search remains docked. Documentation and scroll, breakpoint, and responsive-layout tests were updated.

Changes

Responsive search page flow

Layer / File(s) Summary
Search ownership contract
docs/search-chrome-behaviour.md, docs/branch-review-ledger.md
Search documentation defines tablet and desktop result search as page-flow content and records the related review updates.
Responsive composer portal
src/components/clinical-dashboard/master-search-header.tsx, src/components/clinical-dashboard/global-search-shell.tsx, src/components/clinical-dashboard/dashboard-desktop-result-composer-slot.tsx
Composer activation and visibility move from desktop-only lg/1024px behavior to sm/640px behavior, with phone docking retained.
Scroll and breakpoint validation
tests/header-scroll-hide-contract.test.ts, tests/ui-chrome-scroll.spec.ts, tests/ui-tools.spec.ts
Tests verify page ownership, independent tablet/desktop scrolling, updated visibility classes, and unchanged mobile behavior.

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

Sequence Diagram(s)

sequenceDiagram
  participant Viewport
  participant MasterSearchHeader
  participant GlobalSearchShell
  participant PageContent
  Viewport->>MasterSearchHeader: reaches sm breakpoint
  MasterSearchHeader->>GlobalSearchShell: activates page composer portal
  GlobalSearchShell->>PageContent: renders search in normal flow
  PageContent->>PageContent: scrolls search with page content
Loading

Possibly related PRs

  • BigSimmo/Database#1238: Related tablet/desktop changes move search composers from sticky positioning into normal page flow.
  • BigSimmo/Database#1239: Related page-anchored search-composer behavior changes the same components and tests.
  • BigSimmo/Database#1270: Related search-shell and header changes shift tablet/desktop search ownership to page flow.

Suggested reviewers: claude

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@BigSimmo
BigSimmo marked this pull request as ready for review July 30, 2026 10:59
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent resolve merge conflict

@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merge conflict on PR #1435 is resolved.

git merge-tree showed the tree was already clean against main (GitHub’s dirty state was behind-branch staleness). I merged origin/main into codex/fix-header-behavior-on-medium-screens and pushed.

Open in Web Open in Cursor 

Sync with latest main so the PR is mergeable again.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 13:14
@github-actions

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Production UI (1)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #6954 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo disabled auto-merge July 30, 2026 14:12
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 19:07
@BigSimmo
BigSimmo disabled auto-merge July 30, 2026 19:16
@BigSimmo BigSimmo added the skip-branch-sync Opt out of hosted pr-branch-sync / update-branch on this PR label Jul 30, 2026
@BigSimmo

Copy link
Copy Markdown
Owner Author

Temporarily paused during the owner-authorized ordered merge sweep so main cannot move between exact-head review and merge. The branch and all commits are preserved; this PR will be reopened at its verified place in the queue.

@BigSimmo BigSimmo closed this Jul 30, 2026
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent this PR will be re-opened soon. Please resolve any failing CI, run bugbot and resolve any bugbot comments against current repo and fix any merge conflicts and also fix any errors and address and fix all comments or suggestions that are likely to improve the PR and Codebase. Please implement smallest required fix according to best code practices. Check your work. Leave this PR closed for now but still make all these changes and run the review. I want it ready to go for when I re-open it.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1435 is ready to reopen and remains CLOSED.

State

  • Branch tip: 66f84f86 on codex/fix-header-behavior-on-medium-screens
  • Synced with main (14 ahead / 0 behind); git merge-tree clean
  • GitHub still shows the frozen closed head 144c9ce; reopen will pick up the current tip

CI / reviews

  • Last hosted CI on the closed head was already green (PR required, Production UI)
  • Bugbot: no cursor[bot] findings or review threads
  • CodeRabbit was rate-limited only; no actionable inline comments
  • No unresolved review threads

Fixes pushed

  1. Merged latest main
  2. Tightened tablet chrome-scroll assertion so tablet also requires searchInsideDesktopPageSlot
  3. Updated stale sticky-stack comments to match sm+ page-flow ownership

Verification

  • Header contracts: 61 passed
  • ui-chrome-scroll Chromium: 17 passed
  • Composer ownership (mobile/tablet/desktop): 15 passed
  • verify:cheap: 2 failures are Cursor-env only (git remote get-url rewrites origin with an embedded token via insteadOf); hosted CI won’t hit that

Review

No P0/P1 issues. Residual risk: brief pre-portal sticky fallback before the page slot attaches — covered by the new tablet slot assertion. Ledger row recorded under scope PR #1435 tablet search header readiness.

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 31, 2026 00:14
Keep the closed PR tip current so it can reopen cleanly.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Assert tablet result search starts in the page slot in the chrome-scroll
owner test, and update sticky-stack comments to match sm+ page-flow ownership.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append the closed-PR readiness review for the current tip after Bugbot
triage, main sync, and local chrome verification.

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

Copy link
Copy Markdown
Owner Author

@coderabbitai please run a new review of this closed PR for me

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@BigSimmo: Running a fresh review for PR #1435.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@BigSimmo BigSimmo reopened this Jul 31, 2026
@supabase

supabase Bot commented Jul 31, 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

Copy link
Copy Markdown
Owner Author

@cursoragent Work this open PR (confirm number + GitHub head first). Start from
origin/ matching that head; preserve unrelated local WIP.
Do not merge, force-push, rebase, or arm auto-merge. No provider-backed
gates without approval. If you can’t push or resolve threads: diagnose +
comment only.

Goal: review + Bugbot the tip, fix actionable issues with smallest changes,
clear merge/required-CI/thread blockers, push fixes, post one PR summary.
Stay light — no full local verify:* / Playwright / broad suites unless
needed to prove one concrete fix. Don’t regenerate large assets unless required.

  1. Snapshot tip, behind/ahead, mergeable, merge-tree (real conflict vs
    behind-but-clean), required checks on that tip, unresolved actionable
    threads. Missing checks while dirty ≠ green. If the tip moves mid-work,
    re-snapshot.
    npm run ledger:lookup -- <branch> --scope "PR #<n> review+bugbot+fix".
    If already reviewed at this HEAD/scope and still clean with required checks
    green and no new actionable threads: summarize, comment, stop.

  2. Unblock once: real conflict → merge origin/main (for ledger/issues churn,
    prefer main’s queues, keep this PR’s notes); behind-but-clean → sync once
    (wait if required CI is in flight); else leave. No sync thrash.
    If auto-merge is already armed, push only for a real blocker.

  3. Review + Bugbot the delta vs base. High-confidence only (correctness,
    security, privacy, auth, data loss, migrations/RLS, clinical/RAG/source,
    prod reliability, user-facing). Separate PR-introduced defects from
    pre-existing re-emitted data. For generated assets, review generator/
    contracts/aliases/cache — not every generated line. If RAG/governance
    surfaces are touched, note/fix PR body only when policy text is wrong
    or missing. Ignore bot summary/rate-limit noise.

  4. Fix P0/P1 always; fix clear scoped P2; otherwise short disposition reply
    then resolve. Fix required-check failures on this tip only (ignore advisory).
    Prove with the smallest targeted check only. No broad refactors.

  5. Format + commit before push. Push only this PR’s fix commits. Append ledger
    for the final GitHub head + scope above (--supersede on a requested fresh
    same-HEAD pass). Never push a ledger-only tip.

  6. Post one concise top-level PR comment: tip SHA, sync, fixed vs dispositioned,
    required CI status, residual risks. Leave merge to me. Inline comments only
    for remaining open P0/P1 needing a human decision.

Stop when merge-tree clean, no actionable threads left, and required checks are
green or clearly in progress on the current tip.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1435 tip f3034e27 is unblocked and ready for CI to finish.

Snapshot

Item Result
Head f3034e27000492bfe7d416c9e73595bc6e35cca7
Sync Merged main (real conflict → then behind-but-clean); 0 behind, merge-tree clean
GitHub MERGEABLE (BLOCKED only while required checks run)
Bugbot / threads 0 findings, 0 unresolved threads
Review No P0/P1; no product code changes this pass

What changed

  • Resolved docs/search-chrome-behaviour.md: kept tablet/desktop page-flow wording + main’s phone-scroll test inventory
  • Re-synced once after main advanced so GitHub could build the merge ref again

CI

Required checks are in progress on this tip (CI pending; SAST/Secret Scan running; PR mergeability ✅). Summary comment posted on the PR — merge left to you.

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 31, 2026 04:57
Resolve docs/search-chrome-behaviour.md by keeping tablet/desktop page-flow
coverage wording and main's expanded phone-scroll test inventory.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Ledger the conflict resolution and empty Bugbot/thread pass at the
post-merge tip.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Clear behind-but-clean drift so GitHub can build the merge ref again.

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

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1435 readiness — tip f3034e27000492bfe7d416c9e73595bc6e35cca7

Sync: Merged origin/main twice. First cleared a real content conflict in docs/search-chrome-behaviour.md (kept this PR’s tablet/desktop page-flow wording + main’s expanded phone-scroll test inventory). Second cleared behind-but-clean drift after main moved. merge-tree clean, 0 behind, GitHub MERGEABLE (PR mergeability ✅).

Bugbot / threads: 0 cursor[bot] findings; 0 unresolved review threads. CodeRabbit rate-limit/walkthrough only — no actionable inline comments.

Review: No P0/P1 in the product delta (desktopPageComposerMediaQuery 1024→640, slot lgsm, tests/docs aligned). No code fixes beyond conflict resolution.

Fixed vs dispositioned: Conflict resolved. Nothing else to disposition.

Required CI: In progress on this tip (CI pending, SAST/Secret Scan running). Prior tip was blocked while dirty; this tip has a merge ref again.

Residual risk: Brief pre-portal sticky fallback before the page slot attaches at sm+ (covered by tablet searchInsideDesktopPageSlot assertions). Leave merge to you.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent fix failing merge conflict and CI

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Unblocked. GitHub’s dirty state was behind-but-clean (1 commit behind; merge-tree clean).

  • Merged origin/main → tip ec8a978a
  • MERGEABLE, 0 behind, PR mergeability ✅
  • Required CI restarted on this tip (CI pending, SAST in progress, Secret Scan / PR policy green)

No product code changes — sync only.

Open in Web Open in Cursor 

Clear behind-but-clean drift so GitHub can build the merge ref and CI can run.

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

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Merge conflict / CI unblock — tip ec8a978ad6f0955b0f9afb4c22a06015cac2d0a1

GitHub reported dirty, but git merge-tree was clean (behind-but-clean; main had advanced by 1). Merged origin/main once and pushed.

  • merge-tree: clean, 0 behind
  • GitHub: MERGEABLE
  • Required CI: restarted on this tip (CI / SAST / Secret Scan / PR mergeability / PR policy)

No product code changes in this sync. Leave merge to you.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 31, 2026 05:18
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent resolve merge conflict

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Resolved. Again behind-but-clean (not a content conflict) — merged origin/main and pushed.

  • Tip: b448955b
  • MERGEABLE, 0 behind
  • CI restarted on the new tip
Open in Web Open in Cursor 

Clear behind-but-clean drift so the PR is mergeable again.

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

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Merge conflict resolved — tip b448955b2f1f58ca72826191d7005febb587229d

GitHub dirty was behind-but-clean (1 behind; merge-tree clean). Merged origin/main (auto-merged ledger only) and pushed.

  • MERGEABLE, 0 behind
  • Required CI restarted on this tip

@BigSimmo
BigSimmo merged commit 00753db into main Jul 31, 2026
25 checks passed
@BigSimmo
BigSimmo deleted the codex/fix-header-behavior-on-medium-screens branch July 31, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex skip-branch-sync Opt out of hosted pr-branch-sync / update-branch on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants