Skip to content

Add per-IED print preview and harden IO FAT reconnect reporting - #124

Merged
masarray merged 5 commits into
mainfrom
agent/io-fat-preview-reconnect-reporting
Jul 29, 2026
Merged

Add per-IED print preview and harden IO FAT reconnect reporting#124
masarray merged 5 commits into
mainfrom
agent/io-fat-preview-reconnect-reporting

Conversation

@masarray

@masarray masarray commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Purpose

Address field feedback in the workbook-driven IO List FAT workspace:

  1. port the ARIEC60870-style report preview into the selected IED workspace
  2. keep preparation progress only on the IED card
  3. prevent stale/late progress callbacks from leaving CONNECTING visible forever
  4. make reconnect explicitly reuse the saved endpoint and discovery model
  5. give static/dynamic Reporting enough time and one controlled rebuild before accepting MMS fallback

Per-IED print preview

  • adds Print Preview to the IO FAT header
  • switches the selected IED workspace between Signals and a WebBrowser report preview
  • follows the selected IED in Explorer
  • refreshes from current evidence and marks active evidence as DRAFT / LIVE
  • supports browser Print and native per-IED PDF export
  • keeps project-wide PDF and .arsas export unchanged

The implementation follows the project-owned ARIEC60870 pattern: standalone HTML is generated from current evidence and rendered with WebBrowser.NavigateToString.

Progress and reconnect

  • removes the main-workspace preparation surface at runtime
  • retains only the card-local progress bar
  • clears stale IsPreparing flags after the true preparation owner completes
  • uses ConnectUsingSavedModelAsync first when endpoint/model cache is available
  • falls back to one full discovery only when cached reconnect fails

Reporting priority

  • static configured RCB/DataSet first
  • temporary dynamic DataSet/URCB for uncovered points
  • bounded MMS fallback last
  • waits for report planning to settle
  • evaluates each imported point's acquisition source
  • rebuilds the report plan once when polling remains and dynamic reporting is allowed
  • reports final report-backed versus fallback counts honestly
  • no process control calls

Automated validation at head 4ef19049357404a34501b45d961ce1b8111241a0

Validate IO List Testing run 40 — success

  • WPF/WebBrowser compilation succeeded
  • complete focused IO FAT regression suite passed
  • per-IED preview/scoping, HTML encoding, native PDF scope, stale progress guard, cached reconnect, report settle/retry, evidence, persistence, Excel, PDF and .arsas contracts passed

Build ARSAS run 788 — success

  • source, website, license, premium UX, protocol and immutable engine invariants passed
  • full solution build and complete application regression suite passed
  • portable Windows x64 publication and artifact upload succeeded

Validate SV evidence bundles run 72 — success

  • Sampled Values evidence workflow remains unaffected

No review threads are open.

@masarray
masarray marked this pull request as ready for review July 29, 2026 08:14
@masarray
masarray merged commit 9140429 into main Jul 29, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ef1904935

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ArgumentNullException.ThrowIfNull(project);
ArgumentNullException.ThrowIfNull(ied);
var created = generatedAt ?? DateTimeOffset.Now;
var enabled = ied.TestPoints.Where(point => point.TestEnabled).ToList();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep preview and exported PDF signal scopes consistent

When an operator disables test points, this filter removes them from both the preview table and its metrics, but ExportSelectedIedPdf_Click passes the original IED to IoFatPdfReportService, whose DrawIedSection iterates every ied.TestPoints entry without checking TestEnabled. The resulting per-IED PDF therefore contains signals that were absent from the print preview and may count them as pending; either preview the complete export scope or filter the scoped project before generating the PDF.

Useful? React with 👍 / 👎.

Comment on lines +350 to +353
private static bool IsReportSource(string source)
=> source.Contains("BRCB", StringComparison.OrdinalIgnoreCase) ||
source.Contains("URCB", StringComparison.OrdinalIgnoreCase) ||
source.Contains("report", StringComparison.OrdinalIgnoreCase);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize the runtime's static and dynamic report labels

For an active RCB whose name is something ordinary such as Events or RP01, the runtime emits CurrentSource as Static: Events or Dynamic: RP01 (NativeIec61850Client.BuildAcquisitionLabel), neither of which matches these tokens. ObserveIoFatAcquisitionAsync consequently treats genuinely report-backed points as unknown, waits the full timeout, and then reports report-backed 0/N; recognize the emitted Static:/Dynamic: acquisition prefixes rather than relying on the vendor-defined RCB name.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant