Files
LlamaCasty/HANDOFF.md
T
gramps 582d1f4b0f Web source: crop to the widget's true content rect (union of visible body elements) — bounding box tight on all four sides, pinned to (0,0)
- QueryContentBoundsAsync now returns a real JS object (not JSON.stringify — ExecuteScriptAsync
  double-encodes strings, which silently killed the old crop) and measures the union of every
  visible body element's getBoundingClientRect: the widget's actual rect, top-left offset included.
- CaptureFrame crops AT that offset (x,y) instead of from (0,0), so the widget anchors at origin
  and the box is flush on right/bottom. Fill maps the frame flush under the box.
2026-08-28 11:25:06 -07:00

3.7 KiB
Raw Blame History

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 work (2026-08-28) — CURRENT MODEL: canvas-size viewport + content crop

Root causes finally isolated: (1) hosting the page at the element-box size clips full-bleed widgets to their upper-left chunk (fixed — page now renders at the master canvas 1920×1080, stable). (2) The content-bounds crop that was supposed to kill right/bottom dead space never ran: the script returned JSON.stringify(...) (a string), and ExecuteScriptAsync JSON-encodes the result, so JsonDocument.Parse hit a string node and GetProperty threw → bounds stayed unset → no crop. ALSO the intended measure was wrong: scroll extents ≠ widget rect (they include the page's own margins). Fixed together: the script now returns a real OBJECT (union of every visible body * getBoundingClientRect), giving the widget's true rect INCLUDING its top-left offset, and CaptureFrame crops AT that offset — so the widget anchors at (0,0) and the box is tight on all four sides. Stretch="Fill" maps it flush under the box. Creator confirmed render+resize are solid at the canvas-size change; this commit delivers the tight/0,0 bounding box.

The CURRENT MODEL:

  • Services/WebView2Manager.cs — page renders at 1920×1080 (stable); overflow:hidden + transparent-bg injection; QueryContentBoundsAsync measures real widget bounds (object return from JS, NOT JSON.stringify); CaptureFrame crops at the widget's (x,y) offset → anchored 0,0.
  • MainWindow.xaml — web <Image> Stretch="Fill".
  • Invariant: render at canvas size; crop to the widget's true bounds; Fill to the box.

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 4/4. 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).

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's verdict on viewport==box (geometry-agnostic) rendering — visual check with a widget URL at several box sizes; the selection frame must snap flush with no padding.
  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.