40 lines
7.5 KiB
Markdown
40 lines
7.5 KiB
Markdown
# OT13 — Scripts read-only Source dialog
|
|
|
|
## Scope and result
|
|
|
|
Production scope is exactly `src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Scripts.razor`. The initial handoff described an editor, but current source contains a **read-only Source disclosure**, confirmed with the primary agent before editing. There is no inline name/notes form, Monaco, build, save or delete here. `ScriptEdit.razor` remains outside this checkpoint and primary-agent inventory ownership; no editor or write operation was invented.
|
|
|
|
The disclosure uses the existing ModalFrame with its original large scrollable geometry, contextual source title, safe initial Close, named keyboard-scrollable source region, loading/missing status and current-error alert. Long unbroken names/IDs wrap using existing Bootstrap text-break. The title and Close stay inside the frame at phone/real-200% widths. Script text remains Razor-encoded literal text, including script-like markup; full source is retained and keyboard-scrollable. Read-only loading deliberately remains closable; closing retires its UI result without cancelling or replaying its database read.
|
|
|
|
Close callbacks capture the displayed generation and script ID. Old footer/header/DOM callbacks cannot dismiss a later presentation, including reopening the same script. Read completion/current errors require that same generation/ID and a live page. IDisposable retires source state; the initial list query also avoids installing rows after disposal. The original list markup, ConfigEditor route policy, SourceHash display, metadata-only list projection, per-open lazy source query and active exception-to-dialog message format remain. Queries, Script entity, source/hash values and persistence behavior are unchanged. No editable-field hint/error IDs are applicable; inventory is in `source-boundaries.json`.
|
|
|
|
## Verification
|
|
|
|
- `red.trx` / `red.log` retain baseline failures for modal semantics, retained Close and pending-page state, alongside five positive controls. The first Close helper required dispatching an extracted raw Action through the component EventCallback so renderer state actually updated (`red-first.log` retained). The first green disposal probe still used rendered-component Dispose; final verification uses the established `DisposeComponentsAsync` to await actual component removal (`green-first.trx/log` retained). The final native probe additionally removes the actual page while a read is pending. These harness corrections are explicit; their initial failures are not presented as additional product defects.
|
|
- `green.trx` / `green.log`: **28/28**, zero skipped — nine new behavioral/authorization-metadata cases and nineteen existing ScriptListQueries, ScriptSourceService and Monaco source/analysis contracts. Tests include same-ID/different-ID reopened Close, pending read success/failure, closable loading, current read failure, temporary missing list and disposal.
|
|
- Every test discovery/execution used the authorized private-SQL environment runner and a separate repo-anchored artifacts directory. Actual selected tests use EF InMemory and no SQL collection cases; the runner also prevents default shared-LAN discovery. No credentials/state files are included.
|
|
- `canary-build.log`: dedicated source-linked fixture builds with zero warnings/errors. It renders the actual Scripts page, real production ScriptListQueries and shared ModalFrame/JS under a synthetic Designer/ConfigEditor guard. Only an owned EF InMemory database is present. Application SaveChanges attempts are refused; startup seed is fixture-owned. Fixture POSTs only release a synthetic delayed factory read or remove the candidate page.
|
|
- `browser-results.json` / `browser.log`: **3 final scenes /51 checks** at desktop 1440px, phone 390px and actual browser 200%. They cover full literal source, contextual names, safe initial Close, Tab scope/outside-focus denial, horizontal/vertical keyboard source scrolling, fixed header/footer bounds, current error/recovery, pending read Close, A→close→B with late A success/failure, and actual page disposal with a held read. All application write-attempt counters stay zero; no page errors/external hosts. This is a bounded Chromium checkpoint, not fleet or production authorization certification.
|
|
- `browser-first.json/log` retain the initial short-title matrix. The long-name confirmation found header Close at x1200 on a 390px viewport; `long-title-red.json/png` records that real defect. Local text-break repairs it without a shared component/CSS change. Final screenshots use whole viewport capture at real tab zoom; screenshots are taken before smooth keyboard scrolling to avoid intermediate paint crops.
|
|
- `source-boundaries.json` verifies exact list markup (excluding additive IDisposable), route/policy/render mode, lazy query calls, current error text, encoded source, original large scrollable geometry and absence of invented editing/mutations. ScriptListQueries and Script entity bytes match baseline `ea5bb6a0bc54844851b2ee6d0a165ebf53479c88`. Source checks supplement actual runtime tests.
|
|
- `runtime-assets.json` records exact served/source shared dialog JS, required final commit `071148e9` / SHA256 `7f63bd6c5181d0b70edc2e87e086fab4dfba96adabd7a19737f9b3b4f18296d5`. No shared JS or Monaco file was edited. An intervening unrelated Hosts mid-edit compile failure is retained in `concurrent-hosts-*`; the final build/test was rerun after its owner froze compilable source.
|
|
|
|
Installed execution SDK: 10.0.403. Existing central versions remain bunit 2.7.2, EF InMemory 10.0.7, Theme 1.0.1; no dependency/framework change is part of this slice.
|
|
|
|
## Reproduction
|
|
|
|
From repository root, with the current authorized owned SQL state path supplied locally:
|
|
|
|
```sh
|
|
python3 infra/tools/ui-consistency/with_private_sql.py --state "$OWNED_SQL_STATE" -- dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj --artifacts-path "$PWD/artifacts/ui-scripts-dialog-tests" --filter 'FullyQualifiedName~ScriptsDialogAccessibilityTests|FullyQualifiedName~ScriptListQueriesTests|FullyQualifiedName~ScriptSourceServiceTests|FullyQualifiedName~MonacoInteropSourceTests' --logger 'trx;LogFileName=green.trx' --results-directory docs/ui-consistency/evidence/ot13-scripts-dialog
|
|
python3 docs/ui-consistency/evidence/ot13-scripts-dialog/check-boundaries.py
|
|
dotnet build docs/ui-consistency/evidence/ot13-scripts-dialog/canary/ScriptsDialogCanary.csproj --artifacts-path "$PWD/artifacts/ui-scripts-dialog-canary"
|
|
dotnet artifacts/ui-scripts-dialog-canary/bin/ScriptsDialogCanary/debug/ScriptsDialogCanary.dll --urls http://127.0.0.1:0
|
|
```
|
|
|
|
Use the reported owned loopback origin with `browser.py`. The existing isolated Chromium extension helper establishes actual 200% (720 CSS pixels / DPR2), never CSS zoom or a user browser profile. Fixture read failures contain only synthetic text. Real ConfigDb/provider/fleet actions and production routing/security are outside this fixture. The existing current-error message format was preserved, not reclassified or generalized into a new error policy.
|
|
|
|
## Limits
|
|
|
|
This does not certify ScriptEdit, Monaco/editor mutation, dirty drafts, database write/reload completion, UTC display (none exist in this disclosure), all app roles or cross-browser behavior. The preserved ConfigEditor route attribute is tested directly; the native fixture uses synthetic claims and an actual policy guard, not a production authentication deployment. OT13/OT14 integration and remaining inline/caller work remain parent/primary ownership. Cleanup of only this fixture is recorded separately after review.
|