From 3a5ab330b71628b3cc74c3cc473b892c160cfde5 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 22 Feb 2026 05:45:04 +0100 Subject: [PATCH] chore: bump version to 0.1594 --- CLAUDE.md | 2 +- package.json | 2 +- src/web/public/app.js | 65 ++++++++++++++++++++++++++++++++++----- src/web/public/index.html | 6 ++-- 4 files changed, 63 insertions(+), 12 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a634af0c..5a2ac50a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,7 +35,7 @@ When user says "COM": 1. Increment version in BOTH `package.json` AND `CLAUDE.md` (verify they match with `grep version package.json && grep Version CLAUDE.md`) 2. Run: `git add -A && git commit -m "chore: bump version to X.XXXX" && git push && npm run build && systemctl --user restart claudeman-web` -**Version**: 0.1593 (must match `package.json` for npm publish) +**Version**: 0.1594 (must match `package.json` for npm publish) ## Project Overview diff --git a/package.json b/package.json index 3ecfa056..f29fe4db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claudeman", - "version": "0.1593", + "version": "0.1594", "description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence", "type": "module", "main": "dist/index.js", diff --git a/src/web/public/app.js b/src/web/public/app.js index 8933480d..e2ec5192 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -955,7 +955,33 @@ class LocalEchoOverlay { return null; } + // Auto-detect text already on the prompt line in the terminal buffer. + // Called on first keystroke when overlay is empty (pendingText='' and + // flushedOffset=0). Handles Tab completion, arrow-key edits, and any + // other case where the PTY has prompt text the overlay doesn't know about. + // Without this, the overlay's opaque background covers the canvas text. + _detectBufferText() { + try { + const prompt = this._findPrompt(); + if (!prompt) return; + const buf = this.terminal.buffer.active; + const absRow = buf.viewportY + prompt.row; + const line = buf.getLine(absRow); + if (!line) return; + const lineText = line.translateToString(true); + const textStart = prompt.col + 2; // after "❯ " + const afterPrompt = lineText.slice(textStart).trimEnd(); + if (afterPrompt.length > 0) { + this._flushedOffset = afterPrompt.length; + this._flushedText = afterPrompt; + this._lastPromptPos = prompt; + } + } catch {} + } + addChar(char) { + // On first keystroke after overlay was empty, detect existing buffer text + if (!this.pendingText && !this._flushedOffset) this._detectBufferText(); this.pendingText += char; this._persist(); this._render(); @@ -981,6 +1007,7 @@ class LocalEchoOverlay { appendText(text) { if (!text) return; + if (!this.pendingText && !this._flushedOffset) this._detectBufferText(); this.pendingText += text; this._persist(); this._render(); @@ -2227,8 +2254,29 @@ class ClaudemanApp { } this._pendingInput += data; flushInput(); + } else if (this._localEchoOverlay) { + // No pending or flushed text — try detecting buffer text first + // (handles Tab completion, arrow edits, etc.) + this._localEchoOverlay._detectBufferText(); + if (this._localEchoOverlay._flushedOffset > 0) { + // Found buffer text — delete last char + this._localEchoOverlay._flushedOffset--; + if (this._localEchoOverlay._flushedText) { + this._localEchoOverlay._flushedText = this._localEchoOverlay._flushedText.slice(0, -1); + } + this._localEchoOverlay._lastRenderKey = ''; + if (this._localEchoOverlay._flushedOffset > 0) { + this._localEchoOverlay._render(); + } else { + this._localEchoOverlay._lastPromptPos = null; + this._localEchoOverlay.overlay.innerHTML = ''; + this._localEchoOverlay.overlay.style.display = 'none'; + } + this._pendingInput += data; + flushInput(); + } + // else: truly nothing to delete — swallow the backspace } - // else: nothing to delete — swallow the backspace return; } if (/^[\r\n]+$/.test(data)) { @@ -4789,16 +4837,19 @@ class ClaudemanApp { // the PTY echo arrives in the terminal buffer. if (this.activeSessionId) { const echoText = this._localEchoOverlay?.pendingText || ''; + // Include buffer-detected flushed text (from Tab completion, etc.) + // so it's preserved across tab switches. + const existingFlushed = this._localEchoOverlay?._flushedOffset || 0; + const existingFlushedText = this._localEchoOverlay?._flushedText || ''; if (echoText) { this._sendInputAsync(this.activeSessionId, echoText); - // Store flushed length AND text PER SESSION so it's available when switching back. - // The text is needed because the terminal buffer may be stale after async reload. + } + const totalOffset = existingFlushed + echoText.length; + if (totalOffset > 0) { if (!this._flushedOffsets) this._flushedOffsets = new Map(); if (!this._flushedTexts) this._flushedTexts = new Map(); - const prev = this._flushedOffsets.get(this.activeSessionId) || 0; - const prevText = this._flushedTexts.get(this.activeSessionId) || ''; - this._flushedOffsets.set(this.activeSessionId, prev + echoText.length); - this._flushedTexts.set(this.activeSessionId, prevText + echoText); + this._flushedOffsets.set(this.activeSessionId, totalOffset); + this._flushedTexts.set(this.activeSessionId, existingFlushedText + echoText); } } this._localEchoOverlay?.clear(); diff --git a/src/web/public/index.html b/src/web/public/index.html index eaedc7b6..c65a1407 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -8,8 +8,8 @@ Claudeman - - + + @@ -1559,6 +1559,6 @@ - +