|
| 1 | +Toolbox Aid |
| 2 | +David Quesenberry |
| 3 | +04/05/2026 |
| 4 | +BUILD_PR_OVERLAY_DATA_PROVIDERS.md |
| 5 | + |
| 6 | +# BUILD_PR_OVERLAY_DATA_PROVIDERS |
| 7 | + |
| 8 | +## Objective |
| 9 | +Produce a docs-first BUILD bundle for a read-only Overlay Data Provider layer that keeps Dev Console and Debug Overlay responsibilities separated. |
| 10 | + |
| 11 | +## Build Constraints |
| 12 | +- one PR purpose only |
| 13 | +- no engine core changes |
| 14 | +- sample-level integration only |
| 15 | +- preserve Dev Console vs Debug Overlay boundary |
| 16 | + |
| 17 | +## Integration Reference |
| 18 | +- `samples/Phase 12 - Demo Games/Demo 1205 - Multi-System Demo/MultiSystemDemoScene.js` |
| 19 | + |
| 20 | +## Provider Layer Contract |
| 21 | +Provider descriptor: |
| 22 | + |
| 23 | +```js |
| 24 | +{ |
| 25 | + id: "render.layers", |
| 26 | + version: "1.0.0", |
| 27 | + collect(context) { ... }, |
| 28 | + isAvailable?(context) { ... } |
| 29 | +} |
| 30 | +``` |
| 31 | +
|
| 32 | +Provider snapshot map: |
| 33 | +
|
| 34 | +```js |
| 35 | +{ |
| 36 | + "system.frame": {...}, |
| 37 | + "scene.active": {...}, |
| 38 | + "scene.entities": {...}, |
| 39 | + "render.layers": {...}, |
| 40 | + "debug.status": {...} |
| 41 | +} |
| 42 | +``` |
| 43 | +
|
| 44 | +Panel context boundary: |
| 45 | +
|
| 46 | +```js |
| 47 | +{ |
| 48 | + providers, |
| 49 | + frame, |
| 50 | + layout, |
| 51 | + flags |
| 52 | +} |
| 53 | +``` |
| 54 | +
|
| 55 | +Panels must read from `providers` only. |
| 56 | +
|
| 57 | +## Recommended Provider IDs |
| 58 | +- `system.frame`: fps, deltaMs, frameIndex |
| 59 | +- `scene.active`: sceneId, sceneState |
| 60 | +- `scene.entities`: total, activeGroups |
| 61 | +- `render.layers`: orderedLayerNames, visibleCount |
| 62 | +- `debug.status`: overlayVisible, panelCount, errors |
| 63 | +
|
| 64 | +## Approved Console Interactions |
| 65 | +Allowed through public registry/provider host calls only: |
| 66 | +- list provider IDs |
| 67 | +- query provider availability/status |
| 68 | +- trigger safe provider snapshot refresh request (no direct panel mutation) |
| 69 | +
|
| 70 | +Not allowed: |
| 71 | +- console invoking panel render internals |
| 72 | +- console mutating provider descriptor shape |
| 73 | +- provider calling console actions |
| 74 | +
|
| 75 | +## Guardrails |
| 76 | +1. Providers are read-only and side-effect free. |
| 77 | +2. Overlay host owns provider snapshot collection. |
| 78 | +3. Panels do not perform direct runtime reads. |
| 79 | +4. Overlay host must not hardcode panel special cases. |
| 80 | +5. Any missing provider data must degrade gracefully. |
| 81 | +
|
| 82 | +## Validation |
| 83 | +- valid descriptor accepted |
| 84 | +- invalid descriptor rejected with structured error |
| 85 | +- duplicate provider id rejected |
| 86 | +- snapshot map deterministic for a given input frame |
| 87 | +- panel rendering succeeds with partial provider availability |
| 88 | +- boundary checks confirm no panel-to-console coupling |
| 89 | +
|
| 90 | +## Accomplishments Summary |
| 91 | +- Boundary between Dev Console and Debug Overlay already documented and preserved. |
| 92 | +- Overlay panel registry contract already documented for deterministic panel ordering. |
| 93 | +- This BUILD adds the missing read-only data seam so panels become purely presentational. |
| 94 | +
|
| 95 | +## Next-Step Recommendations |
| 96 | +1. `APPLY_PR_OVERLAY_DATA_PROVIDERS` |
| 97 | +2. `BUILD_PR_OVERLAY_PROVIDER_HEALTH_PANEL` |
| 98 | +3. `BUILD_PR_OVERLAY_PANEL_PRESETS_AND_TOGGLES` |
| 99 | +
|
| 100 | +## Deliverables In This Bundle |
| 101 | +- `docs/pr/PLAN_PR_OVERLAY_DATA_PROVIDERS.md` |
| 102 | +- `docs/pr/BUILD_PR_OVERLAY_DATA_PROVIDERS.md` |
| 103 | +- `docs/pr/APPLY_PR_OVERLAY_DATA_PROVIDERS.md` |
| 104 | +- `docs/dev/reports/change_summary.txt` |
| 105 | +- `docs/dev/reports/validation_checklist.txt` |
| 106 | +- `docs/dev/reports/file_tree.txt` |
0 commit comments