@jhizzard/termdeck 0.10.3 → 0.10.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": "@jhizzard/termdeck",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "Browser-based terminal multiplexer with metadata overlays, panel flashback memory recall, and AI-aware session management",
5
5
  "bin": {
6
6
  "termdeck": "./packages/cli/src/index.js"
@@ -1228,6 +1228,17 @@
1228
1228
  state.focusedId = id;
1229
1229
  }
1230
1230
 
1231
+ // Transfer xterm keyboard focus to the focused panel — without this,
1232
+ // the CSS class is the only thing that changed and keystrokes still
1233
+ // go to whichever element had DOM focus before (often the launcher
1234
+ // input, which submits a NEW terminal on Enter, or the previously
1235
+ // focused panel — leading to "easy to put wrong response into a
1236
+ // chat" reports). Mirrors the focus transfer in focusSessionById.
1237
+ const entry = state.sessions.get(id);
1238
+ if (entry && entry.terminal) {
1239
+ try { entry.terminal.focus(); } catch (err) { /* ignore */ }
1240
+ }
1241
+
1231
1242
  // Re-fit all visible terminals
1232
1243
  requestAnimationFrame(() => fitAll());
1233
1244
  }
@@ -3759,11 +3770,24 @@
3759
3770
 
3760
3771
  // Keyboard shortcuts
3761
3772
  document.addEventListener('keydown', (e) => {
3762
- // Tour has priority: Esc exits, ArrowRight/Enter advances, ArrowLeft back
3773
+ // Tour has priority: Esc exits, ArrowRight/Enter advances, ArrowLeft back.
3774
+ // BUT: never swallow Enter/Arrow keys when the user is typing into a
3775
+ // terminal panel or any input/textarea — otherwise terminal Enter
3776
+ // (Claude Code / shell submit) gets eaten by the tour and the user
3777
+ // ends up advancing tour steps when they meant to send a message.
3778
+ // Brad's 2026-04-28 panel-UX report: "Hitting enter from full screen
3779
+ // goes to matrix again" matched this pathway when the v0.10.0 tour
3780
+ // re-fired post-upgrade.
3763
3781
  if (tourState.active) {
3764
- if (e.key === 'Escape') { e.preventDefault(); endTour(); return; }
3765
- if (e.key === 'ArrowRight' || e.key === 'Enter') { e.preventDefault(); nextTourStep(); return; }
3766
- if (e.key === 'ArrowLeft') { e.preventDefault(); prevTourStep(); return; }
3782
+ const tgt = e.target;
3783
+ const tag = tgt?.tagName || '';
3784
+ const inEditable = tag === 'INPUT' || tag === 'TEXTAREA' || tgt?.isContentEditable;
3785
+ const inTerminal = tgt?.closest && tgt.closest('.term-panel');
3786
+ if (!inEditable && !inTerminal) {
3787
+ if (e.key === 'Escape') { e.preventDefault(); endTour(); return; }
3788
+ if (e.key === 'ArrowRight' || e.key === 'Enter') { e.preventDefault(); nextTourStep(); return; }
3789
+ if (e.key === 'ArrowLeft') { e.preventDefault(); prevTourStep(); return; }
3790
+ }
3767
3791
  }
3768
3792
  // Ctrl+Shift+N → new terminal
3769
3793
  if (e.ctrlKey && e.shiftKey && e.key === 'N') {
@@ -297,7 +297,13 @@
297
297
  /* ===== MAIN GRID ===== */
298
298
  .grid-container {
299
299
  flex: 1;
300
- padding: 6px;
300
+ /* Right padding of 38px reserves the 32px guide-rail collapsed strip
301
+ (position:fixed; right:0) plus 6px breathing. Without this the
302
+ rightmost panel's close (×) button sits underneath the guide
303
+ toggle and becomes unclickable. The expanded-guide state keeps
304
+ its own backdrop/shadow over panels — that's pre-existing
305
+ behavior and not affected by this padding. */
306
+ padding: 6px 38px 6px 6px;
301
307
  overflow: hidden;
302
308
  display: grid;
303
309
  gap: 6px;
@@ -3439,6 +3445,15 @@
3439
3445
  padding: 24px;
3440
3446
  text-align: center;
3441
3447
  }
3448
+ /* Sprint 41 T3 fixed the JS race but missed the CSS specificity gotcha:
3449
+ `.graph-loading { display: flex }` above wins over the UA default
3450
+ `[hidden] { display: none }` (class > attribute). Result: setting
3451
+ `el.hidden = true` from JS did nothing visually, and "Loading graph…"
3452
+ kept rendering behind "No memories yet". Explicit override below. */
3453
+ .graph-loading[hidden],
3454
+ .graph-empty[hidden] {
3455
+ display: none;
3456
+ }
3442
3457
  .graph-loading-spinner {
3443
3458
  width: 28px;
3444
3459
  height: 28px;