@lethevimlet/sshift 1.8.0 → 1.8.1

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.
@@ -372,18 +372,14 @@ body {
372
372
  }
373
373
 
374
374
  .overflow-toggle {
375
- background: none;
376
- border: none;
377
- color: var(--text-secondary);
378
- padding: 8px;
379
- border-radius: var(--radius-sm);
380
375
  cursor: pointer;
381
- transition: var(--transition-fast);
382
376
  }
383
377
 
384
- .overflow-toggle:hover {
385
- background: var(--bg-hover);
386
- color: var(--text-primary);
378
+ /* Mobile-only controls in the tabs bar / sidebar (the mobile header is gone) */
379
+ /* (.btn sets display later in the file; keep specificity above it) */
380
+ .btn.mobile-bookmarks-btn,
381
+ .btn.sidebar-close-btn {
382
+ display: none;
387
383
  }
388
384
 
389
385
  .overflow-dropdown {
@@ -3453,7 +3449,9 @@ body.dragging-tabs .tabs-container {
3453
3449
  @media (max-width: 768px) {
3454
3450
  :root {
3455
3451
  --sidebar-width: 100%;
3456
- --header-height: 43px;
3452
+ /* No header on mobile (see .header below); everything that offsets
3453
+ by the header height (tabs bar, sidebar, keyboard math) gets 0. */
3454
+ --header-height: 0px;
3457
3455
  }
3458
3456
 
3459
3457
  /* Thinner xterm scrollbar on mobile */
@@ -3519,9 +3517,39 @@ body.dragging-tabs .tabs-container {
3519
3517
  display: none;
3520
3518
  }
3521
3519
 
3522
- /* Show mobile overflow menu on mobile */
3520
+ /* Show mobile overflow menu on mobile (lives in the tabs bar) */
3523
3521
  .mobile-overflow-menu {
3524
3522
  display: block;
3523
+ flex-shrink: 0;
3524
+ }
3525
+
3526
+ .tabs-actions .overflow-toggle {
3527
+ min-width: 28px;
3528
+ min-height: 28px;
3529
+ padding: 4px 6px;
3530
+ font-size: 12px;
3531
+ }
3532
+
3533
+ /* Mobile header is removed: the tabs bar is the only top bar. It holds
3534
+ bookmarks | tabs dropdown | resize | font -/+ | keys | mic | ... */
3535
+ .header {
3536
+ display: none;
3537
+ }
3538
+
3539
+ .btn.mobile-bookmarks-btn {
3540
+ display: flex;
3541
+ align-items: center;
3542
+ justify-content: center;
3543
+ min-width: 28px;
3544
+ min-height: 28px;
3545
+ padding: 4px 6px;
3546
+ margin-left: 4px;
3547
+ font-size: 12px;
3548
+ flex-shrink: 0;
3549
+ }
3550
+
3551
+ .btn.sidebar-close-btn {
3552
+ display: inline-flex;
3525
3553
  }
3526
3554
 
3527
3555
  /* Hide desktop tabs on mobile */
@@ -3529,10 +3557,12 @@ body.dragging-tabs .tabs-container {
3529
3557
  display: none;
3530
3558
  }
3531
3559
 
3532
- /* Show mobile tabs dropdown on mobile */
3560
+ /* Show mobile tabs dropdown on mobile. min-width: 0 lets it shrink
3561
+ (label ellipsis) so the bookmarks and overflow buttons fit. */
3533
3562
  .mobile-tabs-dropdown {
3534
3563
  display: flex;
3535
3564
  margin-left: 4px;
3565
+ min-width: 0;
3536
3566
  }
3537
3567
 
3538
3568
  .mobile-force-resize-btn {
@@ -3545,7 +3575,9 @@ body.dragging-tabs .tabs-container {
3545
3575
 
3546
3576
  .mobile-tabs-toggle {
3547
3577
  min-height: 28px;
3578
+ min-width: 0;
3548
3579
  padding: 4px 6px;
3580
+ gap: 6px;
3549
3581
  font-size: 12px;
3550
3582
  }
3551
3583
 
@@ -3694,7 +3726,8 @@ body.dragging-tabs .tabs-container {
3694
3726
  }
3695
3727
 
3696
3728
  /* Keep tabs-actions buttons at 32px for consistency */
3697
- .tabs-actions .btn-sm {
3729
+ .tabs-actions .btn-sm,
3730
+ .mobile-bookmarks-btn {
3698
3731
  min-height: 28px;
3699
3732
  min-width: 28px;
3700
3733
  padding: 4px 6px;
@@ -4493,10 +4526,11 @@ body.dragging-tabs .tabs-container {
4493
4526
  transform: none !important;
4494
4527
  }
4495
4528
 
4496
- /* Add padding to main-content to account for fixed header and tabs */
4529
+ /* Add padding to main-content to account for the fixed tabs bar
4530
+ (there is no header on mobile any more) */
4497
4531
  .main-content {
4498
- /* Header: 43px + 1px border, Tabs: 35px + 1px border = 80px total */
4499
- padding-top: 80px;
4532
+ /* Tabs bar: 37px incl. border */
4533
+ padding-top: 37px;
4500
4534
  /* Account for mobile keys bar at bottom - use padding-bottom */
4501
4535
  padding-bottom: 75px;
4502
4536
  }
@@ -4572,8 +4606,8 @@ body.dragging-tabs .tabs-container {
4572
4606
  }
4573
4607
 
4574
4608
  body.keyboard-visible .main-content {
4575
- /* Header and tabs stay fixed at top when keyboard is open */
4576
- padding-top: 80px !important;
4609
+ /* Tabs bar stays fixed at top when keyboard is open (no header) */
4610
+ padding-top: 37px !important;
4577
4611
  /* Remove bottom padding since mobile keys bar is positioned above keyboard */
4578
4612
  padding-bottom: 0 !important;
4579
4613
  }
@@ -169,108 +169,6 @@
169
169
  </button>
170
170
  </div>
171
171
 
172
- <!-- Mobile overflow menu -->
173
- <div class="mobile-overflow-menu" id="mobileOverflowMenu">
174
- <button class="btn btn-icon overflow-toggle" id="overflowToggle" title="More Options">
175
- <i class="fas fa-ellipsis-v"></i>
176
- </button>
177
- <div class="overflow-dropdown" id="overflowDropdown">
178
- <button class="overflow-option" id="mobileThemeToggle">
179
- <i class="fas fa-lightbulb"></i>
180
- <span id="mobileThemeToggleText">Toggle Dark</span>
181
- </button>
182
- <div class="overflow-submenu" id="mobileAccentSubmenu">
183
- <button class="overflow-option submenu-toggle">
184
- <span class="accent-preview"></span>
185
- <span>Accent Color</span>
186
- <i class="fas fa-chevron-right submenu-arrow"></i>
187
- </button>
188
- <div class="submenu-content accent-submenu">
189
- <button class="accent-option" data-accent="fuchsia">
190
- <span class="accent-color" style="background: #c10059;"></span>
191
- <span class="accent-label">Fuchsia</span>
192
- </button>
193
- <button class="accent-option" data-accent="green">
194
- <span class="accent-color" style="background: #2ea043;"></span>
195
- <span class="accent-label">Green</span>
196
- </button>
197
- <button class="accent-option" data-accent="purple">
198
- <span class="accent-color" style="background: #a371f2;"></span>
199
- <span class="accent-label">Purple</span>
200
- </button>
201
- <button class="accent-option" data-accent="orange">
202
- <span class="accent-color" style="background: #d18616;"></span>
203
- <span class="accent-label">Orange</span>
204
- </button>
205
- <button class="accent-option" data-accent="red">
206
- <span class="accent-color" style="background: #da3633;"></span>
207
- <span class="accent-label">Red</span>
208
- </button>
209
- <button class="accent-option" data-accent="cyan">
210
- <span class="accent-color" style="background: #1f6feb;"></span>
211
- <span class="accent-label">Cyan</span>
212
- </button>
213
- <button class="accent-option" data-accent="blue">
214
- <span class="accent-color" style="background: #58a6ff;"></span>
215
- <span class="accent-label">Blue</span>
216
- </button>
217
- <button class="accent-option" data-accent="yellow">
218
- <span class="accent-color" style="background: #d29922;"></span>
219
- <span class="accent-label">Yellow</span>
220
- </button>
221
- </div>
222
- </div>
223
- <div class="overflow-submenu" id="mobileTerminalColorSubmenu">
224
- <button class="overflow-option submenu-toggle">
225
- <i class="fas fa-palette"></i>
226
- <span>Terminal Colors</span>
227
- <i class="fas fa-chevron-right submenu-arrow"></i>
228
- </button>
229
- <div class="submenu-content terminal-color-submenu">
230
- <div class="terminal-color-option">
231
- <label class="toggle-label">
232
- <span>Override Colors</span>
233
- <input type="checkbox" id="mobileTerminalColorOverride" class="toggle-checkbox">
234
- <span class="toggle-slider"></span>
235
- </label>
236
- </div>
237
- <div class="terminal-color-options" id="mobileTerminalColorOptions">
238
- <div class="terminal-color-option">
239
- <label for="mobileTerminalBgColor">Background</label>
240
- <div class="color-input-group">
241
- <input type="color" id="mobileTerminalBgColor" class="color-input" value="#0d1117">
242
- <button type="button" class="color-reset-btn" data-color-target="bg" title="Restore default background">
243
- <i class="fas fa-rotate-left"></i>
244
- </button>
245
- </div>
246
- </div>
247
- <div class="terminal-color-option">
248
- <label for="mobileTerminalFgColor">Foreground</label>
249
- <div class="color-input-group">
250
- <input type="color" id="mobileTerminalFgColor" class="color-input" value="#e6edf3">
251
- <button type="button" class="color-reset-btn" data-color-target="fg" title="Restore default foreground">
252
- <i class="fas fa-rotate-left"></i>
253
- </button>
254
- </div>
255
- </div>
256
- <div class="terminal-color-option">
257
- <label for="mobileTerminalSelectionColor">Selection</label>
258
- <div class="color-input-group">
259
- <input type="color" id="mobileTerminalSelectionColor" class="color-input" value="#264f78">
260
- <button type="button" class="color-reset-btn" data-color-target="selection" title="Restore default selection color">
261
- <i class="fas fa-rotate-left"></i>
262
- </button>
263
- </div>
264
- </div>
265
- </div>
266
- </div>
267
- </div>
268
- <button class="overflow-option" id="mobileSettingsBtn">
269
- <i class="fas fa-cog"></i>
270
- <span>Settings</span>
271
- </button>
272
- </div>
273
- </div>
274
172
  </div>
275
173
  </header>
276
174
 
@@ -290,6 +188,9 @@
290
188
  <button class="btn btn-sm sidebar-toggle desktop-only" id="sidebarToggle" title="Collapse Sidebar">
291
189
  <i class="fas fa-chevron-left"></i>
292
190
  </button>
191
+ <button class="btn btn-sm sidebar-close-btn" id="sidebarCloseBtn" title="Close">
192
+ <i class="fas fa-times"></i>
193
+ </button>
293
194
  </div>
294
195
  </div>
295
196
  <div class="bookmarks-list" id="bookmarksList">
@@ -318,6 +219,10 @@
318
219
  <div class="layout-panel" id="panel-0" data-panel-id="0">
319
220
  <!-- Tabs -->
320
221
  <div class="tabs-container">
222
+ <!-- Mobile: bookmarks (sidebar) button — replaces the mobile header -->
223
+ <button class="btn btn-sm mobile-bookmarks-btn" id="mobileBookmarksBtn" title="Bookmarks">
224
+ <i class="fas fa-bookmark"></i>
225
+ </button>
321
226
  <!-- Desktop tabs -->
322
227
  <div class="tabs" id="tabs">
323
228
  <!-- Tabs will be added here -->
@@ -358,6 +263,109 @@
358
263
  <button class="btn btn-sm" id="speechToTextBtn" title="Speech to Text">
359
264
  <i class="fas fa-microphone"></i>
360
265
  </button>
266
+ <!-- Mobile overflow menu -->
267
+ <div class="mobile-overflow-menu" id="mobileOverflowMenu">
268
+ <button class="btn btn-sm overflow-toggle" id="overflowToggle" title="More Options">
269
+ <i class="fas fa-ellipsis-v"></i>
270
+ </button>
271
+ <div class="overflow-dropdown" id="overflowDropdown">
272
+ <button class="overflow-option" id="mobileThemeToggle">
273
+ <i class="fas fa-lightbulb"></i>
274
+ <span id="mobileThemeToggleText">Toggle Dark</span>
275
+ </button>
276
+ <div class="overflow-submenu" id="mobileAccentSubmenu">
277
+ <button class="overflow-option submenu-toggle">
278
+ <span class="accent-preview"></span>
279
+ <span>Accent Color</span>
280
+ <i class="fas fa-chevron-right submenu-arrow"></i>
281
+ </button>
282
+ <div class="submenu-content accent-submenu">
283
+ <button class="accent-option" data-accent="fuchsia">
284
+ <span class="accent-color" style="background: #c10059;"></span>
285
+ <span class="accent-label">Fuchsia</span>
286
+ </button>
287
+ <button class="accent-option" data-accent="green">
288
+ <span class="accent-color" style="background: #2ea043;"></span>
289
+ <span class="accent-label">Green</span>
290
+ </button>
291
+ <button class="accent-option" data-accent="purple">
292
+ <span class="accent-color" style="background: #a371f2;"></span>
293
+ <span class="accent-label">Purple</span>
294
+ </button>
295
+ <button class="accent-option" data-accent="orange">
296
+ <span class="accent-color" style="background: #d18616;"></span>
297
+ <span class="accent-label">Orange</span>
298
+ </button>
299
+ <button class="accent-option" data-accent="red">
300
+ <span class="accent-color" style="background: #da3633;"></span>
301
+ <span class="accent-label">Red</span>
302
+ </button>
303
+ <button class="accent-option" data-accent="cyan">
304
+ <span class="accent-color" style="background: #1f6feb;"></span>
305
+ <span class="accent-label">Cyan</span>
306
+ </button>
307
+ <button class="accent-option" data-accent="blue">
308
+ <span class="accent-color" style="background: #58a6ff;"></span>
309
+ <span class="accent-label">Blue</span>
310
+ </button>
311
+ <button class="accent-option" data-accent="yellow">
312
+ <span class="accent-color" style="background: #d29922;"></span>
313
+ <span class="accent-label">Yellow</span>
314
+ </button>
315
+ </div>
316
+ </div>
317
+ <div class="overflow-submenu" id="mobileTerminalColorSubmenu">
318
+ <button class="overflow-option submenu-toggle">
319
+ <i class="fas fa-palette"></i>
320
+ <span>Terminal Colors</span>
321
+ <i class="fas fa-chevron-right submenu-arrow"></i>
322
+ </button>
323
+ <div class="submenu-content terminal-color-submenu">
324
+ <div class="terminal-color-option">
325
+ <label class="toggle-label">
326
+ <span>Override Colors</span>
327
+ <input type="checkbox" id="mobileTerminalColorOverride" class="toggle-checkbox">
328
+ <span class="toggle-slider"></span>
329
+ </label>
330
+ </div>
331
+ <div class="terminal-color-options" id="mobileTerminalColorOptions">
332
+ <div class="terminal-color-option">
333
+ <label for="mobileTerminalBgColor">Background</label>
334
+ <div class="color-input-group">
335
+ <input type="color" id="mobileTerminalBgColor" class="color-input" value="#0d1117">
336
+ <button type="button" class="color-reset-btn" data-color-target="bg" title="Restore default background">
337
+ <i class="fas fa-rotate-left"></i>
338
+ </button>
339
+ </div>
340
+ </div>
341
+ <div class="terminal-color-option">
342
+ <label for="mobileTerminalFgColor">Foreground</label>
343
+ <div class="color-input-group">
344
+ <input type="color" id="mobileTerminalFgColor" class="color-input" value="#e6edf3">
345
+ <button type="button" class="color-reset-btn" data-color-target="fg" title="Restore default foreground">
346
+ <i class="fas fa-rotate-left"></i>
347
+ </button>
348
+ </div>
349
+ </div>
350
+ <div class="terminal-color-option">
351
+ <label for="mobileTerminalSelectionColor">Selection</label>
352
+ <div class="color-input-group">
353
+ <input type="color" id="mobileTerminalSelectionColor" class="color-input" value="#264f78">
354
+ <button type="button" class="color-reset-btn" data-color-target="selection" title="Restore default selection color">
355
+ <i class="fas fa-rotate-left"></i>
356
+ </button>
357
+ </div>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ <button class="overflow-option" id="mobileSettingsBtn">
363
+ <i class="fas fa-cog"></i>
364
+ <span>Settings</span>
365
+ </button>
366
+ </div>
367
+ </div>
368
+
361
369
  </div>
362
370
  </div>
363
371
 
@@ -1277,13 +1285,13 @@
1277
1285
  <div class="setting-item" style="flex-direction: column; align-items: stretch;">
1278
1286
  <label class="setting-label"><i class="fas fa-lock"></i> SSL Certificate</label>
1279
1287
  <div class="setting-description">
1280
- Service workers require a trusted HTTPS connection. To use this app over LAN with a self-signed certificate, install the certificate as a trusted root CA on your device. See the <a href="https://lethevimlet.github.io/sshift/installation.html#trusting-the-https-certificate" target="_blank" rel="noopener noreferrer" class="sw-install-link">installation instructions</a> for details.
1288
+ Service workers require a trusted HTTPS connection. sshift signs its HTTPS certificate with its own local CA; install that CA once on each device (Android: Settings → Security → Encryption &amp; credentials → Install a certificate → CA certificate) and the warnings go away. If the download is blocked, open <code>http://&lt;host&gt;:&lt;port&gt;/api/cert</code> over plain HTTP. See the <a href="https://lethevimlet.github.io/sshift/installation.html#trusting-the-https-certificate" target="_blank" rel="noopener noreferrer" class="sw-install-link">installation instructions</a> for details.
1281
1289
  </div>
1282
1290
  <div id="customCertWarning" class="sw-custom-cert-warning" style="display: none; margin-top: 8px;">
1283
1291
  <i class="fas fa-exclamation-circle"></i> A custom certificate is configured. Download the certificate from your administrator.
1284
1292
  </div>
1285
1293
  <button class="btn btn-secondary" id="downloadCertBtn" style="margin-top: 8px;">
1286
- <i class="fas fa-download"></i> Download Certificate
1294
+ <i class="fas fa-download"></i> Download CA Certificate
1287
1295
  </button>
1288
1296
  </div>
1289
1297
  </div>
@@ -1330,6 +1338,10 @@
1330
1338
  <span class="debug-info-label">SSL Private Key</span>
1331
1339
  <span class="debug-info-value" id="debugKeyPath">Loading...</span>
1332
1340
  </div>
1341
+ <div class="debug-info-item">
1342
+ <span class="debug-info-label">Local CA Certificate</span>
1343
+ <span class="debug-info-value" id="debugCaCertPath">Loading...</span>
1344
+ </div>
1333
1345
  <div class="debug-info-item">
1334
1346
  <span class="debug-info-label">Certificate Type</span>
1335
1347
  <span class="debug-info-value" id="debugCertType">Loading...</span>
@@ -1337,6 +1349,9 @@
1337
1349
  </div>
1338
1350
  </div>
1339
1351
  <div class="modal-footer">
1352
+ <button class="btn btn-secondary" id="copyInputTraceBtn" title="Copy the last mobile keyboard/IME events (for Gboard bug reports)">
1353
+ <i class="fas fa-clipboard"></i> Copy Input Trace
1354
+ </button>
1340
1355
  <button class="btn btn-primary" id="closeDebugInfoBtn">
1341
1356
  <i class="fas fa-check"></i> Close
1342
1357
  </button>
@@ -2325,12 +2325,47 @@ sendChunkedInput(sessionId, data, chunkSize = 2048) {
2325
2325
  });
2326
2326
  }
2327
2327
 
2328
+ /**
2329
+ * The mobile top bar hosts two singleton controls (bookmarks button and
2330
+ * the "..." overflow menu with its big dropdown + listeners). They must
2331
+ * survive layout rebuilds (which recreate every tabs-container), so they
2332
+ * are moved, never recreated: parked in a hidden holder while the layout
2333
+ * is torn down, then mounted into the single panel's tabs-container.
2334
+ */
2335
+ _parkMobileBarSingletons() {
2336
+ let parking = document.getElementById('mobileBarParking');
2337
+ if (!parking) {
2338
+ parking = document.createElement('div');
2339
+ parking.id = 'mobileBarParking';
2340
+ parking.style.display = 'none';
2341
+ document.body.appendChild(parking);
2342
+ }
2343
+ ['mobileBookmarksBtn', 'mobileOverflowMenu'].forEach(id => {
2344
+ const el = document.getElementById(id);
2345
+ if (el && el.parentElement !== parking) parking.appendChild(el);
2346
+ });
2347
+ }
2348
+
2349
+ _mountMobileBarSingletons(tabsContainer) {
2350
+ if (!tabsContainer) return;
2351
+ const bookmarks = document.getElementById('mobileBookmarksBtn');
2352
+ if (bookmarks && bookmarks.parentElement !== tabsContainer) {
2353
+ tabsContainer.insertBefore(bookmarks, tabsContainer.firstChild);
2354
+ }
2355
+ const overflow = document.getElementById('mobileOverflowMenu');
2356
+ const actions = tabsContainer.querySelector('.tabs-actions');
2357
+ if (overflow && actions && overflow.parentElement !== actions) {
2358
+ actions.appendChild(overflow);
2359
+ }
2360
+ }
2361
+
2328
2362
  applyLayout(layout, syncedTabs = null) {
2329
2363
  const layoutContainer = document.getElementById('layoutContainer');
2330
2364
  if (!layoutContainer) {
2331
2365
  console.error('[SSHIFT] Layout container not found');
2332
2366
  return;
2333
2367
  }
2368
+ this._parkMobileBarSingletons();
2334
2369
 
2335
2370
  // On mobile, always force single panel mode
2336
2371
  const effectiveLayout = this.isMobile
@@ -2367,6 +2402,8 @@ sendChunkedInput(sessionId, data, chunkSize = 2048) {
2367
2402
  // Clear and recreate single panel
2368
2403
  layoutContainer.innerHTML = '';
2369
2404
  this.createSinglePanel(layoutContainer, 0);
2405
+ } else {
2406
+ this._mountMobileBarSingletons(existingPanel.querySelector('.tabs-container'));
2370
2407
  }
2371
2408
 
2372
2409
  this.currentLayout = layout;
@@ -2744,6 +2781,7 @@ sendChunkedInput(sessionId, data, chunkSize = 2048) {
2744
2781
  actions.appendChild(speechToTextBtn);
2745
2782
 
2746
2783
  container.appendChild(actions);
2784
+ if (isSingle) this._mountMobileBarSingletons(container);
2747
2785
 
2748
2786
  return container;
2749
2787
  }
@@ -4064,6 +4102,7 @@ const wheelHandler = (e) => {
4064
4102
  if (!element) return defaultHeight;
4065
4103
 
4066
4104
  const style = window.getComputedStyle(element);
4105
+ if (style.display === 'none') return 0;
4067
4106
  const height = parseFloat(style.height) || 0;
4068
4107
  const marginTop = parseFloat(style.marginTop) || 0;
4069
4108
  const marginBottom = parseFloat(style.marginBottom) || 0;
@@ -5764,6 +5803,16 @@ const wheelHandler = (e) => {
5764
5803
  document.getElementById('menuBtn').addEventListener('click', () => {
5765
5804
  this.toggleSidebar();
5766
5805
  });
5806
+ // Mobile top bar (replaces the mobile header): bookmarks button in the
5807
+ // tabs bar, close button inside the sidebar (the sidebar covers the bar).
5808
+ ['mobileBookmarksBtn', 'sidebarCloseBtn'].forEach(id => {
5809
+ const el = document.getElementById(id);
5810
+ if (el) el.addEventListener('click', () => this.toggleSidebar());
5811
+ });
5812
+ const copyInputTraceBtn = document.getElementById('copyInputTraceBtn');
5813
+ if (copyInputTraceBtn) {
5814
+ copyInputTraceBtn.addEventListener('click', () => this.copyInputTrace());
5815
+ }
5767
5816
 
5768
5817
  // Sidebar overlay click to close
5769
5818
  const sidebarOverlay = document.getElementById('sidebarOverlay');
@@ -6984,14 +7033,16 @@ if (keepaliveCountMaxInput && this.sshKeepaliveCountMax) {
6984
7033
  const certPathEl = document.getElementById('debugCertPath');
6985
7034
  const keyPathEl = document.getElementById('debugKeyPath');
6986
7035
  const certTypeEl = document.getElementById('debugCertType');
7036
+ const caCertPathEl = document.getElementById('debugCaCertPath');
6987
7037
 
6988
7038
  if (configPathEl) configPathEl.textContent = info.configPath || 'N/A';
6989
7039
  if (dataDirEl) dataDirEl.textContent = info.dataDir || 'N/A';
6990
7040
  if (certPathEl) certPathEl.textContent = info.certPath || 'N/A';
6991
7041
  if (keyPathEl) keyPathEl.textContent = info.keyPath || 'N/A';
6992
- if (certTypeEl) certTypeEl.textContent = info.usesCustomCert ? 'Custom' : 'Self-signed';
7042
+ if (caCertPathEl) caCertPathEl.textContent = info.caCertPath || 'N/A';
7043
+ if (certTypeEl) certTypeEl.textContent = info.certType || (info.usesCustomCert ? 'Custom' : 'Local CA-signed');
6993
7044
  }).catch(() => {
6994
- const ids = ['debugConfigPath', 'debugDataDir', 'debugCertPath', 'debugKeyPath', 'debugCertType'];
7045
+ const ids = ['debugConfigPath', 'debugDataDir', 'debugCertPath', 'debugKeyPath', 'debugCaCertPath', 'debugCertType'];
6995
7046
  ids.forEach(id => {
6996
7047
  const el = document.getElementById(id);
6997
7048
  if (el) el.textContent = 'Error loading';
@@ -7001,6 +7052,49 @@ if (keepaliveCountMaxInput && this.sshKeepaliveCountMax) {
7001
7052
  this.openModal('debugInfoModal');
7002
7053
  }
7003
7054
 
7055
+ /**
7056
+ * Copy the mobile handlers' keyboard/IME event trace to the clipboard
7057
+ * (Debug Info dialog). This is the data needed to diagnose Gboard
7058
+ * autocomplete/duplication reports — it records every input,
7059
+ * composition, focus, sync and reset on the hidden textarea.
7060
+ */
7061
+ async copyInputTrace() {
7062
+ const trace = {};
7063
+ this.sessions.forEach((session, id) => {
7064
+ if (session.mobileHandler && typeof session.mobileHandler.getInputTrace === 'function') {
7065
+ trace[id] = session.mobileHandler.getInputTrace();
7066
+ }
7067
+ });
7068
+ const text = JSON.stringify({
7069
+ version: (window.SSHIFT_VERSION || document.getElementById('versionNumber')?.textContent || '').trim(),
7070
+ userAgent: navigator.userAgent,
7071
+ isMobile: this.isMobile,
7072
+ activeSessionId: this.activeSessionId,
7073
+ trace
7074
+ }, null, 1);
7075
+ console.log('[SSHIFT] Input trace:\n' + text);
7076
+ try {
7077
+ await navigator.clipboard.writeText(text);
7078
+ this.showToast('Input trace copied to clipboard', 'success');
7079
+ } catch (err) {
7080
+ // Clipboard API can be unavailable (insecure context, no gesture).
7081
+ // Fall back to a selectable textarea inside the dialog.
7082
+ let box = document.getElementById('inputTraceFallback');
7083
+ if (!box) {
7084
+ box = document.createElement('textarea');
7085
+ box.id = 'inputTraceFallback';
7086
+ box.readOnly = true;
7087
+ box.style.cssText = 'width:100%;height:160px;margin-top:8px;font-size:11px;font-family:monospace;';
7088
+ const body = document.querySelector('#debugInfoModal .modal-body') || document.getElementById('debugInfoModal');
7089
+ if (body) body.appendChild(box);
7090
+ }
7091
+ box.value = text;
7092
+ box.focus();
7093
+ box.select();
7094
+ this.showToast('Clipboard unavailable — trace shown below, long-press to copy', 'info');
7095
+ }
7096
+ }
7097
+
7004
7098
  // Sessions Modal
7005
7099
  async openSessionsModal() {
7006
7100
  this.openModal('manageSessionsModal');