Skip to content

feat: integrate SCL FAT workspace into MainWindow tab - #273

Closed
masarray wants to merge 1 commit into
feat/ied-fascia-connectivity-ledfrom
feat/integrated-fat-tab
Closed

masarray wants to merge 1 commit into
feat/ied-fascia-connectivity-ledfrom
feat/integrated-fat-tab

Conversation

@masarray

@masarray masarray commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add FAT as a seventh MainWindow tab for the currently opened SCL workspace
  • reuse the exact Engineering IED objects, selected device, monitor connection, and live process-image values
  • keep workbook and portable-package launches on the legacy FAT window during the staged migration
  • replace the FAT workspace in-place with the existing native WPF Print Preview, then return without opening another window
  • expose TEST, semantic Signal, IEC reference, Live Value, Value 1, Value 2, Status, and Result in the integrated grid

Semantic phase fix

  • derive the display phase from the first canonical reference that still contains phsA/phsB/phsC/phsAB, prioritizing the live Engineering binding
  • preserve that live binding when creating the report-preview scope
  • expected labels now include A Phs A, A Phs B, Thd Phs A, and PPV Phs AB
  • technical IEC identities are not rewritten

Safety and performance

  • retain the existing live-first evidence gate and report/RCB vs polling acquisition authority
  • lock IED selection while a FAT evidence session is active
  • keep row/column virtualization enabled
  • rebuild Print Preview only on explicit open/refresh or material session evidence changes
  • reuse the virtualized Engineering IED collection and PR feat: replace IED fascia, animate LEDs, and fix FAT signal naming #269 fascia template

Migration

This is intentionally stacked on #269 so its Windows build includes the corrected connection-state lamps. After #269 merges, this PR can target main without changing its FAT workspace behavior.

Validation

  • XAML well-formedness checked for MainWindow, integrated FAT, and fascia resources
  • all new XAML event handlers resolved
  • regression coverage added for seven-tab navigation, SCL-only routing, in-place preview, shared Engineering IED/live bindings, phase context, and preview phase preservation
  • full Windows build/test/package delegated to GitHub Actions

@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: bd034e9e61

ℹ️ 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".

_integratedFatLaunch = launch;
_activeIoTestSessionController = launch.Session;
Interlocked.Exchange(ref _ioTestObservationSequence, DateTime.UtcNow.Ticks);
_runtime.PointUpdated += Runtime_IoTestPointUpdated;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route integrated FAT evidence through the coalesced process image

When an integrated FAT session is running, this subscribes Runtime_IoTestPointUpdated, which forwards raw PointUpdated frames directly into the session controller. The existing physical-relay path explicitly detaches that callback because it runs before Engineering's process image is coalesced, and instead publishes evidence only after the corresponding LIVE rows are committed. Integrated sessions therefore can capture transient Value 1/Value 2 evidence that was never the settled value shown to the operator; use the same coalesced live-first evidence gate as the legacy FAT workspace.

Useful? React with 👍 / 👎.

Comment thread MainWindow.IoTesting.cs
Comment on lines +495 to +497
if (launch.Project.Sources.Count > 0 &&
launch.Project.Sources.All(source =>
source.Kind.Equals(IoFatSourceKinds.Scl, 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.

P1 Badge Keep portable SCL packages on the legacy workspace path

This condition also matches projects restored by OpenPackageAsync whenever their packaged source descriptors are all SCL. That route does not call SynchronizeImportedSclFatWithEngineering, so opening such a portable package in a fresh Engineering window produces an integrated workspace with no matching Engineering IEDs and Session.Start fails because the IED is not loaded. Distinguish direct SCL imports from package launches rather than inferring the launch type solely from Project.Sources.

Useful? React with 👍 / 👎.

_selectionChanged = selectionChanged;
Session.PropertyChanged += Session_PropertyChanged;
DataContext = this;
SelectedEngineeringIed = EngineeringIeds.FirstOrDefault();

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 Preserve the active Engineering IED when constructing FAT

With multiple matching IEDs, assigning the first item here invokes _selectionChanged, which immediately changes MainWindow.SelectedDevice to that first IED. ShowIntegratedFatWorkspace only tries to synchronize the previously selected device after construction, by which time that selection has already been overwritten, so opening FAT while a later IED is active unexpectedly switches both workspaces to the first IED. Initialize from the current Engineering selection or suppress the callback during this default assignment.

Useful? React with 👍 / 👎.

@masarray
masarray force-pushed the feat/integrated-fat-tab branch from bd034e9 to eeb632e Compare September 8, 2026 07:12
@masarray
masarray force-pushed the feat/integrated-fat-tab branch from eeb632e to fecb22d Compare September 8, 2026 07:15

masarray commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Closing as a stale stacked candidate. This branch targets the old #269 fascia branch and predates the field-accepted combined fixes now merged through #274. If the integrated FAT tab is resumed, recreate/rebase it from current main and re-run the full exact-head regression/bench gate so old fascia/FAT state cannot be reintroduced.

@masarray masarray closed this Sep 8, 2026
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