Commit Graph

1388 Commits

Author SHA1 Message Date
Joseph Doherty 9afb2d230e feat(adminui): vendor Monaco + reusable MonacoEditor component (no providers yet) 2026-06-09 14:06:29 -04:00
Joseph Doherty a2dbc5e2da build(adminui): reference Core.Scripting for the script-analysis backend 2026-06-09 13:59:51 -04:00
Joseph Doherty 93aa6c2f81 docs(scripting): implementation plan for Roslyn-backed Monaco script editor
14-task plan: vendor Monaco + reusable MonacoEditor.razor, ScriptAnalysis
backend re-seated on the real evaluator wrapper (ScriptSandbox +
ForbiddenTypeAnalyzer + DependencyExtractor diagnostics), IScriptTagCatalog
path completion, six Monaco providers, ScriptEdit + virtual-tag-modal wire-in,
live docker-dev verification. Co-located .tasks.json for resume.
2026-06-09 13:56:59 -04:00
Joseph Doherty 7a03d01613 docs(scripting): design for Roslyn-backed Monaco script editor
Full IntelliSense parity with scadabridge (completions, hover, signature
help, live diagnostics, formatting, inlay hints, global tag-path
completion), re-seated on OtOpcUa's real script compile context
(ScriptSandbox + VirtualTagContext wrapper + ForbiddenTypeAnalyzer +
DependencyExtractor). Reusable MonacoEditor.razor wired into the
ScriptEdit page and the virtual-tag modal; Monaco vendored locally.
2026-06-09 13:44:20 -04:00
Joseph Doherty e2da662286 docs(claude): note driver-typed tag editors in the /uns TagModal (F-uns-1/2)
v2-ci / build (push) Failing after 37s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
2026-06-09 12:06:45 -04:00
Joseph Doherty fa96989e2a feat(uns): validate typed TagConfig before save (F-uns-2 / #156)
v2-ci / build (push) Failing after 38s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
The per-driver editor models expose Validate() (required-field checks) but the
TagModal never called them, so a blank required field (e.g. S7 address, AbCip
tag path) saved silently and only failed at deploy/connect. Add a
TagConfigValidator registry (DriverType -> model.FromJson(json).Validate(),
parallel to TagConfigEditorMap) and call it in SaveAsync before the service
call — a non-null result sets the modal error and blocks save. Unmapped drivers
(no typed editor) and Modbus (no required field) return null. Editors untouched.

AdminUI.Tests 307/307 (12 new validator tests); build clean.
2026-06-09 11:45:35 -04:00
Joseph Doherty d29e2190a9 fix(uns): reset TagConfig when the operator switches drivers (F-uns-1 integration review)
v2-ci / build (push) Failing after 49s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
2026-06-09 10:00:28 -04:00
Joseph Doherty 8973ecdf7c feat(uns): register S7/AbCip/AbLegacy/TwinCAT/Focas tag editors in the map (F-uns-1 T9) 2026-06-09 09:51:26 -04:00
Joseph Doherty c0afecda50 fix(uns): omit blank optional keys from TagConfig + add omission tests; drop unused ParseInt (T4-T8 review) 2026-06-09 09:49:33 -04:00
Joseph Doherty 75021fa2c9 feat(uns): S7/AbCip/AbLegacy/TwinCAT/Focas typed tag-config editors (F-uns-1 T4-T8) 2026-06-09 09:42:40 -04:00
Joseph Doherty 5990b673cc feat(uns): Modbus typed tag-config editor (F-uns-1 T3) 2026-06-09 09:36:19 -04:00
Joseph Doherty fd9fa75d0e feat(uns): TagConfig JSON helper + editor map + TagModal dispatch scaffold (F-uns-1 T2) 2026-06-09 09:26:50 -04:00
Joseph Doherty d9dbd7917a feat(uns): surface DriverType to the TagModal driver dropdown (F-uns-1 T1) 2026-06-09 09:16:07 -04:00
Joseph Doherty cc53fc8feb docs(plan): implementation plan for driver-typed tag editors (F-uns-1 / #135)
10-task plan: (1) surface DriverType to the TagModal driver dropdown,
(2) shared TagConfigJson util + empty TagConfigEditorMap + DynamicComponent
dispatch scaffold, (3) Modbus editor as the worked example, (4-8) S7/AbCip/
AbLegacy/TwinCAT/Focas editors (parallelizable, disjoint files), (9) register
the five in the map, (10) docker-dev live verify (needs a non-Galaxy driver in
the rig). Each editor = pure FromJson/ToJson/Validate model (unit-tested) + thin
razor shell; preserves unknown JSON keys; driver pages untouched. Co-located
.tasks.json for resume.
2026-06-09 09:11:02 -04:00
Joseph Doherty 913fea7a3c docs(plan): design for driver-typed tag editors in the UNS TagModal (F-uns-1 / #135)
Approved design: 6 new per-driver TagConfig editor components
(Modbus/S7/AbCip/AbLegacy/TwinCAT/Focas) dispatched by the selected driver's
DriverType via a TagConfigEditorMap + DynamicComponent; the 3 unmapped drivers
keep the generic raw-JSON editor; no raw-JSON toggle on typed drivers. Editors
reuse the drivers' enums + JSON property names (not razor markup); driver pages
untouched. Pure FromJson/ToJson/Validate helpers are unit-tested (no bUnit);
live verify needs a non-Galaxy driver added to docker-dev. AdminUI-only, no
data-model change.
2026-06-09 09:03:22 -04:00
Joseph Doherty 157a6571c7 feat(uns): ancestor-aware tree filter on the global UNS page (task #136)
v2-ci / build (push) Failing after 5m21s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
The /uns filter was per-level: it matched only a node's direct children by
DisplayName and only under already-expanded nodes, so typing "blender" at the
top matched nothing — the structural ancestors don't contain the text and
weren't expanded.

Rework UnsTree to the standard tree-filter behaviour:
- A node is shown if it self-matches, sits under a matched ancestor, or has a
  matching descendant (VisibleUnder).
- The path to a match auto-expands (chevron + child block follow a filter-
  derived `childrenShown`, not node.Expanded), and the whole subtree under a
  matched node is shown.
- Lazy tag children are only considered once their equipment is loaded, so the
  filter never triggers lazy loads; the bounded structural tree keeps the
  recursive walk cheap.

Clearing the filter restores the user's manual expand state (node.Expanded is
untouched). Build clean; AdminUI.Tests 216/216.
2026-06-09 08:39:43 -04:00
Joseph Doherty 261419870a fix(docker-dev): make cluster-seed Galaxy Tag insert idempotent on UX_Tag_FolderPath
v2-ci / build (push) Failing after 42s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
The three TestMachine_001 folder-path tag inserts were guarded by TagId, but
the violated constraint is UX_Tag_FolderPath — a unique filtered index on
(DriverInstanceId, FolderPath, Name) WHERE EquipmentId IS NULL. The Galaxy
driver auto-materialises these same folder-path tags at runtime under its own
generated TagIds (nw-mirror-*), so on a re-run the TagId guard found nothing,
the insert fired, and it collided on UX_Tag_FolderPath — cluster-seed exited 1.

Guard each insert on the index's natural key instead, so the row is skipped
whether it came from a prior seed or the driver's runtime mirror.

Verified by re-running cluster-seed against the populated dev volume (which
holds nw-mirror-testmachine_001-testalarm00{1,2,3}): exit 0, no UX_Tag_FolderPath
violation.
2026-06-09 08:29:47 -04:00
Joseph Doherty 9169386eca docs(uns): add operator guide for the global /uns page (task #139)
v2-ci / build (push) Failing after 39s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
- New docs/Uns.md: the global UNS tree (Enterprise/Site read-only groupings,
  editable Area→Line→Equipment→Tag/VirtualTag), navigating/filter, the
  create/edit/delete modals, served-by cluster = UnsArea.ClusterId, tags are
  equipment-bound while Galaxy/SystemPlatform folder-path tags stay on the
  driver page, CSV import, and "changes apply on next Deploy".
- README.md: index row under Operational.
- CLAUDE.md: Testing section now points at /uns + docs/Uns.md.
2026-06-09 08:20:23 -04:00
Joseph Doherty b87d877270 refactor(uns): modal-polish nits on the global UNS page (task #137)
Low-severity review nits, no behaviour change to the happy path:
- CloseModals() now also resets the leftover _*ModalIsNew / parent-id fields
  (area ClusterId, line AreaId, equipment LineId, tag/vtag) for symmetry —
  harmless today (always set before a modal opens) but consistent.
- HandleAddChild / HandleAddVirtualTag / HandleEdit gain a _modalBusy guard
  (try/finally) so a rapid double-action can't race two service loads into the
  same modal state. The switch bodies are re-indented under the try block.
- VirtualTagModal DataType is now an InputSelect over the standard OPC UA type
  list (the same set TagModal uses) instead of free-text InputText.
- RefreshEquipmentChildrenAsync documents that callers own StateHasChanged()
  and the full-reload fallback is spelled out as a block with a comment.

Build clean; AdminUI.Tests 216/216.
2026-06-09 08:18:15 -04:00
Joseph Doherty f19f2ee73b fix(adminui): bind driver-page Error + picker SelectedNodeId as Razor expressions
v2-ci / build (push) Failing after 5m8s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Audit (task #134) found the same Razor literal-binding bug class as the UNS
Filter fix (14b4692): a string-typed component parameter assigned without a
leading @ is a LITERAL, not an expression. Confirmed against the generated
.g.cs (literal "_error" vs TypeCheck<String>(_error)).

- DriverFormShell Error="_error" -> "@_error" on all 9 driver edit pages:
  Error received the constant "_error", so the error banner rendered
  permanently and the real failure message was never shown.
- DriverBrowseTree SelectedNodeId="_tagName"/"_nodeId" -> "@..." in the
  Galaxy and OpcUaClient address pickers: the tree's selected-node highlight
  compared against a literal that never matched a real node.

Build clean; generated code now binds all 11 as TypeCheck<String>(field);
AdminUI.Tests 216/216 green.
2026-06-09 07:39:08 -04:00
Joseph Doherty 14b469291a fix(uns): bind _filter + modal parent-ids as Razor expressions, not literals
v2-ci / build (push) Failing after 40s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
GlobalUns passed string component params without an @ prefix
(Filter="_filter", ClusterId="_areaModalClusterId", etc.). Razor treats a
string-typed component-parameter value without @ as a LITERAL, so UnsTree.Filter
became the literal "_filter" and the modals received literal field-name strings
as their parent ids. The non-empty literal filter matched no node, so the tree
never rendered children beyond the enterprise roots; the modals would have created
children under a bogus cluster/area/line/equipment id.

Add @ to the six string-param bindings. Verified live in docker-dev: the full
Enterprise->Cluster->Area->Line->Equipment tree renders and an area created via the
modal persists with the correct ClusterId (MAIN). No unit test added — this is a
Razor binding issue not reachable without bUnit (not used in this project).
2026-06-08 15:15:46 -04:00
Joseph Doherty 8ba64b1d99 fix(uns): enforce #122 on line reparent across clusters (final review)
v2-ci / build (push) Failing after 4m38s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
2026-06-08 14:12:46 -04:00
Joseph Doherty 1bb7482c3a feat(uns): remove per-cluster UNS/Equipment/Tags + standalone virtual-tag pages
Deletes the 10 Razor pages superseded by the global /uns tree (Tasks 12–16):
ClusterUns, UnsAreaEdit, UnsLineEdit, ClusterEquipment, EquipmentEdit,
ImportEquipment, ClusterTags, TagEdit, VirtualTags, VirtualTagEdit.
No dangling references found; build is clean.
2026-06-08 14:02:32 -04:00
Joseph Doherty 983d30cb15 fix(uns): guard import save + comma-limitation hint + reset-on-open (review) 2026-06-08 14:00:26 -04:00
Joseph Doherty 7db9a24403 feat(uns): equipment CSV import folded into the tree toolbar 2026-06-08 13:56:01 -04:00
Joseph Doherty c0346f14ce feat(uns): tag + virtual-tag modals wired into the tree 2026-06-08 13:47:34 -04:00
Joseph Doherty d637b834b9 fix(uns): reject equipment bind to non-existent driver + modal-xl (review) 2026-06-08 13:38:33 -04:00
Joseph Doherty 2beaa43d60 feat(uns): equipment modal wired into the tree 2026-06-08 13:31:14 -04:00
Joseph Doherty 0abd1d8fc2 fix(uns): delete-confirm reports not-available instead of false success for unwired kinds (review) 2026-06-08 13:25:15 -04:00
Joseph Doherty a4a9dc912a feat(uns): area + line modals wired into the tree 2026-06-08 13:20:25 -04:00
Joseph Doherty 307cec5a3d test(uns): cover no-script + update-duplicate-name virtual-tag guards (review) 2026-06-08 13:15:10 -04:00
Joseph Doherty d8fba02a5e feat(uns): equipment-bound virtual-tag CRUD 2026-06-08 13:11:12 -04:00
Joseph Doherty 77024f87da fix(uns): reject tag create on non-existent equipment + narrow JSON catch (review) 2026-06-08 13:06:45 -04:00
Joseph Doherty 5a392c5db0 feat(uns): equipment-bound tag CRUD with namespace + cluster guards 2026-06-08 13:00:26 -04:00
Joseph Doherty ab0ff8aedf fix(uns): reject driver-bind on unresolvable line + enforce MachineCode uniqueness on update (review) 2026-06-08 12:55:36 -04:00
Joseph Doherty 2836a0704b feat(uns): equipment CRUD with #122 driver-cluster guard 2026-06-08 12:47:19 -04:00
Joseph Doherty 8b1d3de806 feat(uns): add global UNS nav item, drop per-cluster UNS/Equipment/Tags tabs 2026-06-08 12:45:18 -04:00
Joseph Doherty ace366ebcf test(uns): cover #122 allow-when-driver-already-in-target-cluster (review) 2026-06-08 12:42:13 -04:00
Joseph Doherty 4a32edef1a fix(uns): re-entrancy guard + clear stale error + PageTitle on GlobalUns (review) 2026-06-08 12:39:23 -04:00
Joseph Doherty 47b1d2259f feat(uns): area + line CRUD with #122 reassignment guard 2026-06-08 12:35:58 -04:00
Joseph Doherty c9f59e4bd2 feat(uns): GlobalUns page with browsable tree 2026-06-08 12:34:37 -04:00
Joseph Doherty b33cf1c80d feat(uns): lazy per-equipment tag + virtual-tag load
Add LoadEquipmentChildrenAsync to IUnsTreeService and UnsTreeService; returns
Tag nodes (ordered by Name) then VirtualTag nodes (ordered by Name) as leaf
nodes with ChildCount=0, HasLazyChildren=false, keys tag:{id}/vtag:{id}.
2026-06-08 12:29:52 -04:00
Joseph Doherty c264441b74 refactor(uns): clarify service lifetime doc + defensive vtag-count null filter (review) 2026-06-08 12:27:29 -04:00
Joseph Doherty 2c0297c1af fix(uns): @key node rows for stable Blazor diffing (review) 2026-06-08 12:27:19 -04:00
Joseph Doherty cec670f0c8 feat(uns): IUnsTreeService structural load + DI registration 2026-06-08 12:23:00 -04:00
Joseph Doherty 0f286a70b8 feat(uns): recursive UnsTree renderer 2026-06-08 12:21:38 -04:00
Joseph Doherty 3e8941bce4 docs(uns): clarify HasLazyChildren + cluster EntityId, add tie-break test (review I1/I2/M2) 2026-06-08 12:18:37 -04:00
Joseph Doherty d9082e22e3 feat(uns): UnsNode VM + pure tree-assembly helper 2026-06-08 12:14:49 -04:00
Joseph Doherty 944732e500 docs(uns): implementation plan + task graph for global UNS management 2026-06-08 12:11:40 -04:00
Joseph Doherty 3361eac6d8 docs(uns): design for global UNS management tree-table 2026-06-08 12:02:18 -04:00