shell-mirror 1.5.123 → 1.5.124

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": "shell-mirror",
3
- "version": "1.5.123",
3
+ "version": "1.5.124",
4
4
  "description": "Access your Mac shell from any device securely. Perfect for mobile coding with Claude Code CLI, Gemini CLI, and any shell tool.",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -363,7 +363,7 @@
363
363
  <p>Connecting to terminal...</p>
364
364
  </div>
365
365
  <div id="terminal-container">
366
- <div class="session-header" id="session-header" style="display: none;">
366
+ <div class="session-header" id="session-header">
367
367
  <!-- Connection Status Indicator -->
368
368
  <div class="connection-status" id="connection-status"></div>
369
369
 
@@ -243,7 +243,10 @@ function startConnection() {
243
243
  connectContainer.style.display = 'none';
244
244
  terminalContainer.classList.add('show');
245
245
  term.open(document.getElementById('terminal'));
246
-
246
+
247
+ // Initialize session display (shows header with connection status even before session exists)
248
+ updateSessionDisplay();
249
+
247
250
  // Track terminal session start in Google Analytics
248
251
  if (typeof sendGAEvent === 'function') {
249
252
  sendGAEvent('terminal_session_start', {
@@ -955,14 +958,14 @@ function updateSessionDisplay() {
955
958
  return;
956
959
  }
957
960
 
958
- if (currentSession) {
959
- sessionHeader.style.display = 'flex';
960
-
961
- // Update tabs
962
- console.log('[CLIENT] 📋 Rendering tabs, availableSessions:', availableSessions);
963
- renderTabs();
961
+ // Always render tabs (they will show appropriate state even if no sessions)
962
+ console.log('[CLIENT] 📋 Rendering tabs, availableSessions:', availableSessions, 'currentSession:', currentSession);
963
+ renderTabs();
964
964
 
965
+ if (currentSession) {
965
966
  console.log('[CLIENT] 📋 Session display updated:', currentSession);
967
+ } else {
968
+ console.log('[CLIENT] 📋 No current session - showing connection state only');
966
969
  }
967
970
  }
968
971
 
@@ -1036,10 +1039,13 @@ function renderTabs() {
1036
1039
  </div>
1037
1040
  `;
1038
1041
  }).join('');
1039
- }
1040
1042
 
1041
- // Add new session button
1042
- tabsHTML += '<button class="session-tab-new" onclick="createNewSession()" title="New Session">+</button>';
1043
+ // Add new session button only when we have sessions
1044
+ tabsHTML += '<button class="session-tab-new" onclick="createNewSession()" title="New Session">+</button>';
1045
+ } else {
1046
+ // No sessions available - show status message
1047
+ tabsHTML = '<div style="color: #888; font-size: 0.85rem; padding: 6px 12px;">No sessions available</div>';
1048
+ }
1043
1049
 
1044
1050
  tabBar.innerHTML = tabsHTML;
1045
1051
  console.log('[CLIENT] ✅ Tabs rendered:', sessionsToRender.length, 'tabs');