From 8915a875a2b66300b902f768913b315ec1c5e053 Mon Sep 17 00:00:00 2001 From: claude code agent 227 Date: Mon, 22 Jun 2026 21:05:45 +0300 Subject: [PATCH] fix(qa): address PR #135 review notes - Add the two new strings to en-US locale ('Go to login page', 'Move to space') so they aren't missing from the base locale (review note 1). - Avatar upload: accept any image/* MIME instead of a hardcoded png/jpeg/jpg list, so webp/gif/etc. are no longer wrongly rejected client-side while genuine non-images still surface the error (review note 2). - Reindex polling: align the deadline-clearing effect with the refetchInterval stop condition (indexed >= total, empty workspace included) so the deadline clears promptly instead of waiting out the cap (review note 3). Co-Authored-By: Claude Opus 4.8 --- apps/client/public/locales/en-US/translation.json | 5 +++-- apps/client/src/components/common/avatar-uploader.tsx | 9 +++++---- .../settings/components/ai-provider-settings.tsx | 9 ++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json index d8645ffa..f0410738 100644 --- a/apps/client/public/locales/en-US/translation.json +++ b/apps/client/public/locales/en-US/translation.json @@ -1149,7 +1149,6 @@ "Thinking…": "Thinking…", "The assistant is unavailable right now. Please try again.": "The assistant is unavailable right now. Please try again.", "Public share assistant": "Public share assistant", - "Enabled": "Enabled", "Let anonymous visitors of public shares ask an AI assistant scoped to that share's pages. You pay for the tokens.": "Let anonymous visitors of public shares ask an AI assistant scoped to that share's pages. You pay for the tokens.", "Public assistant model": "Public assistant model", "Defaults to the chat model": "Defaults to the chat model", @@ -1278,5 +1277,7 @@ "Embeds run inside a sandboxed iframe with a separate origin, so they cannot read or modify the page they are embedded in.": "Embeds run inside a sandboxed iframe with a separate origin, so they cannot read or modify the page they are embedded in.", "Turning this off hides existing embeds (they render as a disabled placeholder) and stops serving them on public share pages.": "Turning this off hides existing embeds (they render as a disabled placeholder) and stops serving them on public share pages.", "Analytics / tracker": "Analytics / tracker", - "Injected verbatim into the of PUBLIC SHARE pages only (same-origin). For analytics snippets (Google Analytics, Yandex.Metrika, etc.). Admin only.": "Injected verbatim into the of PUBLIC SHARE pages only (same-origin). For analytics snippets (Google Analytics, Yandex.Metrika, etc.). Admin only." + "Injected verbatim into the of PUBLIC SHARE pages only (same-origin). For analytics snippets (Google Analytics, Yandex.Metrika, etc.). Admin only.": "Injected verbatim into the of PUBLIC SHARE pages only (same-origin). For analytics snippets (Google Analytics, Yandex.Metrika, etc.). Admin only.", + "Go to login page": "Go to login page", + "Move to space": "Move to space" } diff --git a/apps/client/src/components/common/avatar-uploader.tsx b/apps/client/src/components/common/avatar-uploader.tsx index fa288d45..ec98aa02 100644 --- a/apps/client/src/components/common/avatar-uploader.tsx +++ b/apps/client/src/components/common/avatar-uploader.tsx @@ -44,9 +44,10 @@ export default function AvatarUploader({ // Validate file type. The `accept` attribute only filters the dialog; // a user can still select a non-image file, which previously failed - // silently. Surface a visible error instead (issue #133). - const acceptedTypes = ["image/png", "image/jpeg", "image/jpg"]; - if (!acceptedTypes.includes(file.type)) { + // silently. Surface a visible error instead (issue #133). Accept any + // image/* MIME (png, jpeg, webp, gif, svg, ...) so we don't narrow below + // what the server accepts; only genuinely non-image files are rejected. + if (!file.type.startsWith("image/")) { notifications.show({ message: t("Unsupported image type"), color: "red", @@ -135,7 +136,7 @@ export default function AvatarUploader({ type="file" ref={fileInputRef} onChange={handleFileInputChange} - accept="image/png,image/jpeg,image/jpg" + accept="image/*" aria-label={ariaLabel} tabIndex={-1} style={{ display: "none" }} diff --git a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx index 4287a28a..7c7764c8 100644 --- a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx +++ b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx @@ -228,11 +228,10 @@ export default function AiProviderSettings() { // unmount because the deadline state goes away with the component. useEffect(() => { if (reindexDeadline === null) return; - if ( - settings && - settings.totalPages > 0 && - settings.indexedPages >= settings.totalPages - ) { + // "Done" matches the refetchInterval stop condition (indexed >= total), + // including an empty workspace (0 >= 0), so the deadline clears promptly + // instead of waiting out the cap. + if (settings && settings.indexedPages >= settings.totalPages) { setReindexDeadline(null); return; }