From f153745c4f4775e0bc697aac24eb0623c31d9033 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 4 Apr 2026 11:12:17 -0500 Subject: [PATCH] fix: break infinite notes loop when selecting "None of the above" goNextOrSubmit() unconditionally reopened the notes field whenever the cursor sat on the "None of the above" slot, even after the user had already typed a note and pressed Enter. This trapped users in an endless loop where Enter always bounced back to notes mode. Add a `!states[currentIdx].notes` guard so the auto-open only fires when notes are still empty. Fixes #3502 --- src/resources/extensions/shared/interview-ui.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/shared/interview-ui.ts b/src/resources/extensions/shared/interview-ui.ts index 99a3501b8..f07112597 100644 --- a/src/resources/extensions/shared/interview-ui.ts +++ b/src/resources/extensions/shared/interview-ui.ts @@ -298,7 +298,9 @@ export async function showInterviewRound( // Auto-open the notes field when "None of the above" is selected // so the user can immediately provide a free-text explanation // instead of being trapped in a re-asking loop (bug #2715). - if (!isMultiSelect(currentIdx) && states[currentIdx].cursorIndex === noneOrDoneIdx(currentIdx)) { + // Only auto-open if the user hasn't already provided notes — + // otherwise Enter from notes mode loops back here endlessly. + if (!isMultiSelect(currentIdx) && states[currentIdx].cursorIndex === noneOrDoneIdx(currentIdx) && !states[currentIdx].notes) { states[currentIdx].notesVisible = true; focusNotes = true; loadStateToEditor();