From e96baf9f66b7611df076c3931485d94db8c1af16 Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 16 Mar 2026 01:42:16 +0100 Subject: [PATCH] chore: version packages Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 10 ++++++++++ CLAUDE.md | 2 +- package.json | 2 +- src/web/public/mobile-handlers.js | 13 ++++++++++++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70101104..6753c898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # aicodeman +## 0.4.4 + +### Patch Changes + +- fix: mobile keyboard hides terminal content on iPhone + + Fixed a bug where opening the virtual keyboard on iPhone left zero visible terminal space. Two independent mechanisms were both accounting for the keyboard height: `MobileDetection.updateAppHeight()` shrunk `--app-height` to the visual viewport height, while `KeyboardHandler.updateLayoutForKeyboard()` added a large `paddingBottom`. These double-counted, leaving negative space for the terminal (user saw accessory bar + toolbar but no terminal content). + + Fix: `updateAppHeight()` now skips when the keyboard is visible, and `handleViewportResize()` restores `--app-height` to the pre-keyboard value on first detection (since MobileDetection's listener fires before KeyboardHandler's). On keyboard close, `--app-height` is re-synced to the current visual viewport. + ## 0.4.3 ### Patch Changes diff --git a/CLAUDE.md b/CLAUDE.md index 318dd4e8..81f610a6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -52,7 +52,7 @@ When user says "COM": 4. **Sync CLAUDE.md version**: Update the `**Version**` line below to match the new version from `package.json` 5. **Commit and deploy**: `git add -A && git commit -m "chore: version packages" && git push && npm run build && systemctl --user restart codeman-web` -**Version**: 0.4.3 (must match `package.json`) +**Version**: 0.4.4 (must match `package.json`) ## Project Overview diff --git a/package.json b/package.json index 0601896b..466838db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aicodeman", - "version": "0.4.3", + "version": "0.4.4", "description": "The missing control plane for AI coding agents - run 20 autonomous agents with real-time monitoring and session persistence", "type": "module", "main": "dist/index.js", diff --git a/src/web/public/mobile-handlers.js b/src/web/public/mobile-handlers.js index d9fac4cb..8b67b35b 100644 --- a/src/web/public/mobile-handlers.js +++ b/src/web/public/mobile-handlers.js @@ -100,8 +100,12 @@ const MobileDetection = { /** Set --app-height CSS variable from visual viewport. * On iPad Safari with tabs, 100vh extends behind the tab bar. - * visualViewport.height reflects the actual visible area. */ + * visualViewport.height reflects the actual visible area. + * Skips when virtual keyboard is open — KeyboardHandler manages + * layout via translateY + paddingBottom; shrinking --app-height + * would double-count and leave zero space for the terminal. */ updateAppHeight() { + if (typeof KeyboardHandler !== 'undefined' && KeyboardHandler.keyboardVisible) return; const vh = window.visualViewport?.height || window.innerHeight; document.documentElement.style.setProperty('--app-height', `${vh}px`); }, @@ -225,6 +229,10 @@ const KeyboardHandler = { if (heightDiff > 150 && !this.keyboardVisible) { this.keyboardVisible = true; document.body.classList.add('keyboard-visible'); + // Restore --app-height: MobileDetection's resize listener fires before ours + // and may have already shrunk it for the keyboard viewport change. + // Use initialViewportHeight (captured before keyboard opened). + document.documentElement.style.setProperty('--app-height', `${this.initialViewportHeight}px`); this.onKeyboardShow(); } // Keyboard hidden (viewport grew back close to initial) @@ -234,6 +242,9 @@ const KeyboardHandler = { this.keyboardVisible = false; document.body.classList.remove('keyboard-visible'); this.onKeyboardHide(); + // Re-sync --app-height now that keyboard is gone (MobileDetection skipped + // updates while keyboardVisible was true) + MobileDetection.updateAppHeight(); } // Update baseline when keyboard is not visible — adapts to address bar