From 307ad93734eedcc6d56487188079d869c4df40cd Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 29 May 2026 03:13:58 -0700 Subject: [PATCH] Move composer note ref sync out of effect --- src/renderer/src/hooks/useComposerState.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/src/hooks/useComposerState.ts b/src/renderer/src/hooks/useComposerState.ts index 08aa47de717..2967a347c26 100644 --- a/src/renderer/src/hooks/useComposerState.ts +++ b/src/renderer/src/hooks/useComposerState.ts @@ -473,9 +473,7 @@ export function useComposerState(options: UseComposerStateOptions): UseComposerS // Why: read the latest note inside handleBaseBranchPrSelect without adding // `note` to its deps (which would rebuild the callback on every keystroke). const noteRef = useRef(note) - useEffect(() => { - noteRef.current = note - }, [note]) + noteRef.current = note const composerRef = useRef(null) const promptTextareaRef = useRef(null) const nameInputRef = useRef(null)