From da85e9738b751e9d0dc60f5af23136baa174e55f Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 11 Mar 2026 12:59:47 +0100 Subject: [PATCH] fix: iPad tablet toolbar styling and PR #34 refinements - Scope toolbar bottom-offset to phone breakpoint only (position:fixed); prevents double-correction on iPad where toolbar is position:relative - Extract keyboard accessory bar styles to top-level mobile.css so /init, /clear, /compact buttons render correctly on iPad - Use desktop-style toolbar sizing on tablet (430-768px): smaller font, no forced min-height, proper gap between buttons - Show voice/mic button on tablet (was hidden at <1023px with no mobile replacement above 430px) - Bump CSS cache-bust version to 0.1633 Co-Authored-By: Claude Opus 4.6 --- src/web/public/index.html | 4 +- src/web/public/mobile.css | 125 +++++++++++++++++++++++++++++++++++--- 2 files changed, 119 insertions(+), 10 deletions(-) diff --git a/src/web/public/index.html b/src/web/public/index.html index b668d953..2e28afa2 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -9,8 +9,8 @@ Codeman - - + + diff --git a/src/web/public/mobile.css b/src/web/public/mobile.css index 60420b99..a85ab565 100644 --- a/src/web/public/mobile.css +++ b/src/web/public/mobile.css @@ -234,6 +234,35 @@ html.mobile-init .file-browser-panel { .subagent-window-body { font-size: 0.7rem; } + + /* Show desktop voice button on tablet (hidden by max-width:1023px in styles.css, + mobile .btn-voice-mobile only shows at <430px) */ + .toolbar-center .btn-toolbar.btn-voice { + display: flex !important; + } + + /* Toolbar — use desktop-style sizing on tablet (plenty of room at 430-768px) */ + .toolbar { + padding: 0 0.5rem; + gap: 0.5rem; + } + + .toolbar-left, + .toolbar-right { + gap: 0.5rem; + } + + /* Instance count controls are hidden on tablet, so toolbar-group needs gap + to space out Run / Stop / Run Shell (desktop uses gap:0 because -1+ separates them) */ + .toolbar-group { + gap: 0.5rem; + } + + .btn-toolbar { + padding: 0.4rem 0.75rem; + font-size: 0.75rem; + min-height: unset; + } } /* ============================================================================ @@ -498,6 +527,13 @@ html.mobile-init .file-browser-panel { will-change: transform; } + /* iOS Safari with tab bar: position: fixed uses the layout viewport which + extends behind the browser chrome. Offset the toolbar upward by the delta + between 100vh (layout) and --app-height (visual). */ + .ios-device.safari-browser .toolbar { + bottom: calc(var(--safe-area-bottom) + (100vh - var(--app-height, 100vh))); + } + /* Show case selector in center */ .toolbar-center { display: flex !important; @@ -1895,6 +1931,87 @@ html.mobile-init .file-browser-panel { } +/* ============================================================================ + Keyboard Accessory Bar — all mobile/tablet sizes + Visual styles extracted from phone breakpoint so they apply on iPad too. + Phone-specific positioning (position: fixed) remains in @media (max-width: 430px). + ============================================================================ */ +.keyboard-accessory-bar { + display: none; + height: 44px; + background: #1a1a1a; + border-top: 1px solid rgba(255, 255, 255, 0.1); + padding: 6px 8px; + gap: 8px; + align-items: center; + justify-content: center; + z-index: 51; +} + +.keyboard-accessory-bar.visible { + display: flex; +} + +.accessory-btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 4px; + padding: 6px 12px; + background: #2a2a2a; + border: 1px solid rgba(255, 255, 255, 0.15); + border-radius: 6px; + color: #e5e5e5; + font-size: 0.65rem; + font-weight: 500; + cursor: pointer; + transition: background 0.15s, border-color 0.15s; +} + +.accessory-btn.confirming { + background: #6b4f00; + border-color: #b8860b; + color: #ffd54f; +} + +.accessory-btn:active { + background: #3a3a3a; +} + +.accessory-btn svg { + width: 14px; + height: 14px; +} + +.accessory-btn-arrow { + padding: 6px 10px; + background: #1e3a5f; + border-color: rgba(59, 130, 246, 0.3); + color: #93c5fd; +} + +.accessory-btn-arrow:active { + background: #2563eb; +} + +.accessory-btn-dismiss { + padding: 8px 14px; + background: #2a2a2a; + border: 1.5px solid rgba(255, 255, 255, 0.25); + border-radius: 6px; + color: #e5e5e5; +} + +.accessory-btn-dismiss svg { + width: 22px; + height: 22px; + stroke-width: 3; +} + +.accessory-btn-dismiss:active { + background: #3a3a3a; +} + /* ============================================================================ iOS Safari Specific Fixes ============================================================================ */ @@ -1903,14 +2020,6 @@ html.mobile-init .file-browser-panel { overscroll-behavior: none; } -/* iPad Safari with tabs: position: fixed uses the layout viewport which extends - behind the browser chrome (tab bar). Calculate the offset between the layout - viewport (innerHeight) and the visual viewport (--app-height) to push the - toolbar into the visible area. --app-height is set by MobileDetection.updateAppHeight(). */ -.ios-device.safari-browser .toolbar { - bottom: calc(var(--safe-area-bottom) + (100vh - var(--app-height, 100vh))); -} - .ios-device.safari-browser .terminal-container { /* Keep momentum scrolling but prevent page bounce */ -webkit-overflow-scrolling: touch;