From d649bbaf6785d21b15a3faaeb89a90ee4c2058da Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 6 May 2026 17:07:42 -0500 Subject: [PATCH 1/8] docs(fix[widgets/mcp-install]): wrap prehydrate rules in @layer to win cascade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prehydrate " + return "" def _snippet() -> str: From 64f88d997a701149a225c385e54cb89c24815a0e Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 6 May 2026 17:12:18 -0500 Subject: [PATCH 2/8] =?UTF-8?q?docs(refactor[widgets/mcp-install]):=20drop?= =?UTF-8?q?=20updatePanels=20=E2=80=94=20let=20CSS=20drive=20panel=20visib?= =?UTF-8?q?ility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the @layer mcp-install-prehydrate fix, panel visibility is fully driven by attrs and the prehydrate's _panel_active / _PANEL_HIDE_RULE selectors. widget.js no longer needs to mutate the panels' [hidden] attributes after load. Drop updatePanels() entirely. Move the html data-attr writes out of the opts.persist branch in select() so they run on every selection (applySavedState, onBroadcast, onClick, keyboard nav) and reflect the *current* widget state — both kinds, not just the one that changed. This handles the click-before-saved-state case: a user clicking only a method tab without ever choosing a client now still sets both data-mcp-install-client (from the server-default aria-selected) and data-mcp-install-method, so _panel_active can match. Behavioural net: the panels' server-rendered [hidden] state is never mutated post-load. Visibility is one source of truth — the html data-attrs the prehydrate