diff --git a/src/components/journal/BrainDumpScreen.tsx b/src/components/journal/BrainDumpScreen.tsx index 23516e0..aa05dd0 100644 --- a/src/components/journal/BrainDumpScreen.tsx +++ b/src/components/journal/BrainDumpScreen.tsx @@ -115,7 +115,12 @@ export function BrainDumpScreen({ onBack, onAfterSort }: BrainDumpScreenProps) { }); if (error || !data?.classifications || !Array.isArray(data.classifications)) { - setSortError(error?.message || 'Classification failed'); + // Log the raw failure so debugging stays straightforward — but show + // the user a soft, ADHD-friendly line, not the engineer-speak from + // supabase-js ("Edge Function returned a non-2xx status code") or a + // backend validation slug. The retry affordance is rendered below. + console.error('[braindump.sort] classification failed', { error, data }); + setSortError('failed'); setClassifying(false); return; } @@ -266,9 +271,38 @@ export function BrainDumpScreen({ onBack, onAfterSort }: BrainDumpScreenProps) { )} {sortError && ( -

- {sortError} -

+
+

+ {t({ + fr: "Je n'ai pas pu trier maintenant.", + en: "Couldn't sort right now.", + es: 'No pude clasificar ahora mismo.', + ja: '今は分類できませんでした。', + 'zh-Hans': '现在没能完成分类。', + 'zh-Hant': '現在沒能完成分類。', + }).primary} +

+ +
)} )}