fix(tui): prevent Enter key infinite loop in interview notes mode
When "None of the above" was selected and the notes field was already visible but empty, pressing Enter re-opened the notes field endlessly because the guard only checked !notes (empty string is falsy). Add !notesVisible guard so auto-open only triggers on the initial selection, not when the user is confirming from an already-open notes field. Closes #3450 Closes #3449 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b4c6229360
commit
771a729eb7
1 changed files with 1 additions and 1 deletions
|
|
@ -300,7 +300,7 @@ export async function showInterviewRound(
|
|||
// instead of being trapped in a re-asking loop (bug #2715).
|
||||
// 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) {
|
||||
if (!isMultiSelect(currentIdx) && states[currentIdx].cursorIndex === noneOrDoneIdx(currentIdx) && !states[currentIdx].notes && !states[currentIdx].notesVisible) {
|
||||
states[currentIdx].notesVisible = true;
|
||||
focusNotes = true;
|
||||
loadStateToEditor();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue