From 07b9c7fd7b7ced38210f03af58f2bf824877a756 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Thu, 20 Aug 2026 00:06:20 +0200 Subject: [PATCH] fix(terminal): remove the unreachable copyTerminal(), closing out #322 The last two items of #322: copyTerminal() copied the entire buffer but was wired to no button, shortcut or call site anywhere, and it wrote through navigator.clipboard directly, which is undefined on the plain-HTTP LAN install, so it would have failed there even if it were reachable. Everything that actually copies goes through copyTerminalSelection() and _copyText's execCommand fallback; whole- buffer copy, should anyone want it, is a selectAll() away from that same working path. Closes #322 Co-Authored-By: Claude Fable 5 --- src/web/public/terminal-ui.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/web/public/terminal-ui.js b/src/web/public/terminal-ui.js index 606fc411..ed507935 100644 --- a/src/web/public/terminal-ui.js +++ b/src/web/public/terminal-ui.js @@ -3878,21 +3878,6 @@ Object.assign(CodemanApp.prototype, { return ok; }, - async copyTerminal() { - try { - const buffer = this.terminal.buffer.active; - let text = ''; - for (let i = 0; i < buffer.length; i++) { - const line = buffer.getLine(i); - if (line) text += line.translateToString(true) + '\n'; - } - await navigator.clipboard.writeText(text.replace(/\n+$/, '\n')); - this.showToast('Copied to clipboard', 'success'); - } catch (err) { - this.showToast('Failed to copy', 'error'); - } - }, - _syncMobileHelperTextareaToCursor() { if (!MobileDetection.isTouchDevice() || !this.terminal?.element) return; try {