From d22da871266268165ee72922cc163b9521f822d6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 2 May 2026 07:46:41 -0500 Subject: [PATCH] fix: contain iOS standalone viewport (#76072) Contain the Control UI document in iOS Add-to-Home-Screen standalone mode by enabling viewport-fit=cover, applying safe-area-aware body locking, and constraining the app root so inner panes own scrolling. Thanks @kvncrw. --- CHANGELOG.md | 1 + ui/index.html | 2 +- ui/src/styles/base.css | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9164b42198..bef80cb4b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Control UI: contain the standalone iOS PWA viewport with safe-area-aware document locking, so Add-to-Home-Screen launches cannot scroll past the device bounds. Refs #76072. Thanks @kvncrw. - Agents/restart recovery: match cleaned transcript locks by exact transcript lock paths plus the canonical session fallback, so interrupted main sessions using topic-suffixed transcripts resume after gateway restart. Refs #76052. Thanks @anyech. - Telegram/native commands: pass persisted session files into plugin commands for topic-bound sessions, so `/codex bind` works from Telegram forum topics. Refs #75845 and #76049. Thanks @MatthewSchleder. - Security audit/plugins: ignore plugin install backup, disabled, and dependency debris directories when enumerating installed plugin roots, avoiding false-positive findings for `.openclaw-install-backups` after plugin updates. Fixes #75456. diff --git a/ui/index.html b/ui/index.html index 274d4a96eba..2eb6385ef99 100644 --- a/ui/index.html +++ b/ui/index.html @@ -2,7 +2,7 @@ - + OpenClaw Control diff --git a/ui/src/styles/base.css b/ui/src/styles/base.css index c001fcc6355..fdafc6a483c 100644 --- a/ui/src/styles/base.css +++ b/ui/src/styles/base.css @@ -106,6 +106,10 @@ --duration-fast: 100ms; --duration-normal: 180ms; --duration-slow: 300ms; + --safe-area-top: env(safe-area-inset-top, 0px); + --safe-area-right: env(safe-area-inset-right, 0px); + --safe-area-bottom: env(safe-area-inset-bottom, 0px); + --safe-area-left: env(safe-area-inset-left, 0px); color-scheme: dark; } @@ -532,6 +536,40 @@ openclaw-app { min-height: 100vh; } +@media (display-mode: standalone) { + html, + body { + width: 100%; + height: 100%; + overflow: hidden; + overscroll-behavior: none; + } + + @supports (height: 100dvh) { + html, + body { + height: 100dvh; + } + } + + body { + position: fixed; + inset: 0; + padding-top: var(--safe-area-top); + padding-right: var(--safe-area-right); + padding-bottom: var(--safe-area-bottom); + padding-left: var(--safe-area-left); + } + + openclaw-app { + width: 100%; + height: 100%; + min-width: 0; + min-height: 0; + overflow: hidden; + } +} + a { color: var(--accent); text-decoration: underline;