Skip to content

Stop ttyd asking "Reload site?" on reload or close (2.5.12) - #97

Open
nsleigh wants to merge 1 commit into
ESJavadex:mainfrom
nsleigh:fix/ttyd-leave-alert
Open

nsleigh wants to merge 1 commit into
ESJavadex:mainfrom
nsleigh:fix/ttyd-leave-alert

Conversation

@nsleigh

@nsleigh nsleigh commented Nov 27, 2026

Copy link
Copy Markdown

Summary

In Chrome, reloading or closing the terminal tab now asks "Reload site? Changes that you made may not be saved." (or "Leave site?"). The prompt comes from ttyd's frontend. While the terminal is connected, it warns that leaving ends the running command.

In this add-on that isn't true. ttyd attaches every connection to the persistent tmux session, so Claude and any shells keep running when the tab closes, and reopening the panel picks up where you left off. The prompt only gets in the way.

Chrome only shows the prompt after you have typed or clicked in the page, which may be why it hasn't been noticed before.

Tested

  • tests/run-tests.sh passes in an Alpine 3.24 container with ttyd 1.7.7
  • On a Home Assistant dev install, Mac Chrome: no "Reload site?" or "Leave site?" prompt on reload or close any more

🤖 Generated with Claude Code

ttyd's frontend warns before the tab is reloaded or closed, because
leaving would end the command. Here tmux keeps Claude and the shells
running and the panel re-attaches on reopen, so the prompt only gets in
the way. Start ttyd with --client-option disableLeaveAlert=true and
check for it in the production run test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant