From 4e083da51e74df57bc467320262ef748ae9408b9 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 7 Jul 2026 16:30:14 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20Codex=20round=207=20=E2=80=94=20surface?= =?UTF-8?q?=20ask-answer=20errors=20in=20the=20open=20popover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A failed answer submission (16k reject, network error) sets the ask status to 'error', which — unlike 'expired' — deliberately keeps the question active and retryable. But the chat card that renders the error message is suppressed while the popover is open, so a composer/popover answer failed silently. Expose an 'errored' flag from useAskAnswerMode and render a warning line (com_ui_ask_answer_error) in the popover, so the user gets feedback and retry guidance without having to collapse/dismiss. It clears automatically on retry (status flips to 'submitting'). --- .../components/Chat/Input/AskUserQuestionPopover.tsx | 12 +++++++++++- client/src/hooks/Input/useAskAnswerMode.ts | 4 ++++ client/src/locales/en/translation.json | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/components/Chat/Input/AskUserQuestionPopover.tsx b/client/src/components/Chat/Input/AskUserQuestionPopover.tsx index 30125a9041..aeeaa8ac18 100644 --- a/client/src/components/Chat/Input/AskUserQuestionPopover.tsx +++ b/client/src/components/Chat/Input/AskUserQuestionPopover.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import { useWatch } from 'react-hook-form'; import { Button } from '@librechat/client'; -import { Check, ChevronDown, CornerDownLeft, X } from 'lucide-react'; +import { Check, ChevronDown, CornerDownLeft, TriangleAlert, X } from 'lucide-react'; import useAskAnswerMode from '~/hooks/Input/useAskAnswerMode'; import { useChatFormContext } from '~/Providers'; import { useLocalize } from '~/hooks'; @@ -37,6 +37,7 @@ function AskUserQuestionPopoverContent({ checked, multiSelect, locked, + errored, toggleChecked, canSubmit, submit, @@ -112,6 +113,15 @@ function AskUserQuestionPopoverContent({ ); })} + {/** A failed submission keeps the question answerable (controls stay + * enabled), but the chat card that would show the error is hidden + * while the popover is up — so surface it here for retry guidance. */} + {errored && ( +
+
+ )}