From 12cf0f2792a2eb142020e1295b8a40be5e091828 Mon Sep 17 00:00:00 2001 From: Quick104 <31828688+Quick104@users.noreply.github.com> Date: Fri, 20 Nov 2026 23:09:23 -0500 Subject: [PATCH] fix(web): put the ChatGPT retry buttons under a warning that doesn't fit On a phone, the ChatGPT tile in AI settings shows its "could not load" warnings in a row with a Retry button. The row didn't wrap, so the warning shrank to whatever width the button left. Since #4810 let status text break anywhere, that meant a few characters per line, and a long translated button label still ran past the edge of the screen. Both retry rows now wrap: when the warning and its button don't fit on one line, the button moves below the warning. A Retry label wider than the panel, as a long translation at a large text size can be, wraps inside the button. Rows that fit on one line look the same. The setup wizard's subtitles status drops the min-w-0 and overflow-wrap classes on its live region; SettingFieldStatus now provides the same wrapping. Co-Authored-By: Claude Opus 5.5 --- .../admin-settings/ChatGPTConnection.tsx | 25 ++++++++++++++++--- .../setup-wizard/steps/SubtitlesStep.tsx | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/web/src/pages/admin-settings/ChatGPTConnection.tsx b/web/src/pages/admin-settings/ChatGPTConnection.tsx index 982e4742a2..721e94461e 100644 --- a/web/src/pages/admin-settings/ChatGPTConnection.tsx +++ b/web/src/pages/admin-settings/ChatGPTConnection.tsx @@ -29,6 +29,13 @@ type LoginAttempt = { id: string; confirmed: boolean }; /** The sign-in callback shown before the server names its own. */ const DEFAULT_CALLBACK_URI = "http://127.0.0.1:51121/auth/callback"; +/** + * A Retry button in a warning row. The row puts it below the warning when the + * two don't fit on one line, and its label wraps when it is wider than the + * panel, as a long translation at a large text size can be. + */ +const RETRY_BUTTON = "h-auto min-h-8 min-w-0 shrink py-1 text-start whitespace-normal"; + /** Which note a saved account carries in the account select. */ function accountState(account: { plan_ineligible?: boolean; @@ -254,11 +261,16 @@ function ChatGPTConnectionPanel({ {t("web.admin.settings.ai.chatgptConnection.intro")}

{status.isError ? ( -
+
{t("web.admin.settings.ai.chatgptConnection.loadFailed")} -
@@ -317,11 +329,16 @@ function ChatGPTConnectionPanel({ disabled={models.isLoading || models.isError || availableModels.length === 0} /> {models.isError ? ( -
+
{t("web.admin.settings.ai.chatgptConnection.modelsFailed")} -
diff --git a/web/src/pages/setup-wizard/steps/SubtitlesStep.tsx b/web/src/pages/setup-wizard/steps/SubtitlesStep.tsx index 295d6db914..f2c3e800d3 100644 --- a/web/src/pages/setup-wizard/steps/SubtitlesStep.tsx +++ b/web/src/pages/setup-wizard/steps/SubtitlesStep.tsx @@ -166,7 +166,7 @@ function ProviderRow({ status = ( {/* A live region, so a failed reload's new message is announced. */} - + {draft.loadFailed ? t("web.admin.settings.providers.subtitles.loadFailed") : t("web.admin.settings.providers.subtitles.saveNotConfirmed")}