Skip to content

Commit 7d9524d

Browse files
committed
Finish PrompterOne rename and reader runtime updates
1 parent 6a91c4f commit 7d9524d

File tree

49 files changed

+1220
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1220
-96
lines changed

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ Repo-specific design rules:
302302
- Third-party runtime JavaScript SDKs MUST be sourced only from explicitly pinned GitHub Release tags and assets, copied into the repo, bundled locally with their runtime dependencies, and never loaded from CDNs, package registries, `latest` endpoints, or ad-hoc remote downloads at app runtime.
303303
- Repo-owned manifests, scripts, workflows, and project files that track third-party runtime JavaScript SDKs MUST point to concrete GitHub release versions and asset URLs, never floating references.
304304
- Any vendored runtime JavaScript SDK that tracks an upstream GitHub repo MUST have an automated watcher job that checks new GitHub releases and opens a repo issue describing the required update when a newer release appears.
305+
- Teleprompter TPS speed modifiers MUST affect both playback timing and subtle word-level letter spacing, so slower spans open up slightly and faster spans tighten slightly without hurting readability.
306+
- Teleprompter block transitions MUST stay visually consistent: outgoing cards move upward and incoming cards rise from below in the same direction every time; alternating up/down travel is forbidden.
307+
- User preferences persistence MUST sit behind a platform-agnostic user-settings abstraction, with browser storage implemented via local storage and room for other platform-specific implementations; theme, teleprompter layout preferences, camera/scene preferences, and similar saved settings belong there instead of ad-hoc feature stores.
305308
- Build quality gates must stay green under `-warnaserror`.
306309
- GitHub Pages is the expected CI publish target for the standalone WebAssembly app; publish automation must keep the app browser-only and Pages-compatible.
307310
- GitHub Actions MUST keep separate, clearly named workflows for pull-request validation and release automation; vague workflow names are forbidden.

docs/Architecture.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ flowchart LR
172172
Settings["SettingsCloudSection"]
173173
BrowserStore["BrowserCloudStorageStore"]
174174
Preferences["CloudStoragePreferences"]
175-
BrowserKeys["BrowserSettingsStore<br/>localStorage keys only"]
175+
UserSettings["IUserSettingsStore<br/>BrowserSettingsStore localStorage implementation"]
176176
Transfer["CloudStorageTransferService"]
177177
ProviderFactory["CloudStorageProviderFactory"]
178178
LocalRepo["BrowserScriptRepository + BrowserLibraryFolderRepository"]
@@ -185,7 +185,7 @@ flowchart LR
185185
Settings --> BrowserStore
186186
Settings --> Transfer
187187
BrowserStore --> Preferences
188-
BrowserStore --> BrowserKeys
188+
BrowserStore --> UserSettings
189189
Transfer --> ProviderFactory
190190
Transfer --> LocalVfs
191191
ScriptRepo --> LocalRepo
@@ -196,6 +196,7 @@ flowchart LR
196196

197197
- Scripts and folders persist through authoritative browser repositories backed by versioned JSON/localStorage materialization.
198198
- Browser `localStorage` is reserved for provider credentials, provider metadata, and lightweight settings values that must survive reloads.
199+
- Routed pages and browser services should depend on `IUserSettingsStore` for persisted user preferences; `BrowserSettingsStore` is the browser-only implementation detail behind that contract.
199200
- Browser storage plus VFS stay registered for cloud import/export and future stream-export work, but they are not the primary editor/library persistence path today.
200201
- Cloud import/export currently moves one scripts-and-settings snapshot at a time; it is not a live sync engine and does not own recorded video upload.
201202

