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:
@@ -457,12 +457,15 @@
|
||||
{
|
||||
_opening = true;
|
||||
_openError = null;
|
||||
// Captured BEFORE the await: a close-then-reopen while this open is in flight leaves Visible true
|
||||
// again, so only the generation tells this open's result apart from the new modal's (review r0 M5).
|
||||
var generation = _openGeneration;
|
||||
StateHasChanged();
|
||||
try
|
||||
{
|
||||
var result = await BrowserService.OpenAsync(_driverType, _mergedConfig, default);
|
||||
// Host disposed or modal closed mid-open: close the session nobody will (R04 L4).
|
||||
if (BrowseOpenGuard.CloseIfOrphaned(result, _disposed || !Visible, BrowserService)) { return; }
|
||||
// Host disposed, modal closed, or modal re-opened mid-open: close the session nobody will (R04 L4).
|
||||
if (BrowseOpenGuard.CloseIfOrphaned(result, _disposed || IsStale(generation), BrowserService)) { return; }
|
||||
if (result.Ok)
|
||||
{
|
||||
_token = result.Token;
|
||||
|
||||
@@ -116,8 +116,10 @@
|
||||
try
|
||||
{
|
||||
_groupFilter = null;
|
||||
// The same builder the download endpoint runs, so the preview matches the file.
|
||||
var export = await RawTagCsvExport.BuildAsync(ExportReader, DeviceId, TagGroupId, DriverType);
|
||||
// The same builder the download endpoint runs, so the preview matches the file — but mapping only
|
||||
// the preview's rows (the header takes the first line), never the whole export (review r0 M8).
|
||||
var export = await RawTagCsvExport.BuildAsync(ExportReader, DeviceId, TagGroupId, DriverType,
|
||||
maxRows: RawTagCsvExport.PreviewLines - 1);
|
||||
if (IsStale(generation)) { return; }
|
||||
if (export is null)
|
||||
{
|
||||
@@ -129,7 +131,8 @@
|
||||
_rowCount = export.RowCount;
|
||||
_fileName = export.FileName;
|
||||
// Only the bounded preview is kept on the component; the full CSV is not held by the circuit.
|
||||
(_preview, _truncated) = RawTagCsvExport.Preview(export.Csv);
|
||||
(_preview, var cut) = RawTagCsvExport.Preview(export.Csv);
|
||||
_truncated = cut || export.RowCount > RawTagCsvExport.PreviewLines - 1;
|
||||
_downloadUrl = RawTagCsvExport.DownloadUrl(DeviceId, TagGroupId, DriverType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user