fix(dashboard): enable embedded chat by default so the GUI connects - #38907
Closed
teknium1 wants to merge 1 commit into
Closed
fix(dashboard): enable embedded chat by default so the GUI connects#38907teknium1 wants to merge 1 commit into
teknium1 wants to merge 1 commit into
Conversation
Plain `hermes dashboard` minted embedded_chat=False, so the chat WebSocket (/api/ws, /api/pty) closed every upgrade with 4403/4404 before the auth ticket was ever consumed. The desktop GUI's chat connection requires that socket, so it could never connect unless the operator knew to pass --tui. PR #38743 improved the refusal messaging but never flipped the default, so the blocker survived. - main.py: embedded chat is now ON by default. --no-tui (or HERMES_DASHBOARD_TUI=0/false/off) is the explicit opt-out for hardened public binds; --tui / =1 stay as explicit-on and win over a stale =0 env. - web_server.py: start_server(embedded_chat=...) default flipped to True so programmatic callers (desktop app) match the CLI default. - Added --no-tui flag; --tui help updated to note default-on. Validation: 10-case argparse E2E (plain/public->ON, --no-tui/env-off ->OFF, --tui wins over stale =0). tests/hermes_cli/test_web_server.py + test_web_server_host_header.py 238 passed.
Contributor
Author
|
Closing as redundant. PR #38591 (cae6b54, @benbarclay) already merged the complete fix — embedded chat is unconditional and the dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plain
hermes dashboardnow produces a dashboard the GUI can actually connect to — embedded chat is on by default instead of requiring--tui.Root cause:
cmd_dashboardmintedembedded_chat = args.tui or HERMES_DASHBOARD_TUI==1, so with no flag the chat WebSocket (/api/ws,/api/pty) closed every upgrade with 4403/4404 before the auth ticket was ever consumed. The desktop GUI needs that socket, so it could never connect unless the operator knew to pass--tui. PR #38743 improved the refusal messaging (split close codes, log reasons) but never flipped the default — so the connection blocker survived.Changes
hermes_cli/main.py: embedded chat is ON by default.--no-tui(orHERMES_DASHBOARD_TUI=0/false/off) is the explicit opt-out for hardened public binds.--tui/=1remain as explicit-on and win over a stale=0env.hermes_cli/web_server.py:start_server(embedded_chat=...)default flippedFalse → Trueso programmatic callers (desktop app) match the CLI default.--no-tuiarg;--tuihelp updated to note default-on.Security note
The embedded
/chatPTY tab spawns a shell-capable agent. With this change it's reachable by default on any bind that passes the auth gate (ticket/internal credential + host/origin + dashboard basic-auth). Operators who bind0.0.0.0for a hardened deployment and don't want the in-browser shell should pass--no-tuior setHERMES_DASHBOARD_TUI=0.Validation
hermes dashboard(no flag)--host 0.0.0.0, no flag--tui--no-tuiHERMES_DASHBOARD_TUI=0/false/off--tui+ staleHERMES_DASHBOARD_TUI=010-case argparse E2E all pass.
tests/hermes_cli/test_web_server.py+test_web_server_host_header.py: 238 passed (incl.test_rejects_when_embedded_chat_disabled, the explicit-disable path).Infographic