Skip to content

fix(61284): [Bug]: Dashboard chat sessions fail to render due to recent WebSocket re - #62622

Open
vystartasv wants to merge 1 commit into
NousResearch:mainfrom
vystartasv:fix-61284-bug-dashboard-chat-sessions-fail-to
Open

fix(61284): [Bug]: Dashboard chat sessions fail to render due to recent WebSocket re#62622
vystartasv wants to merge 1 commit into
NousResearch:mainfrom
vystartasv:fix-61284-bug-dashboard-chat-sessions-fail-to

Conversation

@vystartasv

Copy link
Copy Markdown

Fixes #61284

Changes

ui-tui/packages/hermes-ink/src/ink/terminal.ts | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Auto-generated by Hermes Harness — reviewed by AI gate before submission.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Looks good! No obvious issues found (reviewed in read-only mode).


Reviewed by Hermes Agent

@tonydwb

tonydwb commented Jul 11, 2026

Copy link
Copy Markdown

Code Review Summary\n\nLooks good! No obvious issues found (reviewed in read-only mode).\n\n---\nReviewed by Hermes Agent

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P2 Medium — degraded but workaround exists labels Jul 11, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to the #61284 fix cluster. This takes a client-side approach (queue writeDiffToTerminal output behind a ptyReady gate in ui-tui/.../ink/terminal.ts, flush on setPtyReady()), which is a different mechanism from the canonical backend fixes #60745 / #61045 / #61320 (key the keep-alive PTY registry on resume+profile in hermes_cli/web_server.py). Not a duplicate — a competing/complementary layer. Flagging the cluster so a maintainer can decide whether the client-side queue is still needed once the backend readiness handshake lands.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Looks good! No obvious issues found (reviewed in read-only mode).


Reviewed by Hermes Agent

@tonydwb

tonydwb commented Jul 11, 2026

Copy link
Copy Markdown

Code Review Summary\n\nLooks good! No obvious issues found (reviewed in read-only mode).\n\n---\nReviewed by Hermes Agent

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating the dashboard session-switch regression. The current implementation needs rework before it can address the reported path.

Problems

  • setPtyReady() is added in ui-tui/packages/hermes-ink/src/ink/terminal.ts:216, but this PR changes only that file and provides no caller. The new ptyReady flag therefore remains false, causing the added writeDiffToTerminal() branch to queue output indefinitely. writeDiffToTerminal() is the normal render path in ui-tui/packages/hermes-ink/src/ink/ink.tsx:1134, so this is not dashboard-only.
  • Current main’s session-switch problem is in keep-alive identity: web/src/pages/ChatPage.tsx:805 sends an attach token, and hermes_cli/web_server.py:15452 uses that token alone for PTY_REGISTRY.attach_or_spawn(). The registry returns an alive same-key session at hermes_cli/pty_session.py:151-153, regardless of requested resume/profile.

Suggested changes

  • Rework this around the PTY registry key (resume + profile + attach token) and add regression coverage next to tests/test_pty_keepalive_ws.py:7 for same-token connections targeting different sessions/profiles.
  • Avoid adding a shared Ink output gate without a concrete dashboard protocol and a caller that opens it.

Automated hermes-sweeper review.

let ptyReady = false
const pendingDiffs: Array<{ terminal: Terminal; diff: Diff; skipSyncMarkers: boolean; onDrain?: () => void }> = []

export function setPtyReady(): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setPtyReady() has no caller in this one-file PR, so ptyReady stays false and every render is queued by the new writeDiffToTerminal() branch. Because this module is used by normal Ink rendering, this suppresses output beyond the dashboard path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dashboard chat sessions fail to render due to recent WebSocket regression

4 participants