Skip to content

M2B: canonical indexed DataSets with bounded inline DO/DA engineering inspection - #160

Merged
masarray merged 2 commits into
mainfrom
ux/browser-dataset-canonical-hierarchy-m2b
Oct 14, 2026
Merged

masarray merged 2 commits into
mainfrom
ux/browser-dataset-canonical-hierarchy-m2b

Conversation

@masarray

Copy link
Copy Markdown
Owner

Milestone target

Direct follow-up to integrated M2A PR #159 (main 6081df2). Improve the native Qt Workbench DataSets/Data Model engineering workflow toward the supplied IEDScout reference without introducing a second MMS/SCL semantic tree.

Implementation

  • MmsLiveTreeModel: canonical reference index built once and cleared on document lifecycle; nodeForReference now indexed rather than a full 60k-node scan for every visible DataSet row.
  • Parse only explicitly supplied [FC] suffixes, maintaining exact DO/DA identity; FC filtering of expanded canonical DO children.
  • Add dataSetChildrenForReference with hard cap of 64 children per expansion; reference is canonical and no network read is made on navigation.
  • Native BrowserDataSetPane: dense member list, one FC tag, single-click overview selection, in-place expandable DO→DA and actual current-value/unknown display, and lazy payload creation only for the selected expanded member.
  • Clean invalid childCount role usage in Data Model QML.
  • Extend large-model QA and Browser QML source contract.

Engineering-data rules

  • Display — for missing value. Do not fabricate IEC 61850 q, t, validity flags, timestamps, or engineering units.
  • When a DO entry is qualified by [ST], show only child DAs with matching FC; do not pretend unselected attributes belong to that DataSet.
  • Preserve actual selected MMS leaf identity for explicit Read/Control workflows; expansion itself is local-only.
  • Do not change SMV, PTP, ESP32 firmware, or MMS report subscription authority.

Acceptance

  • Native Qt build + QML smoke + Browser source gate + 60k-model QA pass on exact PR head.
  • DataSet entries show a single FC suffix and can expand DO members without rebuilding the entire tree.
  • No crash or incorrect state on DataSet selection/disconnect/reopen.
  • GUI screenshot / Windows physical test needed before declaring full visual parity.

CI discipline

One atomic commit; avoid repeated small pushes and unrelated workflows. Follow-on quality/timestamp bit-level rendering requires typed evidence and is not claimed in M2B-1.

…xpansion

Index canonical DO/DA references during model creation for O(1) average FC-qualified lookup instead of scanning all IED nodes for each DataSet row. Render a dense DataSet member list with single-click selection, exactly one FC tag, lazy bounded (64) inline DO→DA expansion, and no automatic MMS traffic. Show only measured/configured data already in canonical model. Correct Data Model detail role fallback and extend 60k-node + QML contract QA.
Index IEC LD/LN.DO.DA references alongside MMS LD/LN$FC$DO$DA without duplicating canonical nodes. Propagate genuine MMS read-value change notifications into visible DataSet rows and currently expanded FC-matched attributes. Add reference-alias and value authority regressions.
@masarray
masarray marked this pull request as ready for review October 14, 2026 09:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T09:26:24.272185Z d3e31a9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@masarray
masarray merged commit d527c89 into main Oct 14, 2026
2 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: d3e31a9157

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

Comment on lines +143 to +144
readonly property var parts: root.memberParts(modelData)
readonly property var resolved: root.memberNode(parts.reference)

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 FC when resolving whole-DO values

When a whole-DO member is qualified with an FC such as [CF], this call discards parts.fc before resolving the node. nodeForReference consequently returns the DO's generic projection, whose summary selects stVal, mag, or another preferred child without FC filtering; once that child has been read, the row can display an ST/MX value that is not part of the DataSet even though the expanded children are correctly filtered to CF. Resolve the summary using the member FC, or display unknown rather than a value from another constraint.

AGENTS.md reference: AGENTS.md:L304-L307

Useful? React with 👍 / 👎.

Comment on lines +471 to +482
const int limit = std::min(64, maximumChildren);
for (const int nodeIndex : found.value()) {
const auto& object = nodes_.at(nodeIndex);
if (object.kind != NodeKind::dataObject) continue;
result.reserve(std::min(limit, int(object.children.size())));
for (const int child : object.children) {
const auto& attribute = nodes_.at(child);
if (!fc.isEmpty() &&
attribute.functionalConstraint.compare(fc, Qt::CaseInsensitive) != 0)
continue;
result.push_back(nodeMap(child));
if (result.size() >= limit) return result;

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 Report when FCDA expansion is truncated

When a whole-DO member contains more than 64 attributes matching the selected FC, this unconditional limit returns only the first 64 while the QML renders them as a complete expansion and provides no truncation indicator. Valid later attributes are therefore silently hidden from engineering inspection; keep the bound, but return total/truncated metadata and show that the projection is incomplete.

AGENTS.md reference: AGENTS.md:L112-L116

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