Accept interaction convergence and record split package rollout

This commit is contained in:
Joseph Doherty
2026-11-13 19:50:51 -05:00
parent 3c1eada677
commit 6dc8b003ba
8 changed files with 110 additions and 13 deletions
@@ -0,0 +1,34 @@
# G2 common interaction acceptance and extraction decision
Status: interaction recipe verified across ScadaBridge managed overlays, ignitionoee registry native dialogs, and the MX/OEE router native pilots; retain validated app-local adapters for this release. Theme1.0.1 remains the common visual authority. No new package/API is introduced by this decision.
| Contract | MXAccess pilot | ignitionoee second pilot |
|---|---|---|
| Native modal lifecycle | `260d58af`, `docs/ui-validation/technical-light-dialogs.md` | `fb192405`, `docs/ui-validation/technical-light-family.md` |
| Open/close, inert background, safe initial focus, native Tab/Escape | Actual four-viewport/browser proof; native browser chrome distinguished from document focus | Actual15/22/8 loaded-editor interaction cases |
| Single active presentation, generation guards, pending cancel, disposal/import race | Deferred-import/lifecycle browser checks;343 dashboard tests | Same lifecycle contract adapted to17 modal instances/15 callers;1705 UI tests after follow-up |
| Busy operation ownership | Caller owns operation and typed fields, JS owns DOM only | `ecf1380d`: disabled body fieldset plus detached submission snapshot before authorization await; three actual busy viewport cases |
| Validation/recovery | Existing API-key validation remains visible outside long scroll body | Caller validation/footer remain outside disabled body; safe return focus |
Native Tab uses the browser's top layer. Browser chrome may receive focus; while the document has focus, focus must remain in the dialog. The MX/OEE router adapters do not add a custom Tab trap. This statement does not apply to the registry or ScadaBridge managed overlay. A rendered busy marker is reinforced by caller single-flight guards; no DOM helper invokes operations or receives secret values.
## Master-plan comparison: ScadaBridge and registry
| Responsibility | ScadaBridge managed overlay | ignitionoee registry native dialog |
|---|---|---|
| Presentation | App-owned `DialogHost.razor`/drawer with named modal roles; actual `dialog.js` activates the presentation | Actual `registry/src/Registry.Host/wwwroot/driverCatalog.js` calls native `showModal` |
| Keyboard/background | Synchronous app Tab boundary handling and ancestor-sibling inert locks; typed Escape cancellation | Native top-layer modal **plus existing explicit Tab boundary wrap**; Escape routes to `DismissEditor` |
| Initial/return focus | Caller initial selector; connected-trigger focus checked for actual success, then temporary-tabindex heading/main fallback | Caller initial focus; connected-trigger/fallback restoration, without the same verified disabled/unfocusable-target fallback contract |
| Lifetime/body state | Per-overlay state, single-active guard, previous inert/body-lock restoration, detached-node observer | App-owned body-overflow restoration and native close lifecycle |
| Domain state | Existing typed Confirm=false, Prompt=null/custom cancellation and DialogService resolution | Driver draft, revision guards and registry busy bridge remain local |
| Actual acceptance | `87c882ec` plus final `d370dbd3`: native focus/cleanup regressions, full1597 tests, final actual-component integration/preferences | `RegistryWorkflowsTests.Driver_catalog_filters_and_modal_preserve_drafts_focus_and_revision_guards`: actual `:modal`, Name focus, Escape/return, stale revision/draft recovery, safe fixture save/390px bounds; registry11 tests and13 width/zoom cases |
The registry author independently reviewed this comparison against current source and recorded runtime evidence. Do not describe all four implementations as interchangeable native lifecycle adapters. Shared requirements are naming, safe initial focus, managed background interaction, cancellation, cleanup, honest busy/outcome behavior and preserved domain state; presentation and focus-restoration implementations currently differ.
## Decision
The common **behavior recipe** is stable; the tested **public component ownership** differs. MX takes caller-owned title/description IDs, sizing classes and complete child chrome. OEE generates a title ID, owns the initial-focus heading/body/disabled fieldset, and separates its footer. The second pilot exposed an important caller requirement: native modal busy state alone does not freeze editable data or protect post-await writes. Those submissions now use detached snapshots and real authorization checks in their own domain code. Secrets also requires target-specific reveal/mutation isolation rather than a generic editor contract.
Retain these tested local adapters and the existing Theme recipe. Extracting only the apparently similar markup now would either discard these tested contracts or add options before another caller has established their required combinations. Keep the shared package free of domain state/services. A later extraction must be a separate reviewed change/release with two-host lifecycle and busy-submission tests before caller migration; it is not silently bundled into this visual rollout. Existing local adapters remain covered by their project tests and browser fixtures.
This closes G2's two-consumer interaction and explicit extraction-decision requirement. It does not close G3, remaining project tasks, or deployment acceptance. Filter/table conventions are also exercised in the completed Overview and ScadaBridge batches; their data/DTO ownership remains local and is not replaced by speculative shared filtering state.
@@ -0,0 +1,28 @@
# Independent ScadaBridge SB01–03 peer review
Reviewed 2026-11-13 against the actual sister checkout based on cdd3adf6, with SB01–03 changes pending at review time. Read-only source review plus one narrowly scoped native Chromium focus probe; no sister source/test edits, broad suite rerun, operations endpoints or deployment.
## Concrete finding
**P2 — Connected does not guarantee a usable focus restoration target.** `src/ZB.MOM.WW.ScadaBridge.CentralUI/wwwroot/js/dialog.js:33` enters its trigger branch whenever the captured element remains connected and outside inert ancestry. A disabled, hidden or otherwise nonfocusable trigger meets those checks; `.focus()` silently fails, and the heading fallback never executes. Removing the closed overlay then leaves focus on BODY, interrupting keyboard position.
Reproduced with the unchanged actual script in a disposable Chromium document: focus a native trigger button → activate the overlay → disable the still-connected trigger → remove the overlay → await the script's MutationObserver. Observed `active=BODY`, heading tabindex absent, modal-open=false, inert count0. This is a native lifecycle reproduction, not a claim that a specific live fleet route disables its trigger during dismissal.
Recommendation: after attempting trigger focus, verify `document.activeElement === trigger`; otherwise use the existing logical heading/main fallback. Filtering disabled/hidden targets is useful, but verifying actual focus also covers programmatically captured nonfocusable headings. Add a focused regression for disabled/hidden connected triggers alongside disconnected-trigger coverage. Retain current typed cancellation, single-active-overlay guard, lock cleanup and deferred temporary-tabindex removal.
## Reviewed behavior without an additional finding
- DialogHost uses per-instance IDs for overlay/title/prompt and confirmation description; prompt label targets the actual input. It preserves Confirm=false, Prompt=null and custom typed default cancellation through DialogService.Resolve; disposal unsubscribes before cancelling any pending local result. The original service second-dialog guard remains.
- The actual DOM keydown listener owns synchronous Tab prevention; native-event filtering excludes disabled, hidden/inert and negative-tabindex controls. Escape's typed cancellation stays in Blazor. Single-active presentation rejection prevents sibling/descendant modal lifecycle ambiguity. Detached-node observer cleanup restores prior inert/body-lock state. Drawer routes rejection/Escape through its existing OnClose callback and deactivates on disposal.
- Sampled OPC UA and Mx Gateway field/error changes preserve the original EntityName exact/suffix matching logic. Conditional invalidity/describedby and rendered error ID use the same helper/key. Newly added text/number/select IDs are per-component-instance scopes. Existing primary/backup checkbox IdPrefix callers remain explicitly distinct in DataConnectionForm. No sampled field was newly assigned an unrelated validation error or bypassed a validator.
- MultiSelect toggle name combines the visible field ID and its unique current-summary ID. Its individual checkboxes retain wrapping labels. DataTable's new visible search label targets its instance ID rather than relying on placeholder text.
## SB03 acceptance boundary
The batch report correctly leaves SB03 incomplete. Source associations are evidence of intended relationships, not proof of the rendered accessibility tree or control internals. TreeView currently names every checkbox “Select tree item” (`Components/Shared/TreeView.razor:114`); contextual tree names are an already documented pending item. Sampled repeated SchemaBuilder property names/types are also generic; native/editor/group context and Monaco internals require their promised rendered checks. Help descriptions, aggregate errors, repeated editor IDs and transport/notification/instance runtime samples remain under the author's explicit pending verification.
No new contradictory SB03 completion claim was found in the reviewed report. Do not infer all30+ component runtime acceptance from source-group JSON, regex counts or the passing full suite. This review makes no shared ledger/gate change. Address the concrete focus-target finding before lifecycle acceptance; the remaining known SB03 work stays open.
## Resolution checkpoint
The original disabled/hidden connected-trigger finding was corrected in the accepted SB01–02 batch `87c882ec`: current `dialog.js` checks whether trigger focus actually succeeded and otherwise uses the existing heading/main fallback. Focus cleanup/lifecycle regressions and rendered browser proofs were accepted. The originally pending SB03 work subsequently passed scoped composite labels, native editor/Monaco/contextual tree and help/error checks (`915a8a59` plus `102cbb2e`). This historical review's incomplete status describes its original checkpoint, not the final chapter; final chapter acceptance is `d370dbd3`,1597 tests, with explicit representative-runtime/deployment limits in the sister verification report.