Skip to content

Fix mobile secondary panel overlapping device safe areas - #2909

Merged
SawyerHood merged 1 commit into
get-bb:mainfrom
dillonzq:fix/mobile-secondary-panel-safe-area
Sep 3, 2026
Merged

SawyerHood merged 1 commit into
get-bb:mainfrom
dillonzq:fix/mobile-secondary-panel-safe-area

Conversation

@dillonzq

@dillonzq dillonzq commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #2908

Problem

On iPhone PWAs (viewport-fit=cover), the compact secondary right panel renders through a body portal with fixed inset-y-0, so it never inherits the safe-area padding AppLayout applies. Top controls land under the status bar and their touch targets conflict with system UI.

Fix

Reuse the exact same four-side safe-area padding classes AppLayout already uses on the shelf container:

"fixed inset-y-0 right-0 flex h-(--bb-shell-height) touch-pan-y select-none flex-col overflow-hidden border-l border-border-seam bg-background pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] pl-[env(safe-area-inset-left)] outline-none",

The background still extends edge to edge; only interactive content is pushed inside the safe area.

Testing

  • Added a regression test asserting the shelf carries all four safe-area padding classes: apps/app/src/components/secondary-panel/CompactSecondaryPanelShelf.test.tsx
  • CompactSecondaryPanelShelf.test.tsx: 14/14 passing on current main

The compact secondary panel shelf renders through a body portal with
fixed inset-y-0 positioning, bypassing the safe-area padding applied by
AppLayout. On iPhone PWAs the top controls landed under the status bar.

Reuse the same four-side safe-area padding classes AppLayout already
uses so controls stay inside the device safe area while the background
still extends edge to edge.
Copilot AI lite review requested due to automatic review settings September 2, 2026 06:07

Copilot AI 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.

🟢 Approval recommended

The change is a small, consistent reuse of existing AppLayout safe-area classes and is covered by a focused regression test.

Pull request overview

Fixes an iPhone PWA (viewport-fit=cover) layout bug where the portaled compact secondary right panel didn’t inherit AppLayout safe-area insets, causing top controls to overlap the iOS status bar.

Changes:

  • Add the same four-side safe-area padding utility classes used by AppLayout to the portaled CompactSecondaryPanelShelf container.
  • Add a regression test asserting the shelf includes all four safe-area padding classes.
File summaries
File Description
apps/app/src/components/secondary-panel/CompactSecondaryPanelShelf.tsx Applies safe-area inset padding classes directly on the portaled shelf container to keep interactive content out of iOS system UI areas.
apps/app/src/components/secondary-panel/CompactSecondaryPanelShelf.test.tsx Adds a regression assertion that the shelf carries the expected safe-area padding classes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SawyerHood
SawyerHood merged commit a8de819 into get-bb:main Sep 3, 2026
13 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.

Mobile PWA: compact secondary panel controls overlap iPhone status bar (missing safe-area insets)

3 participants