Project lesson cited (the 2026-08 web-box saga, 9 commits): browser sources are fixed canvases per OBS convention — the 'gap' was a widget CSS glow, not a bug.
4.4 KiB
HANDOFF — Session State
Branch / Commit State
main, working tree clean. Web-source bounding work is DONE, verified, committed, and
PUSHED (2026-08-28) — the first push in a while; the web feature is complete and on origin.
No feature branches pre-1.0: all work lands on main per work unit.
The web-source rendering work (2026-08-28) — DONE: canvas-size viewport + ALPHA-BBOX crop
VERDICT (creator, 2026-08-28): bounding is PERFECT. Verified with a second widget resource that has no glow effect. The earlier "remaining defect / dead-space gap" was the WIDGET'S OWN GLOW effect pushing out its perceived borders — NOT a code bug. The alpha-bbox was already hugging the glow halo; with a plain widget the dashed selection border sits exactly on the widget edge.
History of failures (log wiped from MyMistakes.md per task-complete rule; see git history):
box-size rendering clipped full-bleed widgets to their upper-left chunk; JSON.stringify return
double-encoded under ExecuteScriptAsync (crop silently disabled); scrollWidth/scrollHeight at
canvas size = whole viewport for full-canvas wrappers (no trim); DOM-element-union measured an
unsettled layout on NavigationCompleted (BROKE the image); sizing the container to the crop
(ab29ec8) made things worse (reverted).
The model that shipped:
Services/WebView2Manager.cs— page renders at 1920×1080 (stable, never tracked);overflow:hidden- transparent-bg injection.
FindContentBoundsscans the Bgra32 capture per frame and crops to the bounding box of NON-TRANSPARENT pixels — the widget's true rendered extent, measured from the frame itself. No DOM query, no layout timing: it can never truncate visible content (worst case = full frame = the confirmed-good image).Stretch="Fill"maps the cropped frame flush under the selection box → the box hugs the widget on all four sides.QueryContentBoundsAsync+ the JS script are DELETED.
- transparent-bg injection.
MainWindow.xaml— web<Image>Stretch set to Fill via the IsWebSource DataTrigger (unchanged).- Invariant: render at canvas size; crop to the alpha extent; Fill to the box.
- Unit tests: 7/7 (3
FindContentBounds, 4 control-size.)
Property panel / sliders (2026-08-28): web URI ✕ clears the textbox; web ✓/✕ icon buttons
IsTabStop="False" so Tab walks X→Y→W→H→URI; Slider style IsMoveToPointEnabled="True"
restores click-anywhere-on-bar. All three confirmed fixed by the creator.
Build: 0 warnings; tests 7/7 (WebView2Manager). Rejected for the record: box-sized viewport (upper-left
truncation), fixed 1920×1080 + Uniform (letterbox dead space), CSS margin/100% reset (enlarged gap),
viewport==box (reflow/truncation/scrollbars), DOM-union crop (broke the image), container==content
auto-fit sized to the crop (ab29ec8, reverted).
Key facts / landmines
-
Why the web-box saga spun (2026-08): nine commits of in-head theorizing for a problem OBS already solved (browser source = fixed canvas, box = user-sized, content clips at the edge). The apparent gap was the widget's CSS glow, not a bug. → AGENTS.md now mandates external research on the second failed fix and proactive scans for new features.
-
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.shbefore every commit. -
Every feature change ships memory updates in the SAME commit —
TASKS.mdstatus + this file. -
No
CODING.md; conventions live inAGENTS.md+ai.md.
Next steps
- Done (2026-08-28): web-source bounding verified PERFECT and pushed. If an animated widget causes visible crop jitter later, add hysteresis as a follow-up — not queued.
- Graceful handling of navigation errors / invalid URIs (TASK 17 ×9) — only if the creator asks.
- Continue queue: TASK 18 local recording, TASK 21 media source, TASK 22 audio sync offset.