|
| 1 | +# ADR-0002: Go Live Operational Studio Surface |
| 2 | + |
| 3 | +Status: Implemented |
| 4 | +Date: 2026-04-01 |
| 5 | +Related Features: [Go Live Runtime](/Users/ksemenenko/Developer/PrompterLive/docs/Features/GoLiveRuntime.md), [Architecture Overview](/Users/ksemenenko/Developer/PrompterLive/docs/Architecture.md) |
| 6 | + |
| 7 | +## Implementation plan (step-by-step) |
| 8 | + |
| 9 | +- [x] Audit the existing routed `Go Live` page against `new-design/golive.html`. |
| 10 | +- [x] Replace the design drifted routing form layout with a studio shell that matches the design rails and canvas. |
| 11 | +- [x] Bind the studio shell to real browser media state, real scene cameras, and honest destination readiness summaries. |
| 12 | +- [x] Keep detailed provider setup in `Settings` and reduce `Go Live` to operational toggles plus links back to setup. |
| 13 | +- [x] Add component and browser coverage for source selection, take-to-air, destination arming, and deterministic browser media behavior. |
| 14 | +- [x] Update architecture and feature documentation to reflect the new boundary. |
| 15 | + |
| 16 | +## Context |
| 17 | + |
| 18 | +- The prior `Go Live` page mixed an operational studio surface with a large lower deck of inline provider forms. |
| 19 | +- That shape diverged from `new-design/golive.html`, pushed the most important controls below the fold, and encouraged duplicate ownership of provider credentials between `Go Live` and `Settings`. |
| 20 | +- The product already has browser media services, scene state, output runtime services, and persisted provider settings. The problem was not missing capability; it was a blurred page contract. |
| 21 | +- The user explicitly asked for a real `Go Live` studio with camera switching, live preview, honest data, and design fidelity instead of a fake or placeholder surface. |
| 22 | + |
| 23 | +Goals: |
| 24 | + |
| 25 | +- Keep `Go Live` visually faithful to `new-design/golive.html`. |
| 26 | +- Make `Go Live` operational, not administrative. |
| 27 | +- Keep live status, room state, and destination readiness truthful to what the browser runtime actually knows. |
| 28 | +- Cover the main studio flow with automated component and browser tests. |
| 29 | + |
| 30 | +Non-goals: |
| 31 | + |
| 32 | +- Adding new server-side relay infrastructure. |
| 33 | +- Moving provider credential editing out of `Settings`. |
| 34 | +- Inventing packet-loss, guest, or network telemetry that the browser runtime does not own. |
| 35 | + |
| 36 | +## Decision |
| 37 | + |
| 38 | +`Go Live` becomes the operational studio surface for the current scene, while `Settings` remains the only page that edits provider credentials, ingest endpoints, and detailed device or streaming configuration. |
| 39 | + |
| 40 | +Key points: |
| 41 | + |
| 42 | +- The routed `Go Live` page now mirrors the design shell with a top session bar, left input rail, center program monitor, scene control strip, and right live/studio rail. |
| 43 | +- The center monitor shows the currently selected program source. The right preview rail shows the currently on-air source until the operator takes the selected source live. |
| 44 | +- Destination cards in the right rail only arm or disarm persisted targets and show honest readiness summaries derived from stored settings and runtime availability. |
| 45 | +- If the browser exposes cameras and the scene is empty, `Go Live` seeds the first available camera so the studio does not boot into a dead state. |
| 46 | +- Fake guest lists, fake people, and invented runtime metrics are removed. The room panel may show local-host state and persisted room identity only when no real guest transport exists. |
| 47 | + |
| 48 | +## Diagram |
| 49 | + |
| 50 | +```mermaid |
| 51 | +flowchart LR |
| 52 | + Settings["SettingsPage<br/>devices + provider setup"] |
| 53 | + GoLive["GoLivePage<br/>operational studio"] |
| 54 | + Sources["GoLiveSourcesCard"] |
| 55 | + Program["GoLiveProgramFeedCard"] |
| 56 | + Controls["GoLiveSceneControls"] |
| 57 | + Preview["GoLiveCameraPreviewCard"] |
| 58 | + Sidebar["GoLiveStudioSidebar"] |
| 59 | + Studio["StudioSettingsStore"] |
| 60 | + Scene["IMediaSceneService"] |
| 61 | + Runtime["GoLiveOutputRuntimeService"] |
| 62 | +
|
| 63 | + Settings --> Studio |
| 64 | + Settings --> Scene |
| 65 | + Settings --> GoLive |
| 66 | + GoLive --> Sources |
| 67 | + GoLive --> Program |
| 68 | + GoLive --> Controls |
| 69 | + GoLive --> Preview |
| 70 | + GoLive --> Sidebar |
| 71 | + GoLive --> Studio |
| 72 | + GoLive --> Scene |
| 73 | + GoLive --> Runtime |
| 74 | +``` |
| 75 | + |
| 76 | +## Alternatives considered |
| 77 | + |
| 78 | +### Keep provider forms inside `Go Live` |
| 79 | + |
| 80 | +- Pros: fewer clicks for provider editing. |
| 81 | +- Cons: duplicates `Settings` ownership, keeps the studio surface bloated, and continues the design mismatch. |
| 82 | +- Rejected because it preserves the exact ambiguity that caused the current UI drift. |
| 83 | + |
| 84 | +### Build a design-faithful shell but populate it with placeholder data |
| 85 | + |
| 86 | +- Pros: fast visual parity. |
| 87 | +- Cons: violates the product requirement for honest browser-backed state and would make tests prove a fake flow. |
| 88 | +- Rejected because `Go Live` is an operational screen, not a mockup. |
| 89 | + |
| 90 | +### Move all live controls into `Settings` |
| 91 | + |
| 92 | +- Pros: one page for every live concern. |
| 93 | +- Cons: destroys the operational studio workflow and breaks the design reference. |
| 94 | +- Rejected because the user needs a dedicated live-production surface. |
| 95 | + |
| 96 | +## Consequences |
| 97 | + |
| 98 | +### Positive |
| 99 | + |
| 100 | +- `Go Live` now reads like a studio surface instead of a settings form. |
| 101 | +- Runtime ownership is clearer: `Settings` configures providers, `Go Live` operates them. |
| 102 | +- Source switching and take-to-air behavior are easier to reason about and test. |
| 103 | +- The page no longer renders fake people or fabricated provider/network state. |
| 104 | + |
| 105 | +### Negative / risks |
| 106 | + |
| 107 | +- Operators must leave `Go Live` for deep provider edits. |
| 108 | + Mitigation: destination cards link directly to `Settings`, and the right rail explains that detailed setup lives there. |
| 109 | +- Browser runtime metrics remain limited compared to a server relay. |
| 110 | + Mitigation: the UI shows honest summaries and avoids pretending the browser has relay telemetry. |
| 111 | +- Auto-seeding a default camera changes empty-scene boot behavior. |
| 112 | + Mitigation: this only happens when the scene is empty and real browser cameras are available, which avoids a dead operational surface. |
| 113 | + |
| 114 | +## Impact |
| 115 | + |
| 116 | +### Code |
| 117 | + |
| 118 | +- Affected modules and services: |
| 119 | + - `src/PrompterLive.Shared/GoLive/Pages/*` |
| 120 | + - `src/PrompterLive.Shared/GoLive/Components/*` |
| 121 | + - `src/PrompterLive.Shared/Contracts/UiTestIds.cs` |
| 122 | + - `tests/PrompterLive.App.Tests/GoLive/GoLivePageTests.cs` |
| 123 | + - `tests/PrompterLive.App.UITests/GoLive/GoLiveFlowTests.cs` |
| 124 | + - `tests/PrompterLive.App.UITests/Scenarios/StudioWorkflowScenarioTests.cs` |
| 125 | +- New boundaries and responsibilities: |
| 126 | + - `GoLivePage` owns the operational studio layout and quick toggles. |
| 127 | + - `Settings` owns provider configuration and detailed streaming setup. |
| 128 | + - `GoLiveStudioSidebar` summarizes provider readiness but does not edit secrets or ingest fields. |
| 129 | + |
| 130 | +### Documentation |
| 131 | + |
| 132 | +- [docs/Features/GoLiveRuntime.md](/Users/ksemenenko/Developer/PrompterLive/docs/Features/GoLiveRuntime.md) now documents the operational-studio boundary. |
| 133 | +- [docs/Architecture.md](/Users/ksemenenko/Developer/PrompterLive/docs/Architecture.md) now maps `Go Live` and `Settings` responsibilities more explicitly. |
| 134 | + |
| 135 | +## Verification |
| 136 | + |
| 137 | +### Testing methodology |
| 138 | + |
| 139 | +- Prove the compact studio layout through routed component tests. |
| 140 | +- Prove browser-realistic source selection, take-to-air, and destination arming through deterministic Playwright media flows. |
| 141 | +- Keep screenshot artifacts for the main studio scenario under `output/playwright/`. |
| 142 | + |
| 143 | +### Test commands |
| 144 | + |
| 145 | +- `dotnet build /Users/ksemenenko/Developer/PrompterLive/PrompterLive.slnx -warnaserror` |
| 146 | +- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.Tests/PrompterLive.App.Tests.csproj --filter "FullyQualifiedName~GoLivePageTests"` |
| 147 | +- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.UITests/PrompterLive.App.UITests.csproj --filter "FullyQualifiedName~GoLiveFlowTests"` |
| 148 | +- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.UITests/PrompterLive.App.UITests.csproj --filter "FullyQualifiedName~StudioWorkflow_SettingsAndGoLiveStudio_CapturesArtifacts"` |
| 149 | + |
| 150 | +### New or changed tests |
| 151 | + |
| 152 | +| ID | Scenario | Level | Expected result | |
| 153 | +| --- | --- | --- | --- | |
| 154 | +| TST-001 | Open `Go Live` with persisted destinations | Component | Ready summaries render from persisted settings without inline provider forms | |
| 155 | +| TST-002 | Select the secondary camera and take it live | UI | Program monitor switches first, live preview switches only after take-to-air | |
| 156 | +| TST-003 | Arm LiveKit, YouTube, OBS, and recording from the studio surface | UI | Quick toggles persist and reload into the operational studio | |
| 157 | + |
| 158 | +## References |
| 159 | + |
| 160 | +- [new-design/golive.html](/Users/ksemenenko/Developer/PrompterLive/new-design/golive.html) |
| 161 | +- [docs/Features/GoLiveRuntime.md](/Users/ksemenenko/Developer/PrompterLive/docs/Features/GoLiveRuntime.md) |
| 162 | +- [docs/Architecture.md](/Users/ksemenenko/Developer/PrompterLive/docs/Architecture.md) |
0 commit comments