@hmduc16031996/claude-mb-bridge 2.5.3 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmduc16031996/claude-mb-bridge",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "Bridge between Claude Code CLI and your mobile app via WebView",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/public/app.js CHANGED
@@ -1724,6 +1724,40 @@ class ClaudeRemote {
1724
1724
 
1725
1725
  // Always show in mobile flex flow
1726
1726
  this.elements.mainScreen.classList.add('mobile-keys-visible');
1727
+
1728
+ // Handle initial sizing
1729
+ if (window.visualViewport) {
1730
+ window.visualViewport.addEventListener('resize', () => this.onViewportChange());
1731
+ window.visualViewport.addEventListener('scroll', () => this.onViewportChange());
1732
+ this.onViewportChange();
1733
+ }
1734
+ }
1735
+
1736
+ onViewportChange() {
1737
+ if (!window.visualViewport) return;
1738
+
1739
+ // Adjust app height to match visual viewport (the actual visible area above the keyboard)
1740
+ const viewportHeight = window.visualViewport.height;
1741
+ const bodyHeight = window.innerHeight;
1742
+
1743
+ // On some mobile browsers, setting 100% isn't enough when keyboard is open
1744
+ // We explicitly set the app height to the visual viewport height
1745
+ const app = document.getElementById('app');
1746
+ if (app) {
1747
+ app.style.height = `${viewportHeight}px`;
1748
+ }
1749
+
1750
+ // Recalculate terminal size for the new container height
1751
+ this.fitTerminal();
1752
+
1753
+ // Ensure terminal scrolled to bottom so cursor is visible above keyboard
1754
+ // Only if the current session is terminal-based
1755
+ if (this.currentSessionId && this.terminal) {
1756
+ this.terminal.scrollToBottom();
1757
+ }
1758
+
1759
+ // Log for debugging visibility if needed
1760
+ // console.log(`Viewport height: ${viewportHeight}, Body height: ${bodyHeight}`);
1727
1761
  }
1728
1762
 
1729
1763
 
package/public/styles.css CHANGED
@@ -63,11 +63,12 @@ body {
63
63
 
64
64
  #app {
65
65
  width: 100%;
66
- height: 100%;
66
+ height: 100vh; /* Primary height */
67
67
  display: flex;
68
68
  flex-direction: column;
69
69
  position: relative;
70
70
  z-index: 1;
71
+ overflow: hidden;
71
72
  }
72
73
 
73
74
  /* ===== SCREENS ===== */