Skip to content

Server cards stay disabled (inert) after a connection goes to Error #1521

Closed

Description

@cliffhall

Summary

When a server's connection enters the terminal Error state, the other server cards in the list remain dimmed/inert (their Connect toggles and action buttons stay disabled). The user can no longer interact with any other server without manually disconnecting the errored one (whose toggle still works). They should re-enable automatically.

repro
(prompts-logging in Error; tools-only and full-caps show Disconnected but are greyed out / disabled)

Root cause

ServerCard dims any card whose id differs from activeServer:

// ServerCard.tsx:143
const isDimmed = activeServer !== undefined && activeServer !== id;

activeServer (= activeServerId in App.tsx) is cleared only on the InspectorClient disconnect event:

// App.tsx:889 — resets activeServerId on the "disconnect" event

But a terminal error state does not fire disconnect. The connect-time handshake failure path sets status = "error" and dispatches only statusChange (InspectorClient.ts:1083), and the mid-session onerror-only path dispatches error + statusChange (InspectorClient.ts:486) — neither fires disconnect. So activeServerId stays set and every other card stays inert.

We can't simply clear activeServerId on error: the errored card's "Error" status (and the connected header / connection-info modal) are all keyed off activeServerId, so clearing it would hide the error.

Fix

Dim the other cards only while the active session is live (connecting or connected), not when it's terminal (error / disconnected). The errored card keeps showing its real status; the others re-enable.

Testing

  • Regression test: with connectionStatus === "error" and an activeServer set, the non-active server cards are not aria-disabled/inert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions