From 8e086447dcfe4485806350fdd777c4006de26929 Mon Sep 17 00:00:00 2001 From: nmzpy <246990748+nmzpy@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:36:04 +0300 Subject: [PATCH] feat(launch): auto-start recording once source is selected When the user's first click is on the Record button but no source is chosen yet, the click opens the source picker. After the user picks a source, start the recording immediately instead of requiring a second click on Record. The auto-start only applies to the flow initiated from the Record button; picking a source from the dropdown still just changes the selection (no recording), and the countdown preference is still honored. --- src/components/launch/LaunchWindow.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx index 09cca63ef..9f0a1b3af 100644 --- a/src/components/launch/LaunchWindow.tsx +++ b/src/components/launch/LaunchWindow.tsx @@ -83,6 +83,7 @@ function LaunchWindowContent() { const { elapsed, formatTime } = useRecordingTimer(recording, paused); const hudContentRef = useRef(null); const hudBarRef = useRef(null); + const pendingAutoStartRef = useRef(false); const { selectedSource, @@ -162,6 +163,12 @@ function LaunchWindowContent() { }; }, []); + useEffect(() => { + if (openId !== "sources") { + pendingAutoStartRef.current = false; + } + }, [openId]); + const { recordingHudOffset, isHudDragging, @@ -226,7 +233,13 @@ function LaunchWindowContent() { <> { + await handleSourceSelect(source); + if (pendingAutoStartRef.current) { + pendingAutoStartRef.current = false; + void toggleRecording(); + } + }} onOpen={beginInteractiveHudAction} trigger={