Files
LlamaCasty/HANDOFF.md
T

5.1 KiB

HANDOFF — Session State

Branch

task25-backgrounds @ 7dd140a — committed and pushed (includes TASK 24 b400ab5). Working tree clean.

Shipped: TASK 25 background consolidation (+ TASK 24 toasts beneath it)

Locked model (user directive): exactly ONE "Background" per screen at index 0, non-deletable/ non-reorderable, NOT in the (+) menu; capture context-sensitivity only on the Live screen (Show Desktop/monitor switching kept intact); exactly five default images in the DB; stale rows cleaned.

  1. Seeders consolidated (ViewModels/MainViewModel.cs): five clone seeders + EnforceBackgroundPolicy deleted. Now: EnsureBackground → CreateBackground(name) — Live = DisplayCapture row, others = static Background art row, all named "Background". NormalizeBackgrounds(scenes) heals any layout: correct-flavor keep (in-place Type conversion re-asserts IsBackground because Source.Type's setter derives it), duplicates dropped, missing seeded + INSERTED, index 0, non-canonical stripped. HealBackgrounds() = Normalize + StampDefaultBackgroundAsset (pack-resource art via AddAsset; custom Browse wins). Called from LoadLayout, StagedScene setter, ReacquireScreenCaptures.
  2. Settings purge: LayoutStore.Save deletes orphaned BackgroundUseDefault_{id}/BackgroundPath_{id} keys (ids gone from Source). Fixes the real DB's 16 stale keys.
  3. UI: (+) menu Screen+Background items removed (MainWindow.xaml); AddSource refuses capture/background params. CanChangeBackground = staged-is-Live → gates preview CanvasGrid menu directly and the layer-row menu via new MultiBinding converter Helpers/AllTrueToVisibilityConverter.cs (row Tag carries VM bool).
  4. Mini rule: minis never render captures. LoadBackgroundImage is flavor-blind (IsBackground) — fixes green mini bug (was Type==Background, missed Live's DisplayCapture row → placeholder twin at old :951 too); RefreshSnapshotsAsync shows green placeholder only while Live is staged, otherwise its stored art.
  5. Tests: suite 221/218 → 223 total, 220 pass. The ONE integration test: BackgroundHealIntegrationTests.Dirty_Layout_Heals_To_One_Locked_Background_Per_Scene (seeds dirty temp DB, real window, asserts heal + save purges keys). Unit: SceneCatalogTests rewritten (NormalizeBackgrounds heal + strip + per-scene flavor), BackgroundTests empty-scene flavor updated, SourceNamingTests filters IsBackground. The two stale landmine tests (#2/#3) are healed by this branch — see below.
  6. Docs same commit: ai.md (TASK 25 model section replaces backdrop-era text), TASKS.md TASK 25 entry, Services/index.md (LayoutStore purge), Helpers/index.md (new converter), this file.
  7. Build 0 warnings.

⚠️ Landmines

  • User verdict (2026-08-23): "The AI wrote fucked up code after repeatedly and intentionally misunderstanding instructions." Extends the ai.md 2026-08-22 audit flag — trust nothing from those sessions without manual verification.
  • Pre-existing test failure is now ONE (not caused by these branches):
    1. AudioPipelineTests.Mix_HonorsProviderGains_AndGameMute_KillsTheLoopback
    • Former #2 SourceNaming / #3 SceneCatalog policy tests were repaired BY TASK 25 (expectation updates to the locked model) — not skipped, not deleted.
  • Real-MainWindow tests MUST set LayoutPathOverride (ai.md) — DB pollution wiped real data once.
  • Source.Type setter derives IsBackground (Models/Source.cs:40) — any Type change must re-set IsBackground after.
  • vstest quirk: only one --tests: param allowed; plain substrings work (--tests:BackgroundHeal), alternation regexes silently match nothing.
  • Notification.Wpf gotchas (ai.md/TASKS.md): area routing by XAML Name; unknown AreaName silently drops; NeverExpires() = TimeSpan.MaxValue; ToHex() = #AARRGGBB.

Next steps

  1. Commit this branch (code + docs, one commit), then merge/PR per Good Dog Rule (one integration test ✓).
  2. User visual pass on Windows: minis show art when unstaged (Live included), green placeholder while staged; no Game Capture rows in layer lists; (+) menu trimmed; capture controls only on staged Live.
  3. Then relaunch app once so the user's real %APPDATA% DB self-heals on load + first save purges stale keys.

Build

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"
"/mnt/c/Program Files/dotnet/dotnet.exe" vstest "C:\Users\gramp\Documents\Code\projects\ytLive\ytLive.Tests\bin\Debug\net8.0-windows10.0.19041.0\ytLive.Tests.dll"

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 URL https://buy.polar.sh/polar_cl_ueMy8AyAClO0o0yo19IroZwKTbD587gzUsjEW3bFapw
Validate endpoint POST https://api.polar.sh/v1/customer-portal/license-keys/validate
Key prefix LCYT-

v1 vision

A streaming tool so intuitive it needs no manual — go live or record in minutes, OBS-free.