Skip to content

Your lightweight open-source personal agent.

fix(webui): reserve navigation space above short-screen composers

Xubin Rend07fac940f9c
diff --git a/docs/webui.md b/docs/webui.md
index 4dc683bd9..488a415d7 100644
--- a/docs/webui.md
+++ b/docs/webui.md
@@ -190,7 +190,9 @@ does not proxy pages or bypass those restrictions; use **Open in browser** inste
On touch devices with Visual Viewport support, the app follows the visible area
when the on-screen keyboard opens or pans the page. Navigation and the composer
-stay in view while messages scroll independently. Pinch zoom keeps the existing
+stay in view while messages scroll independently. In very short viewports (such
+as landscape with the keyboard open), scroll within the composer to reach its
+controls. Pinch zoom keeps the existing
layout instead of resizing it to the magnified area; normal fitting resumes when
you return to the default zoom. Desktop and native-host layout remain unchanged.
diff --git a/webui/src/components/workbench/PaneWorkbench.tsx b/webui/src/components/workbench/PaneWorkbench.tsx
index 106d6292a..7c57ad269 100644
--- a/webui/src/components/workbench/PaneWorkbench.tsx
+++ b/webui/src/components/workbench/PaneWorkbench.tsx
@@ -700,7 +700,7 @@ export function PaneWorkbench({
/>
</header>
) : null}
- <div className="relative min-h-0 flex-1 bg-background">
+ <div className="workbench-body relative min-h-0 flex-1 bg-background">
<div
ref={gridRef}
data-testid="pane-grid"
@@ -837,7 +837,7 @@ export function PaneWorkbench({
</div>
{chrome ? (
- <footer className="shrink-0 bg-background px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] sm:px-4">
+ <footer className="workbench-composer-footer shrink-0 bg-background px-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] sm:px-4">
<div
ref={setComposerPortalTarget}
data-testid="workbench-composer-host"
diff --git a/webui/src/globals.css b/webui/src/globals.css
index 1406cf595..6dabb9626 100644
--- a/webui/src/globals.css
+++ b/webui/src/globals.css
@@ -130,6 +130,17 @@
height: var(--app-viewport-height);
}
+ /* A landscape keyboard can leave less room than the composer needs. Keep
+ navigation reachable and scroll the composer instead of overlapping it. */
+ #root.visual-viewport .workbench-body {
+ min-height: 2.75rem;
+ }
+
+ #root.visual-viewport .workbench-composer-footer {
+ max-height: max(0px, calc(var(--app-viewport-height) - 2.75rem));
+ overflow-y: auto;
+ }
+
* {
scrollbar-color: var(--scrollbar-thumb) transparent;
scrollbar-width: thin;