|
| 1 | +# E2E control-channel port |
| 2 | + |
| 3 | +Status: in progress — Environment, Scenario Info, Map editor fields, and the |
| 4 | +non-gesture setup in brush/state scenarios are now control-driven. |
| 5 | + |
| 6 | +The control channel should replace X11 in every domain-editor scenario that is |
| 7 | +setting editor state, running an editor feature, asserting emitted commands, or |
| 8 | +positioning the camera for a capture. Domain-editor scenarios do not test their |
| 9 | +own widget interaction. X11 remains the authority for the separate UI suite: |
| 10 | +input routing, hit testing, hover, text editing, drag/stroke behaviour, and |
| 11 | +dialog/widget layout. |
| 12 | + |
| 13 | +Scenarios share a resettable Spring process with compatible launch environments |
| 14 | +by default. Scenarios that change the project or require a fresh filesystem |
| 15 | +opt into `@scenario(isolated=True)` and get their own process. |
| 16 | + |
| 17 | +## Current API |
| 18 | + |
| 19 | +Available now: typed editor `open`/`get`/`set`, typed registered-command |
| 20 | +execution, camera `get`/`set`/`zoom`, ordered captures, and a reset boundary that |
| 21 | +undoes native history before reloading native modules. This already removes |
| 22 | +coordinates and waits from semantic editor tests. |
| 23 | + |
| 24 | +Asset fields currently travel as schema text; a semantic, validated asset value |
| 25 | +is not available yet. Editor action buttons, object create/select/place |
| 26 | +operations, project/file-dialog operations, and synthetic in-engine input are |
| 27 | +also not available. Those boundaries determine the partial and blocked rows |
| 28 | +below. |
| 29 | + |
| 30 | +## Proposed migration order |
| 31 | + |
| 32 | +| Status | Scenarios | Plan | |
| 33 | +| --- | --- | --- | |
| 34 | +| Done | `lighting`, `sky`, `water`, `info-panel`, `map-editors` | Domain fields and emitted commands use control only. | |
| 35 | +| Partial | `heightmap`, `texture-paint`, `metal-paint`, `grass-paint` | Scalar/editor setup uses control; the actual stroke, asset-grid choice, action selection, or project dialog remains X11. | |
| 36 | +| UI / blocked | `teams-panel`, `settings-panel` | Teams needs typed add/select/edit handles before it can become a domain test. Settings owns the shading-dialog interaction contract. | |
| 37 | +| Second batch | `props-panel`, `collision`, `units-panel`, `feature-placement-actions`, `brush-size`, `project-workflows`, `map-workflows` | Convert the domain state/command portion once object/project helpers exist. Move the remaining input setup out to focused UI coverage. | |
| 38 | +| Camera-only cleanup | `pattern-preview`, `texture-paint`, `metal-paint`, `grass-paint`, `cursortip`, `deselect`, `rotation`, `selection-drag`, `object-actions`, `selection`, `clipboard-actions` | Done: deterministic framing uses `camera.zoom`; no domain scenario uses mouse-wheel camera zoom. A dedicated camera-wheel test is intentionally out of scope for now. | |
| 39 | +| Keep X11 | `terrain-stationary-hold`, `heightmap`, all `chonsole-*`, `module-reload`, `developer-console`, `developer-console-copy`, `gallery`, `gallery-pickers`, `gallery-tooltips`, `gallery-dialogs`, `main-panel`, `hide-interface`, `all-editors`, `panel-tabs-are-choices`, `import-action`, `dialogs`, `project-status-bar`, `notifications`, `export-warning`, `ui-sweep`, `def-grid`, `feature-grid-tooltip-after-cursortip` | These explicitly test keyboard focus, pointer routing, held strokes, hover, clicking a control, modal layout, or rendering. Replacing their core interaction would stop testing what they exist to test. | |
| 40 | + |
| 41 | +The former water UI scenario's terrain-basin stroke and `/water 4` input belong in focused |
| 42 | +stroke/console tests, not in the water domain test. `map_export` and |
| 43 | +`map_roundtrip` remain blocked until a project API is deliberately designed. |
| 44 | + |
| 45 | +## Focused UI suite |
| 46 | + |
| 47 | +The retained X11 scenarios should become a compact, cross-cutting UI suite: |
| 48 | +one test per widget/interaction contract, not one copy per domain editor. The |
| 49 | +existing gallery, picker, tooltip, dialog, Chonsole, input-state, toolbar, and |
| 50 | +visual-sweep scenarios are its nucleus. When a domain scenario gives up a |
| 51 | +click/drag/picker assertion, move that coverage here only if no existing UI |
| 52 | +scenario already covers the same generic contract. `field_modal_handoff` is |
| 53 | +the first such extraction: it covers modal-binding cleanup across editors |
| 54 | +without being presented as Scenario Info coverage. |
| 55 | + |
| 56 | +## API additions worth designing before the second batch |
| 57 | + |
| 58 | +1. Typed asset fields: an `AssetPath`/asset-reference value accepted by |
| 59 | + `Editor.set`, validated against the live field schema. |
| 60 | +2. Typed editor actions: invoke a named registered editor action through the |
| 61 | + same behaviour path as a button, with schema discovery and no raw strings. |
| 62 | +3. Object domain handles: create, select, inspect, and mutate objects without |
| 63 | + pretending those operations are generic editor fields. |
| 64 | +4. Project domain handles: create/save/load/export by typed request. Do not |
| 65 | + expose file-dialog clicks as an API. |
| 66 | + |
| 67 | +Do not add `input.*` merely to avoid X11 in the retained scenarios. Its job is |
| 68 | +to test the native input state machine and belongs only where pointer/keyboard |
| 69 | +semantics are themselves under test. |
| 70 | + |
| 71 | +## Progress |
| 72 | + |
| 73 | +| Batch | Status | Notes | |
| 74 | +| --- | --- | --- | |
| 75 | +| Environment | done | `lighting`, `sky`, and `water` now cover their editor domain state. | |
| 76 | +| Scenario Info | done | `info-panel` now sets and reads metadata through control. | |
| 77 | +| Map editor fields | done | `map-editors` covers terrain, texture, metal, grass, and rendering fields through control. | |
| 78 | +| Brush/state setup | partial | Scalar setup is control-driven; pointer gestures and picker/action contracts remain X11. | |
| 79 | +| Focused UI suite | existing, to consolidate | Own generic editor/widget interaction coverage. | |
| 80 | +| Team domain | blocked | Needs typed add/select/edit API; keep its current test explicitly UI until then. | |
| 81 | +| API additions | proposed | Design only when the second batch is reached. | |
| 82 | +| Second batch | blocked | Depends on typed object/project/action support. | |
| 83 | +| Camera cleanup | done | Domain/object setup uses the typed camera surface; the only remaining wheel event is Chonsole suggestion-list scrolling. | |
0 commit comments