claude-code-remote-pilot 0.5.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1 — 2026-05-06
4
+
5
+ ### Fixed
6
+ - **Terminal always "Connecting…"**: two root causes patched:
7
+ 1. `Cache-Control: no-store` added to all API responses — browsers were heuristic-caching the first (sometimes empty) output response and serving stale data on every subsequent poll.
8
+ 2. `ansiToHtml` is now pre-computed before the JSX return with a try-catch — any parsing edge case falls back to ANSI-stripped plain text instead of silently breaking the render.
9
+ - **Poll errors are now logged** to the browser console (`[ccp] output poll error:`) instead of silently swallowed, so future issues are diagnosable.
10
+ - Added `cache: 'no-store'` to the `fetch` call in the output poll (belt-and-suspenders alongside the server header).
11
+
12
+ ---
13
+
3
14
  ## 0.5.0 — 2026-05-06
4
15
 
5
16
  ### Added
package/lib/WebServer.js CHANGED
@@ -38,7 +38,7 @@ class WebServer {
38
38
  }
39
39
 
40
40
  _json(res, code, data) {
41
- res.writeHead(code, { 'Content-Type': 'application/json' });
41
+ res.writeHead(code, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' });
42
42
  res.end(JSON.stringify(data));
43
43
  }
44
44
 
package/lib/ui.html CHANGED
@@ -601,10 +601,10 @@ function SessionDetailScreen({ session, onBack, onKilled }) {
601
601
  useEffect(() => {
602
602
  if (isOffline) return;
603
603
  const poll = () => {
604
- apiFetch(`/api/sessions/${encodeURIComponent(session.name)}/output`)
604
+ apiFetch(`/api/sessions/${encodeURIComponent(session.name)}/output`, { cache: 'no-store' })
605
605
  .then(r => r.json())
606
606
  .then(d => setOutput(d.output || ''))
607
- .catch(() => {});
607
+ .catch(e => { if (e && e.message !== 'Unauthorized') console.error('[ccp] output poll error:', e); });
608
608
  };
609
609
  poll();
610
610
  const t = setInterval(poll, 2000);
@@ -660,6 +660,17 @@ function SessionDetailScreen({ session, onBack, onKilled }) {
660
660
  }
661
661
  };
662
662
 
663
+ // Render terminal HTML (ANSI → HTML, with plain-text fallback)
664
+ let _termHtml = '';
665
+ if (output) {
666
+ try {
667
+ _termHtml = ansiToHtml(output);
668
+ } catch(e) {
669
+ console.error('[ccp] ansiToHtml error:', e);
670
+ _termHtml = output.replace(/\x1b\[[0-9;]*m/g,'').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
671
+ }
672
+ }
673
+
663
674
  // Terminal height: fill viewport minus chrome
664
675
  const terminalStyle = {
665
676
  height: 'calc(100vh - 210px)',
@@ -708,8 +719,8 @@ function SessionDetailScreen({ session, onBack, onKilled }) {
708
719
  dangerouslySetInnerHTML={{ __html:
709
720
  isOffline
710
721
  ? '<span style="color:oklch(50% 0.018 50)">Session is offline — no output available.</span>'
711
- : output
712
- ? ansiToHtml(output) + '<span style="opacity:0.4">▊</span>'
722
+ : _termHtml
723
+ ? _termHtml + '<span style="opacity:0.4">▊</span>'
713
724
  : '<span style="color:oklch(50% 0.018 50)">Connecting…</span>'
714
725
  }}
715
726
  />
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "claude-code-remote-pilot",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Interactive Claude Code supervisor — spawn and monitor multiple Claude sessions from a single terminal.",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/mekku/claude-code-remote-pilot.git"
8
+ "url": "git+https://github.com/mekku/claude-code-remote-pilot.git"
9
9
  },
10
10
  "homepage": "https://github.com/mekku/claude-code-remote-pilot#readme",
11
11
  "bugs": {