@@ -236,14 +237,14 @@ flowchart LR
236237
Connectivity["BrowserConnectivityService"]
237238
Diagnostics["UiDiagnosticsService"]
238239
Pages["Library / Editor / Learn / Teleprompter / Go Live / Settings"]
239-
Browser["BrowserSettingsStore"]
240+
UserSettings["IUserSettingsStore"]
240241
Session["ScriptSessionService"]
241242
242243
WasmHost --> Bootstrap
243244
WasmHost --> Diagnostics
244245
Pages --> Diagnostics
245246
Pages --> Connectivity
246-
Browser --> WasmHost
247+
UserSettings --> WasmHost
247248
Session --> WasmHost
248249
Diagnostics --> Layout
249250
Connectivity --> Layout
@@ -332,11 +333,13 @@ If a native embedded browser host returns later, media access must not rely on s
332333
- exact design shell and imported `new-design` assets
333334
- shared UI localization catalog for supported browser cultures
334335
- browser interop and app DI wiring
336+
- browser-backed `IUserSettingsStore` wiring for persisted reader, theme, scene, and studio preferences
335337
- dynamic library folder components and folder/document browser storage adapters
336338
- UI diagnostics banner and global error boundary
337339
- debounced editor autosave and body-only TPS source authoring
338340
- centered RSVP ORP playback in `learn`
339341
- single background camera layer under text in `teleprompter`
342+
- teleprompter reader preferences persist through `IUserSettingsStore`, including font scale, text width, focal position, and camera auto-start preference
340343
- dedicated `go-live` routing surface that arms multiple live destinations while reusing the same browser-composed scene
341344
- settings split between device setup (`settings`) and destination routing (`go-live`)
342345

docs/Features/ReaderRuntime.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,25 @@ The important contracts are:
1313
- Teleprompter word groups stay short enough to avoid run-on lines.
1414
- Teleprompter preserves TPS word presentation details such as pronunciation guides, inline colors, emotion styling, and speed-derived spacing/timing.
1515
- Teleprompter pre-centers the next card before it slides in, so block transitions do not jump at the focal line.
16+
- Teleprompter block transitions always move in one upward direction: the outgoing card exits up and the incoming card rises from below.
1617
- Teleprompter controls stay readable at rest; they must not fade until they become unusable.
18+
- Teleprompter user-adjusted font size, text width, focal position, and camera preference survive reloads through the shared user-settings contract.
1719

1820
## Flow
1921

