Shared Monaco dynamic read-only state
Scope: Components/Shared/MonacoEditor.razor plus new ScriptAnalysis/MonacoReadOnlyTests.cs. No JS, dependency, endpoint, script model or caller is changed by this slice. The UNS modal worker owns passing its existing Pending state to ReadOnly and the corresponding native browser acceptance.
ReadOnly was already a public parameter but was supplied only to createEditor. Changing it during an existing editor lifetime left the native editor editable. The component now records the creation value and sends changed values through its existing MonacoBlazor.setEditorOption(id, "readOnly", value) API. The existing JS implementation forwards that option to editor.updateOptions; it is unchanged. The same editor ID is retained, and no setValue/recreation is used to implement the lock. A value changed while createEditor is pending is synchronized when creation completes.
Behavioral verification
red.trx/red.log: two failures, one positive control passed, zero skips. Missing native-option updates reproduced both normal pending/recovery and a pending-state change during delayed creation. Reading the authoritative native draft and reporting ValueChanged while read-only already passed.green.trx/green.log: 29 passed, zero failed/skipped across MonacoReadOnlyTests, MonacoAccessibilityTests, MonacoEditorDisposeTests, MonacoSyncTests, MonacoInteropSourceTests and EquipTokenEditorTests.- The new tests use strict bUnit JS interop to assert the actual emitted create/options/getValue contracts, not source-string declarations. They assert false→true→false updates on the same ID, exactly one creation, no text replacement, no repeated option call on an unrelated rerender, delayed-create synchronization, and authoritative GetValue/ValueChanged preservation.
- Existing blur/sync/oversize/marker/equipment/default/disposal code is untouched. Its focused regression suite is retained; this is not a whole-application or native keyboard acceptance claim.
All tests ran through the mandatory owned-loopback SQL safety runner, including discovery. Private fixture state/credentials were never read or copied into evidence. Isolated repository-anchored artifacts avoid other workers' compilation output. Existing xUnit 3/bUnit 2.7.2 and all package pins are unchanged.
Reproduce from the OtOpcUa repository root using the coordinator-provided private state path:
python3 infra/tools/ui-consistency/with_private_sql.py --state "$OT_PRIVATE_SQL_STATE" -- dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj -c Debug --artifacts-path artifacts/ot13-monaco-readonly --filter 'FullyQualifiedName~MonacoReadOnlyTests|FullyQualifiedName~MonacoAccessibilityTests|FullyQualifiedName~MonacoEditorDisposeTests|FullyQualifiedName~MonacoSyncTests|FullyQualifiedName~MonacoInteropSourceTests|FullyQualifiedName~EquipTokenEditorTests' --logger 'trx;LogFileName=green.trx' --results-directory docs/ui-consistency/evidence/ot13-monaco-readonly
The wrapper's own generation and captured editor reference remain responsible for save target identity. ReadOnly prevents user editing while pending; it does not replace the existing authoritative GetValue read, caller snapshotting or server mutation guards. Chapter-wide native/combined-suite acceptance remains with OT13/OT14. No production services, SQL mutations or host operations were invoked by this slice.