claude-code-remote-pilot 0.4.5 → 0.4.7

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.6 — 2026-05-06
4
+
5
+ ### Fixed
6
+ - False `limit` status when a session has recovered from a prior limit hit. Root cause: `LIMIT_RE` was tested against the full 500-line tmux scrollback, so old limit text in scroll history kept re-triggering limit detection even after the session resumed. Now `LIMIT_RE` is checked against only the last 15 non-empty lines (`limitWindow`), matching the same windowed approach used for `RESPONSE_RE` and `RUNNING_RE`.
7
+
8
+ ---
9
+
3
10
  ## 0.4.5 — 2026-05-06
4
11
 
5
12
  ### Added
package/lib/Watcher.js CHANGED
@@ -96,6 +96,7 @@ class Watcher {
96
96
  const text = this._stripAnsi(raw);
97
97
  const nonEmptyLines = text.split('\n').filter(l => l.trim());
98
98
  const recentLines = nonEmptyLines.slice(-5).join('\n');
99
+ const limitWindow = nonEmptyLines.slice(-15).join('\n');
99
100
 
100
101
  // Extract token usage from footer whenever visible
101
102
  const tokenMatch = recentLines.match(TOKEN_RE);
@@ -103,8 +104,8 @@ class Watcher {
103
104
  this.session.tokens = { sent: tokenMatch[1], received: tokenMatch[2] };
104
105
  }
105
106
 
106
- if (LIMIT_RE.test(text)) {
107
- await this._handleLimit(text);
107
+ if (LIMIT_RE.test(limitWindow)) {
108
+ await this._handleLimit(limitWindow);
108
109
  } else if (RESPONSE_RE.test(recentLines)) {
109
110
  if (this.session.status !== 'needs-response') {
110
111
  this.session.status = 'needs-response';
package/lib/ui.html CHANGED
@@ -539,7 +539,8 @@ function SessionDetailScreen({ session, onBack, onKilled }) {
539
539
  } catch {
540
540
  } finally {
541
541
  setSending(false);
542
- inputRef.current?.focus();
542
+ // Defer focus until after React re-enables the input (disabled={sending})
543
+ setTimeout(() => inputRef.current?.focus(), 0);
543
544
  }
544
545
  };
545
546
 
@@ -551,7 +552,7 @@ function SessionDetailScreen({ session, onBack, onKilled }) {
551
552
  body: JSON.stringify({ key }),
552
553
  });
553
554
  } catch {}
554
- inputRef.current?.focus();
555
+ setTimeout(() => inputRef.current?.focus(), 0);
555
556
  };
556
557
 
557
558
  const handleKeyDown = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-remote-pilot",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Interactive Claude Code supervisor — spawn and monitor multiple Claude sessions from a single terminal.",
5
5
  "type": "commonjs",
6
6
  "bin": {