Skip to content

Fix mobile edge-to-edge content when chrome hides#900

Closed
BigSimmo wants to merge 1 commit into
mainfrom
codex/update-app-for-edge-to-edge-layout-pxtlm1
Closed

Fix mobile edge-to-edge content when chrome hides#900
BigSimmo wants to merge 1 commit into
mainfrom
codex/update-app-for-edge-to-edge-layout-pxtlm1

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Mobile browsers left a large bottom composer reserve when the header/footer chrome hid on scroll, leaving a blank/black band instead of letting the page content extend edge-to-edge; the change makes the site content fill the revealed viewport when chrome is collapsed.

Description

  • Update src/components/clinical-dashboard/global-search-shell.tsx to compute visibleMobileComposerReserve and to set mobileComposerReserve to max(0.75rem, env(safe-area-inset-bottom)) when phoneScrollHide.hidden is true so the large bottom clearance is released while keeping the original reserve when chrome is visible.
  • Added a short explanatory comment describing why the reserve is released during hide-on-scroll to avoid a toolbar-sized blank band behind collapsed Safari chrome.
  • No other files were modified.

Testing

  • Ran git diff --check which completed successfully with no reported issues.
  • Committed the change on branch work (561498f) and verified the worktree is clean after the commit.
  • Attempted npm run ensure but it was blocked because the local runtime is Node 20.20.2 while the project requires Node 24.x so the local server could not be started.
  • Attempted npm run test:focused -- --files src/components/clinical-dashboard/global-search-shell.tsx but it failed due to missing test dependencies (node_modules/vitest/vitest.mjs) and the Node version mismatch, so focused automated tests could not be executed.

Codex Task

Summary by CodeRabbit

  • Bug Fixes
    • Improved mobile layout behavior when the search controls are hidden during scrolling.
    • Content now uses more available screen space while preserving safe-area spacing around the bottom edge.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The mobile search shell preserves its existing composer reserve calculation and applies smaller safe-area-based bottom spacing when mobile chrome is hidden during phone scrolling.

Changes

Mobile Composer Reserve

Layer / File(s) Summary
Scroll-aware reserve calculation
src/components/clinical-dashboard/global-search-shell.tsx
The existing visible-composer reserve is retained, while the applied reserve switches to max(0.75rem, env(safe-area-inset-bottom)) when phoneScrollHide.hidden is true.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • BigSimmo/Database#421: Implements similar mobile search-composer reserve behavior in the related mockup search shell.
  • BigSimmo/Database#684: Modifies the same shell’s mobile composer reserve and scroll-hidden handling.
  • BigSimmo/Database#828: Changes the phoneScrollHide.hidden state consumed by this reserve calculation.

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the mobile chrome-hide edge-to-edge layout fix.
Description check ✅ Passed It covers motivation, implementation, and testing, with only minor deviation from the template's section names.
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/update-app-for-edge-to-edge-layout-pxtlm1

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

@supabase

