# HANDOFF — Session State ## Branch / Commit State **`main`**, dirty working tree being committed as one unit (web source rendering fix — user-confirmed working). **NOT pushed — user rule: never push without explicit instruction (2026-08-24).** No feature branches pre-1.0: all work lands on `main` per work unit. ## The web-source rendering fix (2026-08-28) — USER-CONFIRMED WORKING **The bug:** preloaded web resources rendered truncated (upper-left only) and misbehaved as the box resized. The WebView2 control was being resized to the element box as it changed. **The fix — one idea, three-line change, the OBS/CEF pattern:** - `Services/WebView2Manager.cs` — viewport is FIXED at the master canvas size (1920×1080), never tracks the box. Control lives off-screen at (-5000,-5000). Page renders full at its designed size; the preview scales the captured frame independently via ``. This is what OBS obs-browser does (fixed-viewport texture + independent scene-item scale). Removed the PropertyChanged resize hook. Added an immediate `CaptureFrame` on `NavigationCompleted` so content appears instantly on load (was waiting for the next 100ms tick). - `ViewModels/MainViewModel.cs` — `InitWebView2` now calls `RegisterLoadedWebSources()` itself; before, registration only happened when `LoadLayout` ran after manager init, so preloaded sources never registered at startup. - `MainWindow.xaml` — scene-element `` had a LOCAL `Stretch="UniformToFill"` that outranked the Style DataTrigger (WPF precedence). Removed the local attribute; Style default is `UniformToFill`; `IsWebSource` trigger overrides to `Stretch="Uniform"` (no crop/truncation). - `ytLive.Tests/WebView2ManagerTests.cs` — 3 scale-sync tests tested the removed behavior; replaced with 2 tests asserting the fixed 1920×1080 viewport and that it does not track source dimensions. Build: 0 warnings, 0 errors. User verified it renders correctly. ## Key facts / landmines - **App running locks `ytLive.exe`** → build fails MSB3027 until creator exits the app. - **Startup diagnostics:** unhandled exceptions + checkpoints go to `%APPDATA%\ytLlive\startup.log` (`Helpers/AppLog.cs`). On a silent startup crash, read that. - **Pre-existing test failures (unrelated to web source, do not chase):** `AudioPipelineTests.Mix_HonorsProviderGains_AndGameMute_KillsTheLoopback` + `RoundClipInteractionTests.Round_Clip_Corner_Is_Grabbable_And_Shape_Is_Circle`. - **Real-MainWindow tests MUST set `LayoutPathOverride`** — DB pollution wiped real data once. - **Good Dog Rule:** ONE integration test per change; no new feature branches pre-1.0. - **Scope Lock:** declare the file list, run `scripts/scope-check.sh` before every commit. - **Every feature change ships memory updates in the SAME commit** — `TASKS.md` status + this file. - No `CODING.md`; conventions live in `AGENTS.md` + `ai.md`. ## Next steps 1. Await creator comments on the committed rendering fix; address what he raises. 2. Follow-up only if the creator asks: graceful handling of navigation errors / invalid URIs (TASK 17 ×9). 3. Continue queue: TASK 18 local recording, TASK 21 media source, TASK 22 audio sync offset.