Files
LlamaCasty/HANDOFF.md
T

85 lines
6.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HANDOFF — 2026-10-10 (desktop-"lock" fix local, uncommitted)
## At a glance
- **Branch** main (no feature branch). Pushed through `5685c5d`; everything after is local, **not
pushed** (push at the creator's call).
- Three work units in the working tree: (1) the desktop-lock fix below, (2) the TASK 51 webcam unit,
(3) the creator's pinned-chat unit. Do NOT mix them in one commit.
## Branch
- main (no feature branch). Pushed through `5685c5d` (TRAX toggle); everything after is local,
**not pushed** (push at the creator's call).
## New work unit (this handoff) — READY TO VERIFY, do not commit yet
- **Fix** for the "desktop is locked once the app starts" report — `MainWindow.xaml.cs` +
`ViewModels/MainViewModel.Background.cs` (`ShowActivated = !FullscreenGameRunningNow`, see
`bugs.md` entry 2026-10-10). Scope-locked files: `MainWindow.xaml.cs`,
`ViewModels/MainViewModel.Background.cs`, `ViewModels/MainViewModel.cs` (detector seam line),
`ytLive.Tests/DesktopLockTests.cs` (new), `bugs.md`, this file.
- **Regression tests:** `DesktopLockTests` (3 tests) drive the rule through the NEW
`FullScreenDetectorOverride` test seam (the same seam pattern as `WindowEnumeratorOverride`) —
no real Win32 foreground state is touched: full-screen game at launch ⇒ `ShowActivated=false`;
normal launch ⇒ still `true`; `FullscreenGameRunningNow` reflects the detector. Full suite
**422 passed / 0 failed / 0 warnings**. Real-app reproduction still deferred to the creator.
- **To commit later (this unit only):** the two code files + the two memory files listed above.
- Verify with the creator first: launch while an exclusive-fullscreen game is the foreground — the
game must stay live and the app must open behind/alongside it without focus steal.
## Dirty files — split by ownership
- **This work unit (COMMIT these):** `Services/BackgroundEffects/MaskSmoother.cs` (new), the smoother
wiring in `Services/CameraManager.cs`, `ytLive.Tests/CameraManagerTests.cs` (new integration test),
and the same-commit memory updates (`Services/index.md`, `ai.md`, `TASKS/task-51-webcam-bg-effects.md`,
`TASKS.md` row 51, and this file) — all ship in the SAME commit.
- **NOT mine — do NOT commit:** the in-flight "pinned chat" work unit (`Models/YouTube.cs`,
`ViewModels/MainViewModel.Chat.cs`, untracked `Helpers/RelayCommandGeneric.cs`, and **its hunks in
`Controls/LeftPanel.xaml`** — only the webcam-properties region is TASK 51; the pinned-chat hunks
stayed unstaged/untouched), plus the creator's untracked `Assets/llamacasty*` art.
- ⚠️ Pre-commit: `scripts/verify.sh` runs `scripts/scope-check.sh` against ALL working-tree changes —
the not-mine files WILL flag. Pass them to the script as declared-known (checksums unchanged since
`5685c5d`) or let the script's output be reconciled before committing.
## What just happened — two commits
1. **Jitter fix (`3057069`) — `MaskSmoother`**: per-session blend 0.75×new + 0.25×previous at the
ONE worker (`CameraManager.RunEffectWorker` → `session.Smoother.Smooth(TrySegment(source))`).
State on `CameraSession`, NOT the segmenter (shared app-wide, contract-pinned to raw output). Null
resets history; first frame passes through; never aliases caller's array; ping-pong buffers (no
per-frame LOH alloc). Weights: OBS obs-backgroundremoval 0.85 default, Jitsi 0.7/0.3 best
(0.5/0.5 smears). Test `Temporal_Smoothing_Damps_Segmentation_Jitter_Across_Frames`: x=6 → first
255 / smoothed 58 / raw-unsmoothed 0. ⚠️ Gotcha: worker guards a re-queued identical frame
reference — pump frame2 as a NEW instance.
2. **Blur "heavy" fix (this commit) — quadratic radius**: `BlurRadius(strength)` = 1 + 5·s²,
`MaxBlurRadius` 12→6 small px (≈ 24 full px max). Default 0.5 = 2 small px (was 6 under the old
linear curve) — ~3× lighter spread. Rationale: StreamFX defaults Box blur Size to 5, author stops
downscaled blurs ~8px. Test `Blur_default_strength_is_gentle_and_full_strength_is_strong` pins the
mapping and step-edge behaviour (reach 9px default vs 26px max). Point-source probes vanish below
the 0.5 rounding (3 box passes dilute a spike) — use a step edge, not a spike, to measure blur.
## Next step
- Creator verifies the desktop-lock fix: while THE DIVISION 2 (or any exclusive-fullscreen game) is the
foreground window, launch the app — the game must stay live and the app must not yank focus. Also
confirm a normal launch is unchanged. Then I can commit the unit and run the full suite when the
mouse is free.
## Tests
- Full suite **422 passed / 0 failed / 0 skipped / 0 warnings** (2026-10-10; includes the 3 new
`DesktopLockTests`). Known env flakes remain `Mix_HonorsProviderGains…` (fails while system audio
plays) and `RealMouseDrag…` (needs an idle desktop).
## Also still open
- **Vertical-format regression (STALE, not fixed):** 1080p60 vertical selection no longer shrinks the
capture border in the preview. Mechanism mapped (see prior summary): the crop Rectangle
`Controls/PreviewPane.xaml:319-322` bound to `OutputRectX/Y/W/H` + `IsOutputCropped`, driven by
`MainViewModel.Streaming.cs` `ApplyStreamQuality` from `SelectedQuality` (binding + ctor only,
`new("Vertical 1080p60", 60, 8.0, 1080, 1920)`), `DimRects` in `MainViewModel.cs:91-94`. Root cause
unknown — paused.
- **Vertical recording file closed:** the recording itself is 1080×1920 60fps correctly; the
"whitespace" was the app's preview UI, not the file. Audio loudness (`ebur128`) for the private video
was never run and the thread is closed unless the user reopens it.
- Blur-heaviness = fixed (above). Yellow-border regression = stale thread.
- ⛔ Sudo password rotation pending (user; then update both password lines in `CREDENTIALS.md`).
- TASK 56 secret scan before `gramps/LlamaCasty` goes public. TASK 55 disk hygiene queued.
## Tests
- Full suite **416 passed / 1 known env flake** at `5685c5d`; the new smoothing test passes
standalone (1 test run, Duration < 1 s after warm). 0 build warnings. Known environment flakes:
`Mix_HonorsProviderGains…` (fails while system audio plays), `RealMouseDrag…` (needs an idle desktop).