fix(adminui): lane D-b review r0 fixes (I1, M1, M2, M5-M9, N1-N3, N5, H3)

I1: /hosts eviction keyed off the AUTHORED DriverInstances, so a driver
deleted in /raw but not yet deployed - still running, still publishing -
vanished every tick. The stores' sweep is now EvictUnconfiguredStale(set,
olderThanUtc): an entry goes only when unconfigured AND its PublishedUtc is
older than 60 s. Tests cover unconfigured+fresh kept (positive control),
unconfigured+stale evicted, configured+stale kept, and the deploy hand-off.

M1: Test Connect falls back to the driver's documented ProbeTimeoutSeconds
default (Galaxy 30, OpcUaClient 15, ...) when the key is absent.
M2: the budget never undercuts the config's root timeoutMs (+1 s).
M5: RawBrowseModal compares the open generation captured before the await,
so a close-then-reopen mid-open closes the stale session.
M6: /alarms-historian keeps a 30 s re-poll on 'not registered' (a driver
node may still be starting) instead of stopping for good.
M7: /scripts source fetch failure shows in the dialog, not the error boundary.
M8: the export modal maps only its preview rows; the endpoint writes via
Results.Text (no second byte[] copy).
M9: /hosts config queries are ordered, so SequenceEqual change detection holds.
N1 tooltip, N2 CRLF-safe regex, N3 throttled Warning for subscriber faults,
N5 equipment-import help text now describes RFC 4180 quoting.
H3: MonacoEditor documents that themes are page-global.

Refs #745
Claude-Session: https://claude.ai/code/session_01Ub9hGmYLQvn9XETzw7CMsT
This commit is contained in:
Joseph Doherty
2026-10-22 18:21:46 -04:00
parent 01f7e3d62e
commit 0f1f8ad8fa
26 changed files with 411 additions and 102 deletions
@@ -10,8 +10,8 @@ public enum HistorianSinkAvailability
/// <summary>The sink answered; <see cref="HistorianSinkReading.Status"/> is current.</summary>
Available,
/// <summary>This node runs no historian adapter actor (an admin-only node, without the driver role).
/// Not transient: polling again cannot change it.</summary>
/// <summary>This node has no historian adapter actor registered — an admin-only node, or a driver node
/// that has not finished starting. Re-polled slowly (<see cref="HistorianSinkStatusReader.NotRegisteredPollInterval"/>).</summary>
NotOnThisRole,
/// <summary>The actor exists but did not answer (timeout or failure); the last good status, if any, is stale.</summary>
@@ -31,6 +31,18 @@ public sealed record HistorianSinkReading(HistorianSinkAvailability Availability
/// </summary>
public static class HistorianSinkStatusReader
{
/// <summary>The normal poll cadence.</summary>
public static readonly TimeSpan PollInterval = TimeSpan.FromSeconds(5);
/// <summary>The slow re-poll while the actor is not registered (admin-only node, or a driver node mid-startup).</summary>
public static readonly TimeSpan NotRegisteredPollInterval = TimeSpan.FromSeconds(30);
/// <summary>The poll interval after a reading with <paramref name="availability"/>.</summary>
/// <param name="availability">The last reading's availability, or null before the first.</param>
/// <returns>The interval until the next poll.</returns>
public static TimeSpan PollIntervalFor(HistorianSinkAvailability? availability) =>
availability == HistorianSinkAvailability.NotOnThisRole ? NotRegisteredPollInterval : PollInterval;
/// <summary>The per-poll Ask timeout.</summary>
public static readonly TimeSpan AskTimeout = TimeSpan.FromSeconds(2);