-
Notifications
You must be signed in to change notification settings - Fork 0
Slideshow Record Prompt Defer
Status: Deferred 2026-06-30. Three fix attempts landed; user smoke test
still shows: Convert/Save/Cancel prompt appears only when slideshow stopped
via right-click context menu. VCR Stop, FloatingMenu Slideshow button,
mainmenu Stop, and Esc all fail to surface the prompt. User confirmed the
active saved preset has RecordSlideshow=true (saved, not just OK'd).
- Right-click context menu → Slideshow item → prompt appears.
- FloatingMenu Slideshow button (start and stop).
- VCR Stop button on
SlideshowVcrControl. - Esc key handler (ShellViewModel.cs:613).
-
a14067f—ToggleSlideshowloads active preset. Was constructingnew SlideshowConfig()(defaultRecordSlideshow=false). Replaced withSlideshowConfigLibrary.GetActive(SlideshowConfigLibrary.Load()). Hypothesis: non-context-menu paths weren't carrying the user's recording flag. Did not fix. -
a14067f— Slideshow button text toggle. AddedFloatingMenuViewModel.SlideshowButtonText; flips "Slideshow" ↔ "Stop" on Start/Stopped. Cosmetic, unrelated to prompt — still useful. -
7eb31c2— Prompt windowTopmost=true+Activate()onOpened. Hypothesis: prompt firing but obscured behind FloatingMenu (sibling non-modal child of MainWindow). Did not fix.
- Code paths converge: all three stop entry points call
_slideshow.Stop()(ShellViewModel.cs:638, ShellViewModel.cs:401, ShellViewModel.cs:613). -
Stop()cancels CTS;LoopAsyncfinallypostsStoppedto UI thread viaOnUiAsync(SlideshowEngine.cs:253) regardless of how cancellation propagated. -
Stoppedhandler (ShellViewModel.cs:675) callsFinalizeSlideshowRecordingunconditionally. -
FinalizeSlideshowRecording(ShellViewModel.cs:856) firesSlideshowRecordingReadywhen_slideshowRecorder != nullANDframes > 0. -
AvaloniaShellBootstrap.HandleSlideshowRecordingReadyAsync(AvaloniaShellBootstrap.cs:2180) is wired once; callsShowSlideshowRecordingPromptAsync.
-
_slideshowRecordernull on non-context-menu stops. Maybe the recorder lazy-build path inFrameSink(ShellViewModel.cs:821) never runs becauseFrameSinkis null at the moment frames flow. Re-entry intoStartSlideshowRecordingIfRequestedcallsDisposeSlideshowRecorder()first — ifToggleSlideshowis racing itself (double-fire from XAML Command + event), the second call could null out the recorder mid-run.-
Action: add
Console.Error.WriteLineat every branch ofFinalizeSlideshowRecordingandStartSlideshowRecordingIfRequestedplus the FrameSink lazy-build. Have user run and share log.
-
Action: add
-
Stoppedhandler fires twice / on wrong instance. The handler is wired only when_slideshow == null(first construction); engine is reused across runs. If subsequent runs construct a second engine (because something nulled_slideshow), only the original handler is wired — second engine's Stopped goes nowhere.-
Action: confirm
_slideshowfield is never reassigned after first run.
-
Action: confirm
-
framesis 0 when stop hits. Engine'sFrameSinkonly fires insideFadeAsync(SlideshowEngine.cs:529). If user stops within the firstRegionTransitionAsynccold-start where no fade runs (snapshot empty, incoming null, host not ready), no frame flows → recorder builds zero frames →frames <= 0bail at ShellViewModel.cs:872 → prompt skipped. Context menu user may naturally wait longer before stopping than VCR/button users.-
Action: drop the
frames <= 0bail or change it to always prompt (let user discard via Cancel). Or instrument the count.
-
Action: drop the
-
Stoppedevent fires beforeFrameSinkfinishes its last write. Race betweenStop()returning and the cross-fade'sawait OnUiAsync(...)resolving —_slideshowRecordercould be disposed-and-nulled in the handler while FrameSink is mid-call, throwing inside the sink. Unlikely to mask the prompt though.
Hypothesis #3 is the most consistent with user's observation
("only context menu works"): right-click flow naturally takes ~500 ms+
between click → menu open → item click → close → engine sees stop, while
button/key paths are instantaneous. If user is hitting Stop within the
first ~half-second of slideshow start, the first leg's FrameSink may
not have flushed any frames yet.
Easiest diagnostic: add a status-bar log line in FinalizeSlideshowRecording
reporting frames, _slideshowRecorder != null, and whether
SlideshowRecordingReady fired. Have user reproduce on each path and
read off the values.
- Adaptive sweep leak fix:
1591ecb. - Active-preset load + button text:
a14067f. - Topmost prompt:
7eb31c2. - Linux toy-drag (unrelated, fixed):
2cd0d11.