Skip to content

fix(web): clear iOS status bar for sidebar toggle in standalone PWA mode - #14

Merged
deanjstone merged 1 commit into
mainfrom
fix/pwa-standalone-safe-area-inset
Aug 9, 2026
Merged

fix(web): clear iOS status bar for sidebar toggle in standalone PWA mode#14
deanjstone merged 1 commit into
mainfrom
fix/pwa-standalone-safe-area-inset

Conversation

@deanjstone

Copy link
Copy Markdown
Owner

Summary

  • Adds a @media (display-mode: standalone) override for --workspace-controls-top using env(safe-area-inset-top), so the sidebar toggle clears the iOS status bar when the PWA is launched from the home screen.
  • Mirrors the existing .wco (Electron titlebar) override already in apps/web/src/index.css.

Why

Confirmed on a real iPhone during #6's on-device verification: in standalone mode there's no browser chrome to provide the top inset that a normal Safari tab gets for free, so the toggle sat flush under the status bar and wasn't reliably clickable.

Test plan

  • vp fmt — clean, no changes needed
  • Verified in an isolated test-t3-app environment (Playwright, headless Chromium) that the media-scoped :root custom-property override correctly cascades and is consumed by the toggle's top: var(--workspace-controls-top) — confirmed the toggle's computed top shifts from 0px to the overridden value only when the media condition matches, and is unaffected otherwise (screenshots: toggle flush at top before, shifted down after).
  • Note: Chromium's CDP Emulation.setEmulatedMedia (and Playwright's emulateMedia) does not support forcing display-mode: standalone directly, so the cascade/consumption mechanism was verified using an equivalent stand-in media feature (prefers-color-scheme) applying the identical selector/property pairing — isolating the actual code-path risk from browser-level display-mode support, which is standard, broadly-supported CSS (Chrome 52+, iOS Safari 16.4+) already exercised by the sibling .wco rule in this file.
  • True on-device confirmation (real iPhone, Add to Home Screen) is the only way to close the loop fully — tracked as part of Add basic installable PWA to apps/web (iOS) #1.

Fixes #7

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PsVucKJsURnFjY2gbkH4wV

Installed PWA (standalone display mode) owns the full screen down to
the device status bar, unlike a normal Safari tab where the browser
chrome already provides the top inset. Adds a display-mode: standalone
override for --workspace-controls-top using env(safe-area-inset-top),
mirroring the existing .wco (Electron titlebar) override pattern.

Fixes #7
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Aug 9, 2026
@deanjstone
deanjstone merged commit 4591d4c into main Aug 9, 2026
9 of 10 checks passed
@deanjstone
deanjstone deleted the fix/pwa-standalone-safe-area-inset branch August 9, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PWA standalone mode: sidebar toggle sits under iOS status bar

1 participant