@bakapiano/ccsm 0.18.5 → 0.18.6

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": "@bakapiano/ccsm",
3
- "version": "0.18.5",
3
+ "version": "0.18.6",
4
4
  "description": "Claude Code Session Manager — Windows web UI to manage many concurrent claude sessions: live list, snapshot/restore, focus existing window, new session in an isolated workspace with repo clones",
5
5
  "license": "MIT",
6
6
  "main": "server.js",
@@ -69,13 +69,15 @@
69
69
  }
70
70
 
71
71
  /* iOS Safari + Edge auto-zoom the viewport when the user taps an
72
- <input>/<textarea> whose font-size is < 16px "terminal suddenly
73
- goes huge" was almost certainly this. xterm.js's hidden
74
- .xterm-helper-textarea sits at 12px CSS by default; bumping it to
75
- 16px stops the auto-zoom without affecting visible text (the
76
- textarea is positioned at the cursor and overlapped by canvas
77
- glyphs). Same defensive bump on every actual form input. */
78
- .xterm-helper-textarea,
72
+ <input>/<textarea> whose font-size is < 16px. Defensive bump on
73
+ real form inputs. NOTE: we deliberately do NOT touch
74
+ .xterm-helper-textarea here xterm.js measures cell dimensions
75
+ off that element's computed font, so forcing it to 16px makes the
76
+ terminal render every glyph at ~16px regardless of the fontSize
77
+ option we passed in. (TerminalView intentionally picks 11px on
78
+ phones for ~50 cols.) On real iPhone the helper textarea anti-
79
+ zoom is handled by the viewport meta tag instead — see
80
+ public/index.html's `maximum-scale=1.0`. */
79
81
  .input,
80
82
  input[type="text"],
81
83
  input[type="search"],
package/public/index.html CHANGED
@@ -2,7 +2,14 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
+ <!-- maximum-scale=1 stops iOS Safari from auto-zooming the page
6
+ when the user taps a sub-16px input. xterm's helper textarea
7
+ inherits the terminal's own font size (11px on phones); if we
8
+ instead bumped it to 16px via CSS, xterm would measure the
9
+ cell off the inflated textarea and render every glyph ~50%
10
+ oversized. Locking page zoom here lets us leave the textarea
11
+ alone. -->
12
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
6
13
  <!-- Bleeds the cream surface into the Edge/Chrome --app= title bar
7
14
  so it visually disappears against the body. The browser does
8
15
  honor this in standalone app windows. -->
@@ -52,7 +52,8 @@ export function TerminalView({ terminalId, cliType }) {
52
52
  // Desktop stays at 13. We re-evaluate on every mount, so a viewport
53
53
  // rotation that crosses the breakpoint picks up the new size on
54
54
  // next mount (rare; users typically don't rotate mid-session).
55
- const baseFontSize = window.matchMedia('(max-width: 640px)').matches ? 11 : 13;
55
+ const isMobile = window.matchMedia('(max-width: 640px)').matches;
56
+ const baseFontSize = isMobile ? 11 : 13;
56
57
  const term = new Terminal({
57
58
  fontFamily: '"Cascadia Mono", "Geist Mono", "JetBrains Mono", Consolas, monospace',
58
59
  fontSize: baseFontSize,
@@ -92,12 +93,22 @@ export function TerminalView({ terminalId, cliType }) {
92
93
  // syntax-highlighted code). WebGL paints onto a canvas, much smoother
93
94
  // at thousands-of-cells per frame. Falls back to DOM if WebGL is
94
95
  // unavailable (e.g. older GPU, hardware accel disabled).
95
- try {
96
- const webgl = new WebglAddon();
97
- webgl.onContextLoss(() => { try { webgl.dispose(); } catch {} });
98
- term.loadAddon(webgl);
99
- } catch (e) {
100
- console.warn('[ccsm] WebGL addon failed, using DOM renderer:', e);
96
+ //
97
+ // Skipped on phones: @xterm/addon-webgl@0.18.0 miscalculates the glyph
98
+ // atlas at the fractional DPRs that modern Android handsets report
99
+ // (Pixel 6/7/8 = 2.625, S24 = 2.625, etc.) — every cell ends up
100
+ // rendered ~3× wider than the layout grid says it should, blowing out
101
+ // the terminal. Integer DPRs (1, 2, 3 — desktops, iPhones) and the
102
+ // common Windows 1.5 are fine, so the gate is on the mobile viewport
103
+ // breakpoint, not the raw DPR.
104
+ if (!isMobile) {
105
+ try {
106
+ const webgl = new WebglAddon();
107
+ webgl.onContextLoss(() => { try { webgl.dispose(); } catch {} });
108
+ term.loadAddon(webgl);
109
+ } catch (e) {
110
+ console.warn('[ccsm] WebGL addon failed, using DOM renderer:', e);
111
+ }
101
112
  }
102
113
  // Ctrl+C with a selection: by default xterm.js sends \x03 AND the
103
114
  // browser's own copy event fires — so the user gets "selection