supabase Bot commented Jul 18, 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 18, 2026 18:50
@BigSimmo
BigSimmo enabled auto-merge (squash) July 18, 2026 18:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/global-search-shell.tsx`:
- Around line 280-282: Update the mobileComposerReserve calculation in the
global search shell to use the effective composer visibility state rather than
phoneScrollHide.hidden alone. Reuse or expose the state from MasterSearchHeader
so open menus and focused controls retain visibleMobileComposerReserve, and add
a regression test covering chrome reopening or focus after scroll-hide.
🪄 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: d9ad0d9a-ffca-4307-88c8-57e6094b0ade

📥 Commits

Reviewing files that changed from the base of the PR and between ef042ca and 29f09f4.

📒 Files selected for processing (1)
  • src/components/clinical-dashboard/global-search-shell.tsx

Comment on lines +280 to +282
const mobileComposerReserve = phoneScrollHide.hidden
? "max(0.75rem, env(safe-area-inset-bottom))"
: visibleMobileComposerReserve;

@coderabbitai coderabbitai Bot Jul 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Base the reserve on effective composer visibility.

phoneScrollHide.hidden can remain true while MasterSearchHeader keeps the header/composer visible for an open menu or focused control (master-search-header.tsx lines 308-330). This drops the main content reserve to 0.75rem while visible chrome can still overlay the bottom of #main-content. Use the same effective hidden state, or expose that state from MasterSearchHeader, and add a regression test for reopening/focusing chrome after scroll-hide.

🤖 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 `@src/components/clinical-dashboard/global-search-shell.tsx` around lines 280 -
282, Update the mobileComposerReserve calculation in the global search shell to
use the effective composer visibility state rather than phoneScrollHide.hidden
alone. Reuse or expose the state from MasterSearchHeader so open menus and
focused controls retain visibleMobileComposerReserve, and add a regression test
covering chrome reopening or focus after scroll-hide.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • git diff --check
  • npm run test:focused -- --files src/components/clinical-dashboard/global-search-shell.tsx,src/components/clinical-dashboard/master-search-header.tsx,tests/clinical-dashboard-merge-artifacts.test.ts — focused runner rejected direct test/config paths and instructed running the full unit suite.
  • ⚠️ npm run test — blocked by environment setup: missing node_modules/vitest/vitest.mjs; local runtime reported Node.js v20.20.2.

View task →

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipped: comment is from another GitHub bot.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29f09f473e

ℹ️ 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".

Comment on lines +280 to +282
const mobileComposerReserve = phoneScrollHide.hidden
? "max(0.75rem, env(safe-area-inset-bottom))"
: visibleMobileComposerReserve;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the reserve when the bottom dock stays visible

On phone differential search results with the compare add-on active, MasterSearchHeader intentionally keeps the bottom dock visible because mobileBottomSearchAddonSlotId disables bottom hide-on-scroll, but this new reserve switch still shrinks #main-content padding whenever only the header hides. After a downward scroll on /differentials results, the visible compare/dock can overlap the final cards; the existing geometry check in tests/ui-tools.spec.ts that scrolls results and asserts lastResultBottom <= dockTop would catch this. Gate the reserve reduction on the same condition that actually hides the bottom composer, not just phoneScrollHide.hidden.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • npm run workflow:flightplan -- --write-evidence --files src/components/clinical-dashboard/global-search-shell.tsx,src/components/clinical-dashboard/master-search-header.tsx,tests/ui-tools.spec.ts
  • git diff --check
  • ⚠️ npm run test:focused -- --files src/components/clinical-dashboard/global-search-shell.tsx,src/components/clinical-dashboard/master-search-header.tsx,tests/ui-tools.spec.ts — helper failed closed because the changed file list includes tests/ui-tools.spec.ts and instructed running npm run test.
  • ⚠️ npm run test — blocked by missing local dependency node_modules/vitest/vitest.mjs under Node 20.20.2.
  • ⚠️ npm run ensure — blocked because the project requires Node 24.x, but the local runtime is Node 20.20.2.
  • ⚠️ npm run typecheck — blocked by missing local dependency node_modules/typescript/bin/tsc under Node 20.20.2.

View task →

@BigSimmo

Copy link
Copy Markdown
Owner Author

@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.

@github-actions

Copy link
Copy Markdown

CI triage

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

  • Unit coverageneeds 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 #3471 (success).

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 29f09f473e

ℹ️ 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".

@BigSimmo

Copy link
Copy Markdown
Owner Author

Closing as duplicate of #899 (identical edge-to-edge reserve change). Continuing babysit fixes on #899.

@BigSimmo BigSimmo closed this Jul 18, 2026
auto-merge was automatically disabled July 18, 2026 19:11

Pull request was closed

@BigSimmo
BigSimmo deleted the codex/update-app-for-edge-to-edge-layout-pxtlm1 branch July 18, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant