cli-tunnel 1.2.1 → 1.2.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/remote-ui/app.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-tunnel",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Tunnel any CLI app to your phone — PTY + devtunnel + xterm.js",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/remote-ui/app.js CHANGED
@@ -113,8 +113,7 @@
113
113
  }, 150);
114
114
  });
115
115
 
116
- // Send initial size
117
- setTimeout(sendResize, 500);
116
+ // Initial size is sent on WS open (see ws.onopen)
118
117
 
119
118
  // Keyboard input → send to bridge → PTY
120
119
  xterm.onData((data) => {
@@ -850,7 +849,8 @@
850
849
  connected = true;
851
850
  reconnectAttempt = 0;
852
851
  setStatus('online', 'Connected');
853
- // PTY mode: server sends pty data immediately, no ACP handshake needed
852
+ // Reset resize tracking so initial pty_resize is always sent on new connection
853
+ if (xterm) { lastCols = 0; lastRows = 0; sendResize(); }
854
854
  };
855
855
  ws.onclose = () => {
856
856
  connected = false; acpReady = false; sessionId = null;