Skip to content

Fix live ctlModel command gating and SBO feedback flicker - #1

Merged
masarray merged 3 commits into
mainfrom
fix/control-model-command-ux
Jul 12, 2026
Merged

masarray merged 3 commits into
mainfrom
fix/control-model-command-ux

Conversation

@masarray

Copy link
Copy Markdown
Owner

Audit result

The native engine already reads the IED's live ctlModel. The application bug was in how that evidence reached the row UI:

  • ctlModel=StatusOnly is a valid read-only model, but the Smart Control service rejects opening an executable session for it. ArIED treated that as a generic inspection error and left Open/Close visible because row actions were derived only from the CDC/object name.
  • The SBO engine uses one immutable Select/SBOw → Operate sequence. The apparent Close → Open rollback was a UI race: command verification and the normal report/poll monitor could both write ControlCurrentValue, allowing an older sample to overwrite the newer command observation.

Changes

  • Resolve and retain all five IEC 61850 control models from live model text or native inspection evidence.
  • Gate action visibility from resolved ctlModel; StatusOnly/Unknown become read-only.
  • Downgrade the expected StatusOnly inspection outcome from red error to informational diagnostic.
  • Coalesce command feedback while a command is busy, then publish the final observation atomically.
  • Label SBO execution as SBO Select → Operate or SBOw → Operate in the row result.
  • Add a live validation matrix and root-cause audit document.

Safety

  • No automatic second command/retry was added.
  • No change to Live control armed, interlock, synchrocheck, test mode, or native command sequencing.
  • Enhanced-security CommandTermination behavior remains owned by ARIEC61850.

Validation

GitHub Actions will restore, build Release, and publish the Windows portable package. Live relay validation is documented in CONTROL_MODEL_COMMAND_UX_AUDIT.md, including all ctlModel values 0–4 and the reported SBO case.

@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: 17a4d14479

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


public bool IsRaiseOnlyControl => ContainsControlToken("TapOpR") || ContainsControlToken("Raise");
public bool IsLowerOnlyControl => ContainsControlToken("TapOpL") || ContainsControlToken("Lower");
public bool IsPositionControl => CanExposeControlActions && IsPositionSemanticControl;

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 Refresh unresolved control models before exposing actions

When a command row is discovered with the existing Auto-detect on command or Validate ctlModel on command labels and report/poll feedback has already filled ControlCurrentValue, this unresolved-state fallback still exposes the semantic Open/Close actions. I checked RefreshControlValuesAsync in MainWindow.xaml.cs: the automatic expand refresh only selects rows with ControlCurrentValue == "-" or ControlModelText == "Auto-detect", so those rows are skipped before live ctlModel is inspected. In that context a live ctlModel=StatusOnly object continues to show command buttons until the user forces refresh or clicks a command, bypassing the status-only gating added here.

Useful? React with 👍 / 👎.

@masarray
masarray merged commit df9cec3 into main Jul 12, 2026
1 check passed
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