2022
```mermaid
2123
flowchart LR
2224
Session["IScriptSessionService"]
25+
UserSettings["IUserSettingsStore"]
2326
Learn["LearnPage"]
2427
Reader["TeleprompterPage"]
2528
Js["design/app.js"]
2629
Browser["DOM + media APIs"]
2730
2831
Session --> Learn
2932
Session --> Reader
33+
UserSettings --> Learn
34+
UserSettings --> Reader
3035
Learn --> Js
3136
Reader --> Js
3237
Js --> Browser
@@ -43,15 +48,24 @@ flowchart LR
4348
- `teleprompter` groups words by pauses, sentence endings, clause endings, and short phrase limits.
4449
- `teleprompter` forwards TPS pronunciation metadata to word-level `title` / `data-pronunciation` attributes.
4550
- `teleprompter` derives word-level pacing from the compiled TPS duration and carries effective WPM into the DOM for testable parity.
51+
- `teleprompter` preserves TPS front-matter speed offsets and `[normal]` resets when rebuilding reader blocks, so relative speed tags keep both their timing math and subtle word-level spacing cues.
4652
- `teleprompter` keeps TPS inline colors visible even when a phrase group is active or the active word is highlighted.
53+
- `teleprompter` persists font scale, text width, focal point, and camera auto-start changes through `IUserSettingsStore` and restores them from stored `ReaderSettings` during bootstrap.
54+
- `teleprompter` prepositions the next card below the focal line before activation, so forward and backward block jumps both animate upward instead of alternating direction.
4755

4856
## Verification
4957

5058
- bUnit verifies teleprompter background-camera markup and readable phrase groups.
5159
- bUnit verifies product-launch TPS modifiers survive into teleprompter word markup, timing, and pronunciation metadata.
60+
- bUnit verifies custom TPS `speed_offsets` front matter and `[normal]` resets survive into teleprompter word classes, styles, and effective-WPM metadata.
61+
- bUnit verifies teleprompter restores persisted reader width, focal position, and font size and saves reader layout/camera preference changes back to stored `ReaderSettings`.
5262
- Core tests verify TPS scripts generate RSVP phrase groups.
5363
- Core tests verify shorthand inline WPM scopes such as `[180WPM]...[/180WPM]` survive nested tags.
64+
- Core tests verify nested `speed_offsets:` front matter is parsed and applied to `xslow` / `slow` / `fast` / `xfast` scope math.
65+
- Core tests verify legacy reader-settings payloads without `FocalPointPercent` deserialize with the default focal-point value.
5466
- Playwright verifies ORP centering and the `security-incident` phrase-aware flow in `learn`.
5567
- Playwright verifies there is no teleprompter overlay camera box and that phrase groups do not overflow.
5668
- Playwright verifies the teleprompter camera button attaches and detaches a real synthetic `MediaStream` on the background video layer.
5769
- Playwright verifies the full `Product Launch` teleprompter scenario, including visible controls, TPS formatting parity, screenshot artifacts, and aligned post-transition playback.
70+
- Playwright verifies custom TPS speed offsets change computed teleprompter `letter-spacing` while `[normal]` words reset back to neutral spacing and timing.
71+
- Playwright verifies teleprompter width and focal settings survive a real browser reload and that backward block jumps keep the outgoing card on the upward exit path during the transition.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Legacy Product Prefix Cleanup Plan
2+
3+
## Goal
4+
5+
Finish the product rename by replacing every remaining repo-owned legacy product prefix with the `PrompterOne` and `prompterOne` naming, without regressing the standalone Blazor WebAssembly runtime, JS interop, or browser acceptance suite.
6+
7+
## Scope
8+
9+
### In Scope
10+
11+
- rename remaining repo-owned runtime identifiers that still use the old product prefix in tracked source files
12+
- rename matching browser-test constants and harness globals so the browser suite stays aligned with production contracts
13+
- rename local ignored IDE artifacts that still use the old product name when that can be done safely without changing tracked repo state
14+
- re-scan tracked content and relevant local metadata for any residual legacy product-prefix references after the code changes
15+
16+
### Out Of Scope
17+
18+
- broad refactors unrelated to the rename cleanup
19+
- changes to third-party brand names such as `LiveKit` where `Live` is part of the vendor or protocol name rather than the old product name
20+
- generated `bin/`, `obj/`, or other rebuild output
21+
22+
## Current State
23+
24+
- The main solution, projects, namespaces, and docs already use `PrompterOne`.
25+
- Remaining tracked hits are limited to browser JS globals, interop method names, and browser-test harness constants.
26+
- Remaining filesystem-name hits are in ignored local IDE artifacts such as `.idea/` state and `*.DotSettings.user`.
27+
28+
## Constraints And Risks
29+
30+
- The repo mandates a root-level plan file and a full baseline before non-trivial edits.
31+
- Browser acceptance is the primary gate, so any renamed JS global or interop string must be changed consistently in production and tests.
32+
- `LiveKit` identifiers must stay intact where they refer to the external SDK rather than the product prefix.
33+
- Ignored IDE files are local-only and must not distract from tracked source correctness, but renaming them is acceptable if it is safe and improves workspace consistency.
34+
35+
## Testing Methodology
36+
37+
- Establish a full repo baseline with the required `build` and `test` commands before edits.
38+
- After the rename changes, run targeted source scans to confirm the legacy product prefix is gone from tracked content.
39+
- Run the full repo quality pass in repo order: `build`, `test`, `coverage`, then `format`.
40+
- Quality bar:
41+
- no tracked legacy product-prefix references remain unless documented as an intentional vendor name
42+
- `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror` succeeds
43+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx` succeeds
44+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx --collect:"XPlat Code Coverage"` succeeds
45+
- `dotnet format /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx` succeeds
46+
47+
## Ordered Steps
48+
49+
### 1. Freeze Scope And Inventory The Remaining Hits
50+
51+
- [x] Search tracked file contents for the legacy product prefix and related case variants while excluding generated output.
52+
- [x] Search file paths for legacy-name leftovers and classify which ones are tracked repo content versus ignored local metadata.
53+
- [x] Record the rename target set and validation sequence in this plan file.
54+
- Verify before moving on:
55+
- the remaining hit list is concrete and small enough to change intentionally rather than with blind global replacement
56+
- vendor names such as `LiveKit` are explicitly excluded from the rename
57+
58+
### 2. Establish The Full Baseline Before Edits
59+
60+
- [x] Run `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror`.
61+
- [x] Run `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx`.
62+
- [x] Record each baseline failure below with symptom, suspected cause, and intended fix path before changing source.
63+
- Verify before moving on:
64+
- baseline build status is captured
65+
- baseline test status is captured
66+
- every failing baseline test, if any, is tracked below as a checklist item
67+
68+
## Baseline Failures
69+
70+
- [x] No baseline failures.
71+
- Symptom: none. `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror` and `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx` both passed before edits.
72+
- Suspected cause: not applicable.
73+
- Intended fix path: preserve the green baseline through the rename cleanup and rerun the same required gates afterward.
74+
75+
### 3. Rename Tracked Repo-Owned Contracts
76+
77+
- [x] Update production browser interop identifiers in `/Users/ksemenenko/Developer/PrompterOne/src/PrompterOne.Shared/wwwroot/media/browser-media.js`, `/Users/ksemenenko/Developer/PrompterOne/src/PrompterOne.Shared/wwwroot/theme/browser-theme.js`, and `/Users/ksemenenko/Developer/PrompterOne/src/PrompterOne.Shared/Settings/Services/BrowserThemeInteropMethodNames.cs`.
78+
- [x] Update the matching browser-test constants and synthetic harness globals in `/Users/ksemenenko/Developer/PrompterOne/tests/PrompterOne.App.UITests/Media/synthetic-media-harness.js`, `/Users/ksemenenko/Developer/PrompterOne/tests/PrompterOne.App.UITests/Media/BrowserTestConstants.Media.cs`, `/Users/ksemenenko/Developer/PrompterOne/tests/PrompterOne.App.UITests/Support/BrowserTestConstants.cs`, and `/Users/ksemenenko/Developer/PrompterOne/tests/PrompterOne.App.Tests/Support/AppTestData.cs`.
79+
- [x] Re-scan tracked source for legacy product-prefix references to confirm only intentional vendor names remain.
80+
- Verify before moving on:
81+
- each renamed production contract has a matching test-side update
82+
- the remaining tracked hits, if any, are intentional and documented
83+
- Outcome:
84+
- tracked source scans are clean for the legacy product prefix after the contract rename
85+
- `LiveKit` vendor identifiers remain intact while only the repo-owned harness global prefix changed
86+
87+
### 4. Rename Safe Local Metadata Leftovers
88+
89+
- [x] Rename or remove ignored local IDE artifacts that still use the old product name, including the legacy solution `.DotSettings.user` file and the stale Rider `.idea` directory, if they still exist after source changes.
90+
- [x] Re-scan local file paths for old-product-name leftovers outside generated output.
91+
- Verify before moving on:
92+
- the rename does not modify tracked repo content unexpectedly
93+
- local-only leftovers are either renamed or explicitly called out as intentionally untouched
94+
- Outcome:
95+
- the stale Rider `.idea` directory was removed because a current `.idea.PrompterOne` directory already existed
96+
- the local solution settings file now follows the current solution name as `PrompterOne.slnx.DotSettings.user`
97+
- the local filesystem scan is clean for the old product name outside excluded generated output
98+
99+
### 5. Final Validation And Plan Closeout
100+
101+
- [x] Run `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror`.
102+
- [x] Run `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx`.
103+
- [x] Run `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx --collect:"XPlat Code Coverage"`.
104+
- [x] Run `dotnet format /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx`.
105+
- [x] Update this plan with the final scan results, validation outcomes, and any intentionally untouched local-only residue.
106+
- Verify before moving on:
107+
- all required repo commands pass
108+
- scans are clean for tracked repo-owned old-name prefixes
109+
- this plan reflects the actual end state
110+
- Final outcome:
111+
- `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror` passed after the cleanup
112+
- focused `PrompterOne.App.Tests` and `PrompterOne.App.UITests` runs passed after the contract rename
113+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx` passed after the cleanup
114+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx --collect:"XPlat Code Coverage"` passed and produced coverage artifacts for core, component, and browser suites
115+
- `dotnet format /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx` completed successfully
116+
- tracked source scans and local filesystem-name scans are clean for the legacy product prefix
117+
118+
## Final Validation Skills And Commands
119+
120+
1. `dotnet-blazor`
121+
- Action: verify the Blazor WebAssembly host and JS interop contract names still line up after the rename cleanup.
122+
- Outcome: production browser scripts and C# interop constants stay consistent.
123+
2. `playwright`
124+
- Action: rely on the browser acceptance suite executed through the repo `dotnet test` workflow to validate real-browser behavior after the renamed JS globals.
125+
- Outcome: browser flows keep working with the updated test harness contract names.
126+
3. Repo quality commands
127+
- `dotnet build /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx -warnaserror`
128+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx`
129+
- `dotnet test /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx --collect:"XPlat Code Coverage"`
130+
- `dotnet format /Users/ksemenenko/Developer/PrompterOne/PrompterOne.slnx`
131+
- Reason: these are the mandatory repo-defined gates for this task.

0 commit comments

Comments
 (0)