13 KiB
OT13 configuration modal checkpoint
This checkpoint owns exactly five production components: Shared/Drivers/DeviceModal.razor, DriverConfigModal.razor, Shared/Raw/RawTagModal.razor, RawCsvExportModal.razor and Shared/Acls/AclScopePickerModal.razor. It adds Pages/ComplexModalAccessibilityTests.cs and owned evidence/fixture files. Parent additionally authorized the narrow AdminUiSource.cs discovery repair and Raw/RawTagModalMergedConfigTests.cs contract refinement described below.
The existing .NET10/bUnit2.7.2/Theme1.0.1 graph is retained. No production package, service interface, endpoint, model/schema, authorization policy, shared ModalFrame/JS, protocol form, device form, tag editor, picker or caller is edited by this slice. The canary's InMemory package uses the existing central version.
Result by component
| Component | Presentation changes | Preserved behavior |
|---|---|---|
| DeviceModal | Named ModalFrame, Cancel entry, unique device name/enabled/help/error relationships; loading/pending body gating; generation-scoped child callbacks and probe accessor; detached save arguments/row version | DeviceFormMap dispatch, enabled default/update meaning, unknown JSON, original DriverDeviceConfigMerger, parent driver config, Test Connect component and probe semantics |
| DriverConfigModal | Named ModalFrame and safe Cancel; retains the existing unique TechField driver-name association; context/generation keys, child callback guards, captured create/edit scope/JSON/resilience/version/callbacks | DriverConfigFormMap and single-connection guidance, protocol defaults/JSON overlay, resilience payload, save refusal gate/one shared error area |
| RawTagModal | Named form/modal, unique native labels/checkbox/JSON/error/form references; current-generation callbacks, ABA-safe reads, detached update/version; existing name errors integrated with EditContext; visible owned invalid-field focus/recovery | DataTypes array, FormModel fields/defaults/attributes, RawPaths/TagConfigValidator/RawTagRowDefaults rules, immutable RawTagInput construction, native-alarm composition, typed editor dispatch and fail-soft merged-probe resolution |
| RawCsvExportModal | Named modal, Close entry, labelled readonly preview; captured device/group/type for both build and URL; direct retarget/read/disposal guards | Exactly the original bounded preview limit, full row count, group filtering via unchanged builder, file naming, same-origin escaped download URL and unchanged production endpoint policy |
| AclScopePickerModal | Named scoped modal, Cancel entry, semantic tree headings, protected roots/lazy reads/selection/callbacks, pending selection/cancel guard | Exact namespace scope kinds/IDs/labels, cluster-rooted trees, lazy behavior, deliberate selection, typed AclScopeNode payload and parent-owned visibility |
All five add only optional Target to their original public parameter set. Their default identity includes the existing target/scope parameters, so direct A→B replacement also advances the existing presentation/read generation. Unrelated renders retain drafts, caches and expansion. Existing bindings, RawTag model/default/validation declarations, DataTypes choices, namespace header definitions and the original device probe merge are checked in source-guard.json.
Save/selection/close callbacks and mutation arguments are captured for the rendered presentation. Pending mutation/selection remains single-flight through completion; body controls and close actions are disabled. A dispatched operation is neither cancelled nor replayed. After replacement/disposal its result/exception cannot install an old refusal or invoke new presentation callbacks. Read-only loads remain dismissible and stale read/child results are discarded. Callback/service exception behavior for a current target stays with the existing component/route boundary; tests cover the specific late-success/failure/exception cases, not a blanket exception guarantee.
Approved getter contract refinement
The old merged-config test explicitly required a getter retained by tag A's retired child to return tag B's device config after reopening. Parent review identified that as the retargeting gap being repaired. The final assertion is stronger and specific: the current getter remains live while its asynchronous A resolve finishes; a retired getter retains its own immutable last-known A snapshot; a fresh B getter returns B. No getter throws or introduces a new neutral/default protocol config on retirement. Device getters likewise freeze the latest unsaved A merge before replacement/close/disposal. DynamicComponent is keyed by presentation generation and callbacks remain cached within a presentation.
This does not certify old shared pickers' pre-dispatch/disposed-initialization behavior. Root owns the separate six-picker guard gate. Previously dispatched A operations retain A semantics; retired components must also be prevented from starting new requests by that separate gate. No shared picker was edited here.
Validation and native recovery
A real browser check found that the custom RawPath error had a description target but no invalid state. An attempted manual attribute was rejected by framework behavior; InputBase derives this state from its field messages. The existing RawPaths name error is now entered into a local ValidationMessageStore on the existing EditForm context, cleared on name edit/context retirement and unsubscribed on disposal. Required rules and OnValidSubmit remain unchanged. Errors render once through ValidationMessage. The existing fallback JSON Required message is also rendered in its already-linked error region.
The first real200% check then found the invalid Name error above the viewport (top−195/bottom−174 in450px height) while Save retained focus. Current-generation public ElementReference.FocusAsync now moves focus/scroll to the owned invalid Name or fallback JSON control. It does not focus Name for another field's error. Validation happens before write-busy begins, keeping the invalid field focusable. A deferred-focus regression proves an old validation-focus completion cannot unlock a subsequently started save.
Framework references: InputBase validation attributes, public focus/scroll API. Actual installed-runtime checks below are the acceptance evidence.
Tests and source discovery
- Before production edits: 5 valid name/association failures, zero passes. These remain in logs/red.log.
- New ComplexModalAccessibilityTests total 41 cases: repeated-instance names/IDs; nine edit result/exception replacements; three disposal cases; six late read success/failure cases; same-ID tag reopen; three retired/current child callback cases; live/frozen device getter; ACL roots/lazy reads/selection/cancel; CSV retarget; custom/Required invalid state and corrected retry; two create-scope snapshots; fallback JSON field focus; delayed validation-focus/write-busy isolation.
- Final aggregate 233/233 pass, zero skips: the41 new cases plus192 existing cache, merged-config, stale-open, save-refusal, CSV, serialization, map/parity, native-alarm and credential-gate contracts.
contracts-acceptance.trx/ logs/contracts-acceptance.log are final. - Parent-approved AdminUiSource repair locates the checked-out source through compile-time CallerFilePath and still discovers the actual
.slnx; its Read API and assertions remain. Four initial isolated-artifact failures were lookup failures, retained alongside the one explicitly refined getter contract. - Two other legacy serialization tests have their own binary-ancestry lookup. Their assertions/files were retained unchanged; the aggregate used a separate repo-anchored
artifacts/ui-theme-config-modal-testsoutput (contents ignored by existing bin/obj rules), avoiding default output races while retaining native.slnxdiscovery. Initial224/226 lookup failures are retained.
Final command from the repository root (the state is the coordinator's owned private0600 fixture, never a committed credential):
python3 infra/tools/ui-consistency/with_private_sql.py --state "$OT_UI_PRIVATE_SQL_STATE" -- dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj --artifacts-path "$PWD/artifacts/ui-theme-config-modal-tests" --filter 'FullyQualifiedName~ComplexModalAccessibilityTests|FullyQualifiedName~ParameterDictionaryCacheTests|FullyQualifiedName~RawTagModalMergedConfigTests|FullyQualifiedName~ModalStaleOpenGuardTests|FullyQualifiedName~SaveRefusalNoticesTests|FullyQualifiedName~RawCsv|FullyQualifiedName~DriverPageFormSerializationTests|FullyQualifiedName~DriverPageJsonConverterTests|FullyQualifiedName~DriverFormMapParityTests|FullyQualifiedName~TagConfigAuthoringDeployParityTests|FullyQualifiedName~NativeAlarmEditorModelTests|FullyQualifiedName~DriverConfigSaveGateTests' --logger 'trx;LogFileName=contracts-acceptance.trx' --results-directory docs/ui-consistency/evidence/ot13-config-modals
The final aggregate uses the validated owned loopback SQL fixture environment even for test discovery. Earlier filtered runs did not select SQL collections, but the pre-existing SqlServerFact constructor could probe the shared default during discovery; those earlier runs are not claimed SQL-isolated. No SQL collection or operational write was performed by this checkpoint. Full-suite integration is coordinator-owned and not claimed here.
Actual browser evidence
The disposable source-linked fixture registers Razor, an explicitly verified Microsoft.EntityFrameworkCore.InMemory CSV seed, synthetic read/mutation callbacks and operation-refusing probe clients. Its fixture-only target/release endpoints modify only a per-circuit synthetic session. They cannot reach a real SQL/driver/gateway/provider. External browser HTTP hosts are blocked/recorded. Production endpoint authorization is retained by existing metadata tests; the canary download endpoint deliberately exercises only the shared CSV builder over synthetic data.
15 Chromium scenes /627 assertions: five wrappers at1440,390 and real browser200% (720px layout viewport/DPR2). Checks cover resolved modal names, visible safe entry, outside focus denial,12 scoped Tab steps, visible direct-label native focus and descriptions, and actual accessible row/column names for composite resilience fields. Checkbox state is preserved. They also cover idle Escape/return, invalid RawPath/no dispatch, busy body/close/Escape isolation, exactly-one synthetic action with unknown JSON/version retained, current completion/return, and A→B replacement retaining B despite A's late failure. ACL lazy nodes and selection are exercised. CSV preview stays at≤50 lines while the actual full synthetic download contains127 rows; retargeted preview/URL both identify B. No page errors, operational/probe calls or external HTTP requests.
The initial browser harness required a direct label/id for valid composite resilience inputs. It was corrected to verify their actual accessible row/column name; no product workaround or missing-name waiver. logs/browser-direct-label-assumption.log is retained.
Two additional final-source error contexts at390 and real200% cover six invalid states (custom Name, Required Name, Required fallback config), all with native focus on the correct control, fully visible error rectangles, and zero dispatch. Each then recovers with exactly one synthetic save and trigger focus return. name-error-green.json is final; name-error-red.json, the first focus-attempt observations, logs and screenshots retain failures. At200%, final Name errors occupy169–190px and config error340–359px inside the450px viewport. This is native focus/geometry evidence; no assistive-technology certification is claimed.
browser.py and name-error-browser.py import ignitionoee's existing loopback-only real-zoom helper; that explicit harness dependency does not affect production. Shared JS/CSS served bytes are verified against current source in source-guard.json. No CSS is edited by this slice.
Integration boundaries
Primary owns actual caller Target identities, follow-up-message ordering after originating overlay cleanup, and generation checks inside already-dispatched parent refresh/close callbacks. Wrappers cannot retroactively guard an external callback's inner await. Root owns the separate shared-picker guard acceptance. Those gates and remaining wrappers keep OT13 open; this checkpoint is not a whole-task completion claim.
Parent and independent peer review accepted the frozen scoped source/tests/evidence, source hashes,233 tests and native proofs with no blocker. The owned58916 fixture is stopped after the scoped commit; no other agent's fixture or private SQL lifecycle is owned here. No deployment, real issue/key/config write, publication, push or shared ledger change.