diff --git a/claude-terminal/CHANGELOG.md b/claude-terminal/CHANGELOG.md index 680f6850..5721aece 100644 --- a/claude-terminal/CHANGELOG.md +++ b/claude-terminal/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.5.12 + +### 🐛 Bug Fix - No "Reload Site?" Prompt +- **Reloading or closing the terminal tab no longer asks "Reload site? Changes that you made may not be saved"**: the prompt came from ttyd, the terminal inside the panel, which warns that leaving ends the running command. Here tmux keeps Claude and your shells running when the tab closes, and reopening it picks up where you left off, so there was nothing to lose +- ttyd now starts with its leave alert turned off (`--client-option disableLeaveAlert=true`) + ## 2.5.10 ### 📚 Documentation - Running More Than One Claude diff --git a/claude-terminal/config.yaml b/claude-terminal/config.yaml index 40431930..4ff9eaa1 100644 --- a/claude-terminal/config.yaml +++ b/claude-terminal/config.yaml @@ -1,7 +1,7 @@ --- name: "Claude Terminal Pro" description: "Enhanced terminal interface for Anthropic's Claude Code CLI with persistent auth, package management, and image paste support. Fork of heytcass/home-assistant-addons" -version: "2.5.10" +version: "2.5.12" slug: "claude_terminal_pro" init: false diff --git a/claude-terminal/run.sh b/claude-terminal/run.sh index b51a42e8..56f94586 100644 --- a/claude-terminal/run.sh +++ b/claude-terminal/run.sh @@ -1179,11 +1179,14 @@ start_web_terminal() { # ttyd attaches every browser connection to the persistent tmux session. # If Claude is running and you close the browser tab, it keeps running. # Reopening the tab re-attaches to the same session. + # So ttyd's own "leave site?" prompt on reload or close is not needed: it + # warns that closing ends the command, which tmux prevents. exec ttyd \ --port "${port}" \ --interface "${interface}" \ --writable \ --ping-interval 30 \ + --client-option disableLeaveAlert=true \ "${TMUX_WRAPPER_PATH:-/usr/local/bin/tmux-claude}" } diff --git a/tests/test-production-run.sh b/tests/test-production-run.sh index a6d31d1d..7ae28952 100755 --- a/tests/test-production-run.sh +++ b/tests/test-production-run.sh @@ -82,6 +82,11 @@ grep -qx "set -as terminal-features ',\*:clipboard'" "$HOME/.tmux.conf" || \ grep -qx 'set -g focus-events on' "$HOME/.tmux.conf" || \ fail "tmux must pass focus events through to Claude Code" +# tmux keeps Claude running when the tab closes, so ttyd must not ask +# "Reload site?" / "Leave site?" on every reload or close. +grep -q -- '--client-option disableLeaveAlert=true' "$repo_root/claude-terminal/run.sh" || \ + fail "ttyd must start with its leave alert turned off" + # The frontend fix has to be reachable from the page that embeds ttyd. clipboard_bridge="$repo_root/claude-terminal/image-service/public/terminal-clipboard.js" terminal_page="$repo_root/claude-terminal/image-service/public/index.html"