Skip to content

Commit 5e7f78f

Browse files
committed
Implement real go-live studio runtime
1 parent 2fd6f1d commit 5e7f78f

25 files changed

+1255
-1093
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
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)

docs/Architecture.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ flowchart LR
9595
| `Editor` | TPS authoring surface | Creates and reshapes scripts with structure-aware tooling | `src/PrompterLive.Shared/Editor`, `src/PrompterLive.Core/Editor`, `src/PrompterLive.Core/Tps` | source editing UI, toolbar actions, front matter, TPS transforms | shell navigation policy, teleprompter playback, live runtime wiring |
9696
| `Learn` | RSVP rehearsal mode | Trains delivery with timing and context | `src/PrompterLive.Shared/Learn`, `src/PrompterLive.Core/Rsvp` | ORP playback, rehearsal pacing, next-phrase context | document storage, scene routing, destination configuration |
9797
| `Teleprompter` | Read-mode playback surface | Presents the script for live reading with camera-backed composition | `src/PrompterLive.Shared/Teleprompter` | reading layout, background camera composition, runtime reading flow | script persistence rules, destination setup screens |
98-
| `GoLive` | Live production and routing surface | Arms outputs, switches sources, previews cameras, and exposes live telemetry | `src/PrompterLive.Shared/GoLive`, `src/PrompterLive.Core/Streaming` | studio layout, output controls, destination routing, live session state | server-side stream processing, unrelated editor or library concerns |
99-
| `Settings` | Device and scene setup surface | Configures cameras, microphones, overlays, and base scene state | `src/PrompterLive.Shared/Settings`, `src/PrompterLive.Core/Media` | device selection UI, scene transforms, scene persistence flows | live output orchestration policy, document editing |
98+
| `GoLive` | Operational browser studio surface | Arms outputs, switches sources, previews cameras, and exposes honest live/runtime status | `src/PrompterLive.Shared/GoLive`, `src/PrompterLive.Core/Streaming` | studio layout, output quick toggles, selected vs on-air source state, live session state | provider credential editing, server-side stream processing, unrelated editor or library concerns |
99+
| `Settings` | Device, scene, and provider setup surface | Configures cameras, microphones, overlays, base scene state, and persisted destination credentials | `src/PrompterLive.Shared/Settings`, `src/PrompterLive.Core/Media` | device selection UI, scene transforms, provider credentials/endpoints, scene persistence flows | live output orchestration policy, document editing |
100100
| `Storage` | Browser persistence and cloud transfer orchestration | Keeps scripts and settings local-first while exposing provider-backed import/export | `src/PrompterLive.Shared/Storage`, `src/PrompterLive.Shared/Library/Services/Storage` | browser `IStorage` and VFS registration, authoritative browser repositories for scripts/folders, provider credential persistence, scripts/settings snapshot transfer | routed page layout, teleprompter rendering, video-stream upload workflows |
101101
| `Diagnostics` | Error and operation feedback layer | Makes recoverable and fatal issues visible in the shell | `src/PrompterLive.Shared/Diagnostics` | banners, error boundary reporting, operation status wiring | owning business logic of the failing feature |
102102
| `Localization` | Culture and UI text contract | Keeps supported runtime languages consistent and browser-driven | `src/PrompterLive.Shared/Localization`, `src/PrompterLive.Core/Localization` | text catalogs, culture bootstrap, supported culture rules | feature behavior or screen-specific layout ownership |
@@ -391,16 +391,16 @@ sequenceDiagram
391391

392392
```mermaid
393393
flowchart LR
394-
Settings["SettingsPage<br/>device setup only"]
395-
GoLive["GoLivePage<br/>studio layout + destination routing"]
394+
Settings["SettingsPage<br/>devices + provider setup"]
395+
GoLive["GoLivePage<br/>operational studio surface"]
396396
SessionBar["GO Live session bar<br/>back, title, timer, record, stream"]
397-
PreviewRail["preview + stats rail"]
397+
PreviewRail["preview + studio rail"]
398398
Preview["GoLiveCameraPreviewCard"]
399399
Program["GoLiveProgramFeedCard"]
400400
Sources["GoLiveSourcesCard"]
401-
TargetSources["GoLiveDestinationSourcePicker"]
401+
SceneControls["GoLiveSceneControls"]
402+
Sidebar["GoLiveStudioSidebar"]
402403
Studio["StudioSettingsStore"]
403-
Routing["GoLiveDestinationRouting"]
404404
Scene["IMediaSceneService"]
405405
CameraInterop["CameraPreviewInterop"]
406406
Providers["IStreamingOutputProvider[]"]
@@ -411,19 +411,21 @@ flowchart LR
411411
Settings --> GoLive
412412
GoLive --> Studio
413413
GoLive --> Scene
414-
GoLive --> Routing
415414
GoLive --> Providers
416415
GoLive --> Reader
417416
GoLive --> SessionBar
418417
GoLive --> PreviewRail
419418
GoLive --> Preview
420419
GoLive --> Program
421420
GoLive --> Sources
422-
GoLive --> TargetSources
421+
GoLive --> SceneControls
422+
GoLive --> Sidebar
423423
Preview --> CameraInterop
424424
Preview --> Scene
425-
Routing --> Studio
426-
Routing --> Scene
425+
Sidebar --> Studio
426+
Sidebar --> Providers
427+
Sources --> Scene
428+
SceneControls --> Scene
427429
```
428430

429431
```mermaid

0 commit comments

Comments
 (0)