# HANDOFF — Session State ## Branch `main` — clean, uncommitted TASK 10 changes ## What shipped this session 1. **TASK 10 — Polar billing + Velopack auto-updates (steps 1–7)** — full license key activation flow: - **Velopack** — NuGet `Velopack` 1.2.0 added, bootstrap in `App.xaml.cs` (`VelopackApp.Build().Run()` in try/catch). Self-hosted update URL TBD (DO droplet). The bootstrap is a no-op until the update URL is configured. - **PolarLicenseService** — `Services/PolarLicenseService.cs`: `POST .../validate` with `key` + `organization_id`. Returns `status` (`granted`/`revoked`/`expired`) + `expires_at`. No auth. Network errors surfaced gracefully. - **License key entry UI** — About overlay gains a third panel (same pattern as Licenses): text input + "Activate" button + status message. "Enter License Key" button added to the hub (alongside "Unlock Premium" which opens the Polar checkout URL). `IsHubVisible` computed property hides the hub when either sub-panel is open. - **Entitlement persistence** — `LayoutStore` gains `LoadLicenseKey`/`SaveLicenseKey`, `LoadLicenseValidatedAt`/`SaveLicenseValidatedAt`, `LoadIsPremium`/`SaveIsPremium` via the Settings key/value table (no schema version bump needed). 14-day offline grace period: cached premium state trusted while online re-validation runs in the background. - **BrandFlash toggle** — `IsPremium` property setter flips `BrandFlashEnabled = !value`. On startup, `ValidateLicenseAtStartupAsync` loads cached state → attempts online re-validation → overrides cache on success → lapses on failure/expiry. Premium removes the watermark; free tier keeps it. - **PremiumUrl wired** — set to `https://buy.polar.sh/polar_cl_ueMy8AyAClO0o0yo19IroZwKTbD587gzUsjEW3bFapw`. `IsPremiumAvailable` now true. About overlay "Unlock Premium" button lights up. Tooltip updated. - **About text updated** — "one-time unlock" → "subscription". 2. **Polar MCP auth** — authenticated via `opencode mcp auth Polar`. Polar MCP connected. ## Files changed - `App.xaml.cs` — Velopack bootstrap (try/catch, non-fatal) - `ytLive.csproj` — added `Velopack` 1.2.0 NuGet - `Services/PolarLicenseService.cs` — new: Polar license validation API client - `Services/LayoutStore.cs` — new: `Load/SaveLicenseKey`, `Load/SaveLicenseValidatedAt`, `Load/SaveIsPremium` - `ViewModels/MainViewModel.cs` — `IsPremium` (was `static false`, now instance + DB-backed), `PremiumUrl` set, `BrandFlashEnabled` wired to `!IsPremium`, license fields/commands/validation methods, `IsHubVisible`, startup validation - `MainWindow.xaml` — license entry panel, "Enter License Key" button, hub visibility binding, About text - `MainWindow.xaml.cs` — `BackToAbout_Click` closes both sub-panels ## Build ```bash taskkill.exe /F /IM ytLive.exe # if running "/mnt/c/Program Files/dotnet/dotnet.exe" build "C:\Users\gramp\Documents\Code\projects\ytLive\ytLive.csproj" --no-restore ``` **0 warnings, 0 errors.** ## Polar.sh resources | Resource | ID | |---|---| | Org ID | `c05fb364-b967-4f6c-adf2-8a144e46d085` | | Product | `d105dfa1-497e-423b-8cd4-e0ee2e3abbc0` | | Price | `7c1b6f70-cf8c-46df-9bc8-6703f9fa64d0` | | Benefit | `80f66bc1-d5a3-44a1-b9ea-1709ae508535` | | Checkout | `70e037cd-9bcb-414e-8b26-c82c1d268f65` | | LLAMAFOUNDER | `01a8c29f-9bb8-4e96-9cbe-417a6a5cec9b` | | LLAMA50 | `8cff803e-053f-49b4-8d12-d74d468f2943` | | Checkout URL | `https://buy.polar.sh/polar_cl_ueMy8AyAClO0o0yo19IroZwKTbD587gzUsjEW3bFapw` | | Validate endpoint | `POST https://api.polar.sh/v1/customer-portal/license-keys/validate` | | Key prefix | `LCYT-` | ## Next session 1. **TASK 20** — Hotkeys (global keyboard shortcuts) 2. **TASK 19** — Scene transitions (Cut/Fade/Move/Custom) 3. **Velopack update URL** — self-host on DO droplet (`llamacasty.com/updates`) ## v1 vision > A streaming tool that's intuitive and ready to go out-the-gate with nothing held back. > Minimal configuration — they're ready to go live or record. Eliminate the OBS pain-point completely.