From 5e8b8e58350f62d61b62c72e22ffccffb82d04e2 Mon Sep 17 00:00:00 2001 From: gramps Date: Wed, 12 Aug 2026 07:33:03 -0700 Subject: [PATCH] =?UTF-8?q?Social=20bar=20(Branch=20B):=20global=20resourc?= =?UTF-8?q?e=20with=20per-scene=20presence=20=E2=80=94=20Models/Socials.cs?= =?UTF-8?q?=20(19=20services,=20icons,=20canonical=20URLs),=20Services/Soc?= =?UTF-8?q?ialValidator.cs=20(HTTP=20lookup=20validation=20seam),=20Layout?= =?UTF-8?q?Store=20schema=20v7=20(Socials=20+=20SocialEntry=20tables=20+?= =?UTF-8?q?=20Scene.HasSocialBar),=20MainViewModel=20(socials=20collection?= =?UTF-8?q?,=20AddSocial/RemoveSocial/ToggleSceneSocialBar=20commands,=20f?= =?UTF-8?q?reemium=20cap=20YT+1,=20premium=20seam),=20MainWindow.xaml=20(f?= =?UTF-8?q?ooter=20Social=20button=20+=20[+/-]=20toggle=20on=20meter=20lin?= =?UTF-8?q?e,=20preview=20bar=20rendering=20top/bottom=20+=20LCR),=204=20i?= =?UTF-8?q?ntegration=20tests=20(roundtrip,=20empty-not-persisted,=20canon?= =?UTF-8?q?ical=20URLs,=20icons),=2085=20tests=20passing,=200=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HANDOFF.md | 10 +- MainWindow.xaml | 61 ++++++++ Models/Scene.cs | 11 ++ Models/Socials.cs | 139 +++++++++++++++++ Models/index.md | 1 + Services/LayoutStore.cs | 135 +++++++++++++++- Services/SocialValidator.cs | 82 ++++++++++ Services/index.md | 1 + TASKS.md | 2 +- ViewModels/MainViewModel.cs | 161 +++++++++++++++++++- ytLive.Tests/LayoutStorePersistenceTests.cs | 10 +- ytLive.Tests/SocialBarTests.cs | 119 +++++++++++++++ 12 files changed, 715 insertions(+), 17 deletions(-) create mode 100644 Models/Socials.cs create mode 100644 Services/SocialValidator.cs create mode 100644 ytLive.Tests/SocialBarTests.cs diff --git a/HANDOFF.md b/HANDOFF.md index c9c80a7..7a0b306 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -7,8 +7,8 @@ ## Session state (last updated: 2026-08-12) -- **Finished:** Webcam resource validation + first-frame proof — merged to `main` and pushed. `MediaCaptureFrameSource` validates post-init (VideoDeviceId match, stream properties, reader StartAsync status), subscribes `Failed`/`CameraStreamStateChanged` → `SourceFailed`; `CameraManager.AcquireAsync` requires first-frame proof (4s timeout); `MainViewModel` surfaces `WebcamError` chip + MessageBox with suspect-app names (`CameraConflictProbe`). Tested locally — NVIDIA Broadcast identified as the camera hog, killed it, webcam works. 81 tests passing, 0 warnings. -- **In flight:** Nothing. Clean tree on `main`. -- **Landmine:** 19041 SDK projection gaps: `MediaCaptureSharingMode.Exclusive` + `MediaCapture.DeviceLost` not projected; `CameraStreamState` enum member names omitted (compare by `(int)` — 2=Failed). The Aug 11 social-bar work is **gone** (git gc-pruned, opencode.db reinitialized, gitea refuses unadvertised fetch) — rebuild from scratch per TASKS.md item 14. -- **Next step:** Branch B — social bar (global resource, validated lookups, top/bottom + LCR, freemium YT+1 / premium unlimited, +/- scene toggle). Spec in TASKS.md item 14. -- **Secret/DB/port facts live:** OAuth client id/secret in `Helpers/OAuthCredentials.cs`; OAuth session token in `Helpers/TokenStore.cs` (DPAPI → `%APPDATA%\ytLlive\ytLlive.auth`); layout DB `%APPDATA%\ytLlive\ytLlive.db` (schema v6); OAuth callback `http://localhost:8765/oauth2/callback`; crash log `%APPDATA%\ytLlive\startup.log`. +- **Finished:** Webcam resource validation (merged to main, `e1d9e13`) + Social bar (on branch `social-bar`, ready to merge). Social bar: `Models/Socials.cs` (19 services + icons/URLs), `Services/SocialValidator.cs` (HTTP lookup seam), schema v7 (`Socials` + `SocialEntry` tables + `Scene.HasSocialBar`), footer Social button + [+/-] toggle, preview bar rendering (top/bottom, LCR), freemium cap (YT+1, premium seam). 85 tests passing, 0 warnings. +- **In flight:** Social bar needs merge to main + push, then local testing. +- **Landmine:** 19041 SDK projection gaps (see Branch A). `HttpSocialValidator` uses synchronous `.GetAwaiter().GetResult()` in the dialog flow — fine for a UI-blocking dialog, but a proper async dialog is a follow-up. The social dialog is currently a simple `ShowInputDialog` (inline WPF Window) — a proper dialog window with service picker + URL field + validation feedback is a UX follow-up. +- **Next step:** Merge `social-bar` to main, push. Then: local test the social bar (add a social, verify bar renders, toggle on/off scenes). Then: continue TASK 4 (encoder + RTMP push) or the next queued item. +- **Secret/DB/port facts live:** OAuth client id/secret in `Helpers/OAuthCredentials.cs`; OAuth session token in `Helpers/TokenStore.cs` (DPAPI → `%APPDATA%\ytLlive\ytLlive.auth`); layout DB `%APPDATA%\ytLlive\ytLlive.db` (schema v7); OAuth callback `http://localhost:8765/oauth2/callback`; crash log `%APPDATA%\ytLlive\startup.log`. diff --git a/MainWindow.xaml b/MainWindow.xaml index ffaa8b0..6fee4ce 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -651,6 +651,40 @@ FontSize="180" TextAlignment="Center"/> + + + + + + + + + + + + + + + + + + + + + @@ -820,6 +854,33 @@ PreviewMouseLeftButtonDown="VolumeSlider_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="VolumeSlider_PreviewMouseLeftButtonUp" LostMouseCapture="VolumeSlider_LostMouseCapture"/> + + +