From 6f84002fa576dad0c423b57ad16e1b5a5c24a4af Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Thu, 21 May 2026 16:38:35 +0100 Subject: [PATCH] chore: community page fixes. --- .../features/community/pages/community-question.svelte | 10 +++++++++- .../src/lib/features/community/pages/community.svelte | 8 ++++++++ apps/dashboard/src/lib/utils/translations/da.json | 2 +- apps/dashboard/src/lib/utils/translations/de.json | 2 +- apps/dashboard/src/lib/utils/translations/en.json | 2 +- apps/dashboard/src/lib/utils/translations/es.json | 2 +- apps/dashboard/src/lib/utils/translations/fr.json | 2 +- apps/dashboard/src/lib/utils/translations/hi.json | 2 +- apps/dashboard/src/lib/utils/translations/pl.json | 2 +- apps/dashboard/src/lib/utils/translations/pt.json | 2 +- apps/dashboard/src/lib/utils/translations/ru.json | 2 +- apps/dashboard/src/lib/utils/translations/vi.json | 2 +- packages/ui/src/base/select/select-trigger.svelte | 2 +- 13 files changed, 28 insertions(+), 12 deletions(-) diff --git a/apps/dashboard/src/lib/features/community/pages/community-question.svelte b/apps/dashboard/src/lib/features/community/pages/community-question.svelte index 8ea219ba..69867376 100644 --- a/apps/dashboard/src/lib/features/community/pages/community-question.svelte +++ b/apps/dashboard/src/lib/features/community/pages/community-question.svelte @@ -31,7 +31,7 @@ question?: CommunityQuestionSuccess['data'] | null; } - let { question, backHref }: Props = $props(); + let { slug, question, backHref }: Props = $props(); let commentEditor: TiptapEditor | undefined = $state(); let isValidAnswer = false; // V2 allow admin mark an answer as accepted @@ -54,6 +54,14 @@ } }); + let isQuestionFetched = $state(false); + $effect(() => { + if (question || !slug || isQuestionFetched) return; + + communityApi.fetchCommunityQuestion({ slug }); + isQuestionFetched = true; + }); + $effect(() => { if (!$profile.id || !$currentOrg.id) return; diff --git a/apps/dashboard/src/lib/features/community/pages/community.svelte b/apps/dashboard/src/lib/features/community/pages/community.svelte index 9e2d86ed..1717f772 100644 --- a/apps/dashboard/src/lib/features/community/pages/community.svelte +++ b/apps/dashboard/src/lib/features/community/pages/community.svelte @@ -36,6 +36,14 @@ } }); + let isQuestionsFetched = $state(false); + $effect(() => { + if (questions || !$currentOrg.id || isQuestionsFetched) return; + + communityApi.fetchCommunityQuestions({ orgId: $currentOrg.id }); + isQuestionsFetched = true; + }); + let isCoursesFetched = $state(false); $effect(() => { if (!$profile.id || !$currentOrg.id || isCoursesFetched) return; diff --git a/apps/dashboard/src/lib/utils/translations/da.json b/apps/dashboard/src/lib/utils/translations/da.json index 9deea343..ab227d28 100644 --- a/apps/dashboard/src/lib/utils/translations/da.json +++ b/apps/dashboard/src/lib/utils/translations/da.json @@ -3941,7 +3941,7 @@ "error_network": "Netværksfejl. Tjek venligst din forbindelse og prøv igen.", "context_usage_tooltip": "{used} / {max} tokens brugt", "context_full_title": "Kontekstvinduet er fuldt", - "context_full_description": "Denne samtale har nået sin hukommelsesgrænse. Komprimer den for at fortsætte i denne chat, eller start en ny.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Kompakt samtale", "context_full_compacting": "Komprimerer...", "context_full_new_chat": "Start ny chat med resumé", diff --git a/apps/dashboard/src/lib/utils/translations/de.json b/apps/dashboard/src/lib/utils/translations/de.json index 8b7e7e90..75df8ad7 100644 --- a/apps/dashboard/src/lib/utils/translations/de.json +++ b/apps/dashboard/src/lib/utils/translations/de.json @@ -3941,7 +3941,7 @@ "error_network": "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.", "context_usage_tooltip": "{used} / {max} Token verwendet", "context_full_title": "Das Kontextfenster ist voll", - "context_full_description": "Diese Konversation hat ihr Speicherlimit erreicht. Komprimieren Sie es, um in diesem Chat fortzufahren, oder starten Sie einen neuen.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Kompaktes Gespräch", "context_full_compacting": "Verdichten...", "context_full_new_chat": "Neuen Chat mit Zusammenfassung starten", diff --git a/apps/dashboard/src/lib/utils/translations/en.json b/apps/dashboard/src/lib/utils/translations/en.json index 673c43b2..c26020aa 100644 --- a/apps/dashboard/src/lib/utils/translations/en.json +++ b/apps/dashboard/src/lib/utils/translations/en.json @@ -4366,7 +4366,7 @@ "error_network": "Network error. Please check your connection and try again.", "context_usage_tooltip": "{used} / {max} tokens used", "context_full_title": "Context window is full", - "context_full_description": "This conversation has reached its memory limit. Compact it to keep going in this chat, or start a new one.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Compact conversation", "context_full_compacting": "Compacting...", "context_full_new_chat": "Start new chat with summary", diff --git a/apps/dashboard/src/lib/utils/translations/es.json b/apps/dashboard/src/lib/utils/translations/es.json index 46150d54..2090ed1b 100644 --- a/apps/dashboard/src/lib/utils/translations/es.json +++ b/apps/dashboard/src/lib/utils/translations/es.json @@ -3941,7 +3941,7 @@ "error_network": "Error de red. Por favor verifique su conexión e inténtelo nuevamente.", "context_usage_tooltip": "{usados} / {max} tokens usados", "context_full_title": "La ventana de contexto está llena", - "context_full_description": "Esta conversación ha alcanzado su límite de memoria. Compactarlo para continuar en este chat o iniciar uno nuevo.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Conversación compacta", "context_full_compacting": "Compactando...", "context_full_new_chat": "Iniciar nuevo chat con resumen", diff --git a/apps/dashboard/src/lib/utils/translations/fr.json b/apps/dashboard/src/lib/utils/translations/fr.json index ae83cc0e..1bd9dc00 100644 --- a/apps/dashboard/src/lib/utils/translations/fr.json +++ b/apps/dashboard/src/lib/utils/translations/fr.json @@ -3941,7 +3941,7 @@ "error_network": "Erreur réseau. Veuillez vérifier votre connexion et réessayer.", "context_usage_tooltip": "{utilisé} / {max} jetons utilisés", "context_full_title": "La fenêtre contextuelle est pleine", - "context_full_description": "Cette conversation a atteint sa limite de mémoire. Compactez-le pour continuer dans cette discussion ou démarrez-en une nouvelle.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Conversation compacte", "context_full_compacting": "Compactage...", "context_full_new_chat": "Démarrer une nouvelle discussion avec résumé", diff --git a/apps/dashboard/src/lib/utils/translations/hi.json b/apps/dashboard/src/lib/utils/translations/hi.json index 89857202..e24d3cfa 100644 --- a/apps/dashboard/src/lib/utils/translations/hi.json +++ b/apps/dashboard/src/lib/utils/translations/hi.json @@ -3941,7 +3941,7 @@ "error_network": "नेटवर्क त्रुटि। अपने कनेक्शन की जांच करें और पुन: प्रयास करें।", "context_usage_tooltip": "{प्रयुक्त} / {अधिकतम} टोकन का उपयोग किया गया", "context_full_title": "प्रसंग विंडो भरी हुई है", - "context_full_description": "यह बातचीत अपनी स्मृति सीमा तक पहुंच गई है. इस चैट को जारी रखने के लिए, या एक नई शुरुआत करने के लिए इसे संक्षिप्त करें।", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "संक्षिप्त बातचीत", "context_full_compacting": "संघनन...", "context_full_new_chat": "सारांश के साथ नई चैट प्रारंभ करें", diff --git a/apps/dashboard/src/lib/utils/translations/pl.json b/apps/dashboard/src/lib/utils/translations/pl.json index 43c3b122..6e98ea1f 100644 --- a/apps/dashboard/src/lib/utils/translations/pl.json +++ b/apps/dashboard/src/lib/utils/translations/pl.json @@ -3941,7 +3941,7 @@ "error_network": "Błąd sieci. Sprawdź połączenie i spróbuj ponownie.", "context_usage_tooltip": "Wykorzystano {used} / {max} tokenów", "context_full_title": "Okno kontekstowe jest pełne", - "context_full_description": "W tej rozmowie osiągnięto limit pamięci. Kompaktuj go, aby kontynuować udział w tym czacie, lub rozpocznij nowy.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Kompaktowa rozmowa", "context_full_compacting": "Zagęszczanie...", "context_full_new_chat": "Rozpocznij nowy czat z podsumowaniem", diff --git a/apps/dashboard/src/lib/utils/translations/pt.json b/apps/dashboard/src/lib/utils/translations/pt.json index 8f447a0e..298508d3 100644 --- a/apps/dashboard/src/lib/utils/translations/pt.json +++ b/apps/dashboard/src/lib/utils/translations/pt.json @@ -3941,7 +3941,7 @@ "error_network": "Erro de rede. Verifique sua conexão e tente novamente.", "context_usage_tooltip": "{usados} / {max} tokens usados", "context_full_title": "A janela de contexto está cheia", - "context_full_description": "Esta conversa atingiu o limite de memória. Compacte-o para continuar neste bate-papo ou iniciar um novo.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Conversa compacta", "context_full_compacting": "Compactando...", "context_full_new_chat": "Iniciar novo bate-papo com resumo", diff --git a/apps/dashboard/src/lib/utils/translations/ru.json b/apps/dashboard/src/lib/utils/translations/ru.json index 7e0e28d7..4102f179 100644 --- a/apps/dashboard/src/lib/utils/translations/ru.json +++ b/apps/dashboard/src/lib/utils/translations/ru.json @@ -3941,7 +3941,7 @@ "error_network": "Ошибка сети. Пожалуйста, проверьте подключение и повторите попытку.", "context_usage_tooltip": "{used} / {max} использовано токенов", "context_full_title": "Контекстное окно заполнено", - "context_full_description": "Этот разговор достиг предела памяти. Сожмите его, чтобы продолжить общение в этом чате, или начните новый.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Компактный разговор", "context_full_compacting": "Уплотнение...", "context_full_new_chat": "Начать новый чат с кратким описанием", diff --git a/apps/dashboard/src/lib/utils/translations/vi.json b/apps/dashboard/src/lib/utils/translations/vi.json index ae0e61b9..6ce6edaa 100644 --- a/apps/dashboard/src/lib/utils/translations/vi.json +++ b/apps/dashboard/src/lib/utils/translations/vi.json @@ -3941,7 +3941,7 @@ "error_network": "Lỗi mạng. Vui lòng kiểm tra kết nối của bạn và thử lại.", "context_usage_tooltip": "Đã sử dụng mã thông báo {used} / {max}", "context_full_title": "Cửa sổ ngữ cảnh đã đầy", - "context_full_description": "Cuộc trò chuyện này đã đạt đến giới hạn bộ nhớ. Hãy thu gọn nó để tiếp tục tham gia cuộc trò chuyện này hoặc bắt đầu một cuộc trò chuyện mới.", + "context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.", "context_full_compact": "Cuộc trò chuyện nhỏ gọn", "context_full_compacting": "Đang nén...", "context_full_new_chat": "Bắt đầu cuộc trò chuyện mới với bản tóm tắt", diff --git a/packages/ui/src/base/select/select-trigger.svelte b/packages/ui/src/base/select/select-trigger.svelte index f88b34ba..eb63dc3d 100644 --- a/packages/ui/src/base/select/select-trigger.svelte +++ b/packages/ui/src/base/select/select-trigger.svelte @@ -19,7 +19,7 @@ data-slot="select-trigger" data-size={size} class={cn( - "ui:border-input ui:data-placeholder:text-muted-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:dark:hover:bg-input/50 ui:shadow-xs ui:flex ui:w-fit ui:select-none ui:items-center ui:justify-between ui:gap-2 ui:whitespace-nowrap ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-sm ui:outline-none ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:data-disabled:cursor-not-allowed ui:data-disabled:opacity-50 ui:data-[size=default]:h-9 ui:data-[size=sm]:h-8 ui:**:data-[slot=select-value]:line-clamp-1 ui:**:data-[slot=select-value]:flex ui:**:data-[slot=select-value]:items-center ui:**:data-[slot=select-value]:gap-2 ui:[&_svg:not([class*='size-'])]:size-4 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0", + "ui:border-input ui:data-placeholder:text-muted-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:dark:hover:bg-input/50 ui:shadow-xs ui:flex ui:w-fit ui:max-w-full ui:min-w-0 ui:select-none ui:items-center ui:justify-between ui:gap-2 ui:whitespace-nowrap ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-sm ui:outline-none ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:data-disabled:cursor-not-allowed ui:data-disabled:opacity-50 ui:data-[size=default]:h-9 ui:data-[size=sm]:h-8 ui:**:data-[slot=select-value]:line-clamp-1 ui:**:data-[slot=select-value]:flex ui:**:data-[slot=select-value]:items-center ui:**:data-[slot=select-value]:gap-2 ui:[&_svg:not([class*='size-'])]:size-4 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0", className )} {...restProps}