Files
LlamaCasty/TASKS/task-46-drawer-click-outside-close.md
gramps ecb329e578 fix(ui): drawers close on any click outside the rail — TEST was the missing third
Creator: 'when the test slide-out is active, then any click off the div should
close the div — this behaviour applies to all tabs, not just TEST.'

MainWindow.Window_PreviewMouseLeftButtonDown already closed the Stream Settings
and YPP drawers on any click outside TextPullOutHost, but its close list skipped
TestSession — so the TEST drawer never dismissed on an outside click.

Fix: run TestSession.CloseDrawerCommand in the same outside-click branch.
All three drawers share the rail host, so the containment check is unchanged.

Good Dog: ONE integration test — the existing TestStream window section now
raises a window-root PreviewMouseLeftButtonDown (source = window => outside the
rail; deterministic, no OS mouse) and asserts the TEST and Stream Settings
drawers both close. Gate: clean build 0 warnings, full vstest 318/318.
2026-09-25 08:18:25 -07:00

1.8 KiB

TASK 46 — Drawers: any click outside the rail closes the open drawer (TEST included)

Catalog: TASKS.md. Status: ✅ SHIPPED 2026-09-25.

Provenance

  • 2026-09-25, creator: "when the test slide-out is active, then any click off the div should close the div — this behaviour applies to all tabs, not just TEST."

Diagnosis

The right-rail slides (Stream Settings / YPP / TEST; TextPullOutHost in Controls/PreviewPane.xaml) already close on any click outside the rail for Stream Settings + YPP — MainWindow.Window_PreviewMouseLeftButtonDown closes BroadcastForm and Ypp when IsClickInsideDrawer is false. The handler simply omitted TestSession, so the TEST drawer never dismissed on an outside click. The XAML comment mentioned "both" — stale once a third drawer landed.

What shipped

  • MainWindow.xaml.cs — the outside-click close now also runs TestSession.CloseDrawerCommand when the TEST drawer is open (matching the other two; all three share TextPullOutHost, so the containment check is unchanged).
  • Controls/PreviewPane.xaml — comment corrected ("the rail … whichever is open").
  • ytLive.Tests/TestStreamTests.cs — section-2 window test now opens TEST and Stream Settings, raises a window-root PreviewMouseLeftButtonDown (sourced on the window, i.e. outside the rail — deterministic, no OS mouse input, immune to the fullscreen mouse-steal flake), and asserts each closes.
  • Docs: ai.md (Test Stream section), TASKS.md (row 46), HANDOFF.md rewritten.

Validation (Good Dog: ONE integration test)

TestStream_DockTooling_And_ThreeWayDrawerExclusivity — extended section 2, no new tests: the raised outside-click asserts TEST (the fixed drawer) AND Stream Settings (the pre-existing behavior) both close.

Gate: clean build 0 warnings; full vstest (captured in HANDOFF).