fix: wire HermesConsoleModal WS into stale-token reload guard
Sibling site missed by PR #54022 — /api/console WebSocket in HermesConsoleModal.tsx has the same buildWsUrl → stale-token → 4401 close path as the PTY and events WebSockets. Without this guard, opening the console after a dashboard restart shows 'Console closed (4401). auth: token_mismatch' with no recovery.
This commit is contained in:
@@ -11,6 +11,7 @@ import { Button } from "@nous-research/ui/ui/components/button";
|
||||
import { useModalBehavior } from "@/hooks/useModalBehavior";
|
||||
import { useProfileScope } from "@/contexts/useProfileScope";
|
||||
import { api } from "@/lib/api";
|
||||
import { maybeReloadForLoopbackWsAuthFailure } from "@/lib/dashboard-auth-reload";
|
||||
import { cn, themedBody } from "@/lib/utils";
|
||||
import { useTheme } from "@/themes";
|
||||
|
||||
@@ -423,6 +424,9 @@ export function HermesConsoleModal({ open, onClose }: HermesConsoleModalProps) {
|
||||
};
|
||||
|
||||
ws.onclose = (ev) => {
|
||||
if (maybeReloadForLoopbackWsAuthFailure(ev.code)) {
|
||||
return;
|
||||
}
|
||||
wsRef.current = null;
|
||||
activeCommandRef.current = false;
|
||||
pendingCommandRef.current = null;
|
||||
|
||||
Reference in New Issue
Block a user