fix(ui): standardize edge-to-edge phone header collapse#1259
Conversation
…dden-edge # Conflicts: # src/components/DocumentViewer.tsx
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPhone-owned headers now share a universal phone collapse host and portal. Safe-area release is included in collapse-budget calculations, with updated documentation, route wiring, static contracts, and phone UI regression coverage. ChangesPhone header collapse
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PageHeader
participant PhoneHeaderCollapsePortal
participant MasterSearchHeader
participant ScrollMetrics
PageHeader->>PhoneHeaderCollapsePortal: render phone-owned header
PhoneHeaderCollapsePortal->>MasterSearchHeader: portal into phone collapse host
ScrollMetrics->>MasterSearchHeader: measure collapsed header and safe-area release
MasterSearchHeader-->>PageHeader: hide or reveal shared chrome
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/header-scroll-hide-contract.test.ts (1)
154-164: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winWhitespace-exact string assertions are brittle.
Lines 159-160 assert on a literal substring that embeds a
\nplus the exact 12-space indentation of the ternary inmaster-search-header.tsx. A harmless reformat (e.g., Prettier re-wrapping that ternary) would fail this test with no functional change, even though the surroundingtoContainchecks in this same test file (e.g., Lines 111-113) already use this pattern more safely (single-line strings). Consider splitting into two whitespace-insensitive checks (e.g., separatetoContaincalls forheaderChromeHiddenand"max-sm:h-0, or a regex) to decouple the assertion from incidental formatting.♻️ Suggested refactor to decouple from exact indentation
- expect(headerSource).toContain('headerChromeHidden\n ? "max-sm:h-0'); - expect(headerSource).toContain(': "max-sm:h-[var(--safe-area-top)]'); + expect(headerSource).toMatch(/headerChromeHidden\s*\?\s*"max-sm:h-0/); + expect(headerSource).toMatch(/:\s*"max-sm:h-\[var\(--safe-area-top\)\]/);🤖 Prompt for 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. In `@tests/header-scroll-hide-contract.test.ts` around lines 154 - 164, Update the whitespace-sensitive assertions in the test named “releases the phone top safe-area with hidden chrome while retaining the wide inset” so they no longer require the exact newline and indentation between headerChromeHidden and the max-sm:h-0 branch. Split the expectation into independent substring checks or use a whitespace-insensitive pattern, while preserving validation of both the condition and hidden-state class.
🤖 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.
Nitpick comments:
In `@tests/header-scroll-hide-contract.test.ts`:
- Around line 154-164: Update the whitespace-sensitive assertions in the test
named “releases the phone top safe-area with hidden chrome while retaining the
wide inset” so they no longer require the exact newline and indentation between
headerChromeHidden and the max-sm:h-0 branch. Split the expectation into
independent substring checks or use a whitespace-insensitive pattern, while
preserving validation of both the condition and hidden-state class.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 49c361d4-43b1-4ed4-b72f-d176c3ec1a92
📒 Files selected for processing (16)
docs/branch-review-ledger.mddocs/search-chrome-behaviour.mdsrc/components/DocumentViewer.tsxsrc/components/clinical-dashboard/global-search-shell.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/clinical-dashboard/phone-header-collapse-portal.tsxsrc/components/clinical-dashboard/use-hide-on-scroll.tssrc/components/differentials/differential-detail-page.tsxsrc/components/therapy-compass/nav.tsxsrc/components/therapy-compass/therapy-compass.csssrc/lib/mode-home-composer.tstests/header-scroll-hide-contract.test.tstests/therapy-compass-mode-wiring.test.tstests/therapy-compass-responsive-contract.test.tstests/ui-phone-scroll.spec.tstests/ui-smoke.spec.ts
💤 Files with no reviewable changes (1)
- src/components/clinical-dashboard/global-search-shell.tsx
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #5872 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
…dden-edge Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01c04ae1a7
ℹ️ 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".
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…into codex/phone-header-hidden-edge # Conflicts: # src/components/clinical-dashboard/master-search-header.tsx # tests/ui-phone-scroll.spec.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/components/clinical-dashboard/master-search-header.tsx`:
- Around line 413-434: Update the focus-listener effect around
phoneHeaderCollapseAddonRef to react to the addon host and collapse-strategy
lifecycle, not only hideOnScrollEnabled, so listeners attach when a conditional
host is created or replaced. When attaching, recompute headerChromeFocused from
the host’s current focus state; when detaching or cleaning up, clear
headerChromeFocused so removed portal content cannot leave sharedChromePinned
active.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d9e1dafb-6a8c-46e8-bb38-1dafce61920c
📒 Files selected for processing (4)
docs/branch-review-ledger.mdsrc/components/clinical-dashboard/master-search-header.tsxtests/header-scroll-hide-contract.test.tstests/ui-phone-scroll.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- tests/header-scroll-hide-contract.test.ts
- tests/ui-phone-scroll.spec.ts
- docs/branch-review-ledger.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2622c6026c
ℹ️ 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".
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…into codex/phone-header-hidden-edge # Conflicts: # src/components/clinical-dashboard/master-search-header.tsx # tests/header-scroll-hide-contract.test.ts
Summary
Verification
npm run verify:pr-localnpm run verify:ui— 308/308 Chromium tests passednpm run verify:cheapnode scripts/run-playwright.mjs tests/ui-phone-scroll.spec.ts --project=chromium— 38/38 passed on the final main-synced codenpm run verify:release— not run because the repo classifies the release gate as provider-confirmation-required; local Chromium, production build, full unit, and hosted required CI are the approved gates for this UI-only changeRisk and rollout
maininvokes the repository's configured Railway auto-deploy. No manual Railway, Supabase, OpenAI, or other provider workflow was called.Clinical Governance Preflight
Not applicable — this changes shared responsive UI chrome and offline tests only; it does not alter ingestion, retrieval/ranking, answers, source rendering, document access, privacy, environment configuration, or clinical output.
Notes
RAG impact: no retrieval behaviour change — shared phone UI chrome, tests, and documentation only.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests