diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Hosts.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Hosts.razor index ed5f652b..be387ea8 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Hosts.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Hosts.razor @@ -189,7 +189,7 @@ else @foreach (var d in g.Drivers) { @* Keyed by instance id so the detail row's DriverStatusPanel is never - diffed onto a DIFFERENT driver: the panel resolves DriverInstanceId + diffed onto a DIFFERENT driver: the panel binds DriverInstanceId once in OnInitializedAsync (store subscription + resilience prime), so a reused instance would keep reporting the driver it first bound. *@ @@ -282,8 +282,17 @@ else { @* Full-width detail row beneath its driver. Rendered only while expanded so the table stays scannable and only the opened panels hold store - subscriptions — collapsing disposes the panel and unsubscribes. *@ - + subscriptions — collapsing disposes the panel and unsubscribes. + + Enabled participates in the key on purpose. The panel decides whether to + subscribe ONCE, in OnInitializedAsync (`if (!Enabled) return;`), and has no + OnParametersSet hook — so a live config edit that flips this row's Enabled + (surfaced by the 5 s LoadConfigAsync refresh) would re-render the panel's + "Disabled — not deployed" markup while its two store subscriptions and its + staleness timer stayed wired underneath. Keying on the flag recycles the + component instead: the old instance is disposed (unsubscribing both stores, + draining both timers) and a fresh one mounts against the new value. *@ +