tabminal 1.3.10 → 2.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabminal",
3
- "version": "1.3.10",
3
+ "version": "2.0.1",
4
4
  "description": "A modern, persistent web terminal with multi-tab support and real-time system monitoring.",
5
5
  "type": "module",
6
6
  "bin": {
package/public/app.js CHANGED
@@ -2615,15 +2615,29 @@ function setStatus(server, status) {
2615
2615
 
2616
2616
  const activeServer = getActiveServer();
2617
2617
  if (!activeServer || activeServer.id !== server.id) return;
2618
+ const hostName = getDisplayHost(server);
2619
+ const target = hostName || 'host';
2618
2620
 
2619
2621
  if (status === 'reconnecting') {
2620
- alert('Lost connection. Reconnecting...', { type: 'warning', title: 'Connection' });
2622
+ alert(`Lost connection to ${target}. Reconnecting...`, {
2623
+ type: 'warning',
2624
+ title: 'Connection'
2625
+ });
2621
2626
  } else if (status === 'connected' && prevStatus === 'reconnecting') {
2622
- alert('Connection restored.', { type: 'success', title: 'Connection' });
2627
+ alert(`Connection to ${target} restored.`, {
2628
+ type: 'success',
2629
+ title: 'Connection'
2630
+ });
2623
2631
  } else if (status === 'terminated') {
2624
- alert('Session has ended.', { type: 'error', title: 'Connection' });
2632
+ alert(`Session on ${target} has ended.`, {
2633
+ type: 'error',
2634
+ title: 'Connection'
2635
+ });
2625
2636
  } else if (status === 'connected' && !prevStatus) {
2626
- alert('Connected to host.', { type: 'success', title: 'Connection' });
2637
+ alert(`Connected to ${target}.`, {
2638
+ type: 'success',
2639
+ title: 'Connection'
2640
+ });
2627
2641
  }
2628
2642
  }
2629
2643
 
@@ -3194,22 +3208,6 @@ let searchOptions = {
3194
3208
  wholeWord: false,
3195
3209
  regex: false
3196
3210
  };
3197
- const searchDecorations = {
3198
- matchBackground: '#ffffff',
3199
- matchBorder: '#ffffff',
3200
- matchOverviewRuler: '#ffffff',
3201
- activeMatchBackground: '#ffffff',
3202
- activeMatchBorder: '#ffffff',
3203
- activeMatchColorOverviewRuler: '#ffffff'
3204
- };
3205
-
3206
- function buildSearchRunOptions(extra = {}) {
3207
- return {
3208
- ...searchOptions,
3209
- ...extra,
3210
- decorations: searchDecorations
3211
- };
3212
- }
3213
3211
 
3214
3212
  if (searchBar) {
3215
3213
  const updateUI = (found) => {
@@ -3230,8 +3228,8 @@ if (searchBar) {
3230
3228
  const term = searchInput.value;
3231
3229
 
3232
3230
  let found = false;
3233
- if (forward) found = addon.findNext(term, buildSearchRunOptions());
3234
- else found = addon.findPrevious(term, buildSearchRunOptions());
3231
+ if (forward) found = addon.findNext(term, searchOptions);
3232
+ else found = addon.findPrevious(term, searchOptions);
3235
3233
 
3236
3234
  updateUI(found);
3237
3235
  };
@@ -3264,7 +3262,7 @@ if (searchBar) {
3264
3262
  // Incremental search
3265
3263
  const found = state.sessions.get(state.activeSessionKey).searchAddon.findNext(term, {
3266
3264
  incremental: true,
3267
- ...buildSearchRunOptions()
3265
+ ...searchOptions
3268
3266
  });
3269
3267
 
3270
3268
  updateUI(found);
package/public/index.html CHANGED
@@ -119,16 +119,26 @@
119
119
  </script>
120
120
  <script>
121
121
  (function() {
122
+ const currentUrl = new URL(window.location.href);
123
+ if (currentUrl.searchParams.has('rt')) {
124
+ currentUrl.searchParams.delete('rt');
125
+ const query = currentUrl.searchParams.toString();
126
+ const normalizedUrl = `${currentUrl.pathname}${query ? `?${query}` : ''}${currentUrl.hash}`;
127
+ window.history.replaceState(window.history.state, '', normalizedUrl);
128
+ }
129
+
122
130
  const runtimeStorageKey = 'tabminal_runtime_boot_id';
123
- let runtimeBootId = 'stable';
131
+ let runtimeBootId = '';
124
132
  try {
125
- runtimeBootId = localStorage.getItem(runtimeStorageKey) || 'stable';
133
+ runtimeBootId = localStorage.getItem(runtimeStorageKey) || '';
126
134
  } catch {
127
- runtimeBootId = 'stable';
135
+ runtimeBootId = '';
128
136
  }
137
+ const runtimeAssetKey = runtimeBootId || `cold-${Date.now()}`;
138
+ window.__tabminalRuntimeAssetKey = runtimeAssetKey;
129
139
  const link = document.createElement('link');
130
140
  link.rel = 'stylesheet';
131
- link.href = `./styles.css?v=${encodeURIComponent(runtimeBootId)}`;
141
+ link.href = `./styles.css?v=${encodeURIComponent(runtimeAssetKey)}`;
132
142
  document.head.appendChild(link);
133
143
  })();
134
144
  </script>
@@ -282,17 +292,26 @@
282
292
  </div>
283
293
  </div>
284
294
  <script>
285
- function getRuntimeBootIdForAssets() {
295
+ function getRuntimeAssetKey() {
286
296
  const runtimeStorageKey = 'tabminal_runtime_boot_id';
287
297
  try {
288
- return localStorage.getItem(runtimeStorageKey) || 'stable';
298
+ const bootId = localStorage.getItem(runtimeStorageKey) || '';
299
+ if (bootId) {
300
+ return bootId;
301
+ }
289
302
  } catch {
290
- return 'stable';
303
+ // Fall through to cold key.
304
+ }
305
+ if (window.__tabminalRuntimeAssetKey) {
306
+ return window.__tabminalRuntimeAssetKey;
291
307
  }
308
+ const coldKey = `cold-${Date.now()}`;
309
+ window.__tabminalRuntimeAssetKey = coldKey;
310
+ return coldKey;
292
311
  }
293
312
 
294
313
  (function() {
295
- const runtimeBootId = getRuntimeBootIdForAssets();
314
+ const runtimeBootId = getRuntimeAssetKey();
296
315
  const script = document.createElement('script');
297
316
  script.type = 'module';
298
317
  script.src = `./app.js?v=${encodeURIComponent(runtimeBootId)}`;
@@ -301,7 +320,7 @@
301
320
 
302
321
  if ('serviceWorker' in navigator) {
303
322
  window.addEventListener('load', () => {
304
- const runtimeBootId = getRuntimeBootIdForAssets();
323
+ const runtimeBootId = getRuntimeAssetKey();
305
324
  navigator.serviceWorker.register(
306
325
  `/sw.js?rt=${encodeURIComponent(runtimeBootId)}`
307
326
  )
package/public/styles.css CHANGED
@@ -165,6 +165,13 @@
165
165
  /* Visual center tweak */
166
166
  }
167
167
 
168
+ /* Make search selection highly visible. */
169
+ .xterm .xterm-selection div {
170
+ background-color: #ffffff !important;
171
+ mix-blend-mode: difference;
172
+ opacity: 1 !important;
173
+ }
174
+
168
175
  :root {
169
176
  color-scheme: dark;
170
177
  --bg-base: #002b36;