apply_server_disable_toggle(
self,
server_info: list[MCPServerInfo],
*,
toggled_server: str,
pending_reconnect:| Name | Type | Description |
|---|---|---|
server_info* | list[MCPServerInfo] | |
toggled_server* | str | |
pending_reconnect | bool | None | Default: None |
Patch a single server's row in place after an F2 toggle.
Surgically updates only the affected server's header and tool
rows so unchanged widgets keep their identity — no full
body.remove_children() + remount, which would re-create every
MCPToolItem and reintroduce the on_mount truncation flicker
across the entire list.
Falls back to refresh_server_info when the toggled server
cannot be patched in place: server missing from the new info
list, no existing header widget (e.g., the active filter
currently hides it), or the new state would filter the server
out entirely.
Refreshed server metadata (full list).
Name of the server whose disabled state just changed; identifies which row to patch.
When provided, updates the footer's
reconnect hint. None preserves the existing value.