diff --git a/client/src/components/shared/ErrorBoundary.test.tsx b/client/src/components/shared/ErrorBoundary.test.tsx
index be5e7b7ed..b4f349973 100644
--- a/client/src/components/shared/ErrorBoundary.test.tsx
+++ b/client/src/components/shared/ErrorBoundary.test.tsx
@@ -205,7 +205,20 @@ describe('ErrorBoundary', () => {
);
// --m-* only resolves inside MobileShell's .m-root; the desktop classes would
// render an invisible card there.
- expect(screen.getByRole('alert').className).toContain('bg-m-card');
+ expect(screen.getByRole('alert').querySelector('.bg-m-card')).not.toBeNull();
+ expect(screen.getByRole('alert').querySelector('.bg-surface-card')).toBeNull();
+ });
+
+ it('FE-COMP-ERRBOUND-014b: the technical message stays for an issue report, folded away', () => {
+ render(
+
+
+ ,
+ );
+ // The message stays in the page for an issue report, inside a closed details.
+ const details = screen.getByText('kaboom').closest('details') as HTMLDetailsElement;
+ expect(details).not.toBeNull();
+ expect(details.open).toBe(false);
});
});
diff --git a/client/src/components/shared/ErrorBoundary.tsx b/client/src/components/shared/ErrorBoundary.tsx
index 78452e614..31bf0b513 100644
--- a/client/src/components/shared/ErrorBoundary.tsx
+++ b/client/src/components/shared/ErrorBoundary.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-import { AlertTriangle, RefreshCw, RotateCcw } from 'lucide-react'
+import { AlertTriangle, RefreshCw, RotateCcw, Sparkles } from 'lucide-react'
import { useTranslation } from '../../i18n'
import { isChunkLoadError, reloadOnceForChunk, reloadOntoCurrentBuild } from '../../utils/chunkReload'
@@ -131,55 +131,74 @@ export function ErrorFallback({ error, reset, isChunkError, level, variant, labe
: isPanel ? t('common.errorPanelBody') : t('common.errorBody')
const message = error instanceof Error ? error.message : null
+ const Icon = isChunkError ? Sparkles : AlertTriangle
+ const muted = mobile ? 'text-m-muted' : 'text-content-secondary'
return (
-
-
-
{title}
- {label &&
{label}
}
-
{body}
-
+ {/* One calm card, the way a native app reports it: a round symbol, a short
+ title and line, and one clear action. */}
+
+
+
+
+
+
{title}
+ {label &&
{label}
}
+
{body}
+
- {/* Worth showing: TREK is self-hosted, so the person seeing this is often the
- same person who will paste it into an issue. */}
- {message && (
-
- {message}
-
- )}
+
+ {(!isPanel || isChunkError) && (
+
+ )}
+ {/* No retry for a dead chunk — React.lazy would throw again immediately. */}
+ {!isChunkError && (
+
+ )}
+
-
- {/* No retry for a dead chunk — React.lazy would throw again immediately. */}
- {!isChunkError && (
-
- )}
- {(!isPanel || isChunkError) && (
-
+ {/* Kept, folded away: TREK is self-hosted, so the person seeing this is
+ often the same person who will paste it into an issue. */}
+ {message && (
+
+ {t('common.errorDetails')}
+ {message}
+
)}
- {isChunkError ? 'A new version is available' : 'TREK could not start'}
-
-
- {isChunkError
- ? 'TREK was updated while this tab was open. Reload to get the new version.'
- : 'Reloading usually fixes this. Your data is safe.'}
-
- {message && {message}}
-
+
+
+
+
+
+
+ {isChunkError ? 'A new version is available' : 'TREK could not start'}
+
+
+ {isChunkError
+ ? 'TREK was updated while this tab was open. Reload to get the new version.'
+ : 'Reloading usually fixes this. Your data is safe.'}
+
)
}
diff --git a/shared/src/i18n/ar/common.ts b/shared/src/i18n/ar/common.ts
index 19ef27314..c85429084 100644
--- a/shared/src/i18n/ar/common.ts
+++ b/shared/src/i18n/ar/common.ts
@@ -88,5 +88,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'تم تحديث TREK أثناء فتح علامة التبويب هذه. أعد التحميل للحصول على الإصدار الجديد.',
'common.errorPluginTitle': 'تعذّر عرض هذه الإضافة',
'common.needsConnection': 'يتطلب هذا اتصالاً. حاول مرة أخرى عندما يعود TREK للاتصال.',
+ 'common.errorDetails': 'التفاصيل',
};
export default common;
diff --git a/shared/src/i18n/az/common.ts b/shared/src/i18n/az/common.ts
index d7885f85d..2314046fc 100644
--- a/shared/src/i18n/az/common.ts
+++ b/shared/src/i18n/az/common.ts
@@ -80,5 +80,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'Bu səhifə açıq olarkən TREK yeniləndi. Yeni versiyanı əldə etmək üçün səhifəni yenilə.',
'common.errorPluginTitle': 'Bu plagini göstərmək mümkün olmadı',
'common.needsConnection': 'Bunun üçün bağlantı lazımdır. TREK yenidən onlayn olduqda bir daha cəhd edin.',
+ 'common.errorDetails': 'Təfərrüatlar',
};
export default common;
diff --git a/shared/src/i18n/br/common.ts b/shared/src/i18n/br/common.ts
index 270345466..f481d817a 100644
--- a/shared/src/i18n/br/common.ts
+++ b/shared/src/i18n/br/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'O TREK foi atualizado enquanto esta aba estava aberta. Recarregue para obter a nova versão.',
'common.errorPluginTitle': 'Não foi possível exibir este plugin',
'common.needsConnection': 'Isso precisa de conexão. Tente de novo quando o TREK voltar a ficar online.',
+ 'common.errorDetails': 'Detalhes',
};
export default common;
diff --git a/shared/src/i18n/ca/common.ts b/shared/src/i18n/ca/common.ts
index fe21f0503..7ade04072 100644
--- a/shared/src/i18n/ca/common.ts
+++ b/shared/src/i18n/ca/common.ts
@@ -82,5 +82,6 @@ const common: TranslationStrings = {
"TREK s'ha actualitzat mentre aquesta pestanya era oberta. Torna a carregar per obtenir la versió nova.",
'common.errorPluginTitle': "No s'ha pogut mostrar aquest connector",
'common.needsConnection': 'Això necessita connexió. Torna-ho a provar quan TREK torni a estar en línia.',
+ 'common.errorDetails': 'Detalls',
};
export default common;
diff --git a/shared/src/i18n/cs/common.ts b/shared/src/i18n/cs/common.ts
index da0ad2eb4..692475251 100644
--- a/shared/src/i18n/cs/common.ts
+++ b/shared/src/i18n/cs/common.ts
@@ -82,5 +82,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK byl aktualizován, zatímco byla tato karta otevřená. Načtěte znovu pro novou verzi.',
'common.errorPluginTitle': 'Tento plugin se nepodařilo zobrazit',
'common.needsConnection': 'Na tohle je potřeba připojení. Zkus to znovu, až bude TREK zase online.',
+ 'common.errorDetails': 'Podrobnosti',
};
export default common;
diff --git a/shared/src/i18n/de/common.ts b/shared/src/i18n/de/common.ts
index c68a9c007..870504e85 100644
--- a/shared/src/i18n/de/common.ts
+++ b/shared/src/i18n/de/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK wurde aktualisiert, während dieser Tab offen war. Lade neu, um die neue Version zu erhalten.',
'common.errorPluginTitle': 'Dieses Plugin konnte nicht angezeigt werden',
'common.needsConnection': 'Dafür braucht es eine Verbindung. Versuch es noch einmal, sobald TREK wieder online ist.',
+ 'common.errorDetails': 'Details', // same-as-en
};
export default common;
diff --git a/shared/src/i18n/en/common.ts b/shared/src/i18n/en/common.ts
index 6ad3fbd85..0472d156f 100644
--- a/shared/src/i18n/en/common.ts
+++ b/shared/src/i18n/en/common.ts
@@ -80,5 +80,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK was updated while this tab was open. Reload to get the new version.',
'common.errorPluginTitle': 'This plugin could not be shown',
'common.needsConnection': 'This needs a connection. Try again once TREK is back online.',
+ 'common.errorDetails': 'Details',
};
export default common;
diff --git a/shared/src/i18n/es/common.ts b/shared/src/i18n/es/common.ts
index 3ff33b65b..82604fc62 100644
--- a/shared/src/i18n/es/common.ts
+++ b/shared/src/i18n/es/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK se actualizó mientras esta pestaña estaba abierta. Recarga para obtener la nueva versión.',
'common.errorPluginTitle': 'No se pudo mostrar este plugin',
'common.needsConnection': 'Esto necesita conexión. Vuelve a intentarlo cuando TREK esté de nuevo en línea.',
+ 'common.errorDetails': 'Detalles',
};
export default common;
diff --git a/shared/src/i18n/et/common.ts b/shared/src/i18n/et/common.ts
index 3acd1c202..3db16b6f4 100644
--- a/shared/src/i18n/et/common.ts
+++ b/shared/src/i18n/et/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREKi uuendati ajal, kui see vahekaart oli avatud. Uue versiooni kasutamiseks laadi leht uuesti.',
'common.errorPluginTitle': 'Seda pluginat ei saanud kuvada',
'common.needsConnection': 'Selleks on vaja ühendust. Proovi uuesti, kui TREK on taas võrgus.',
+ 'common.errorDetails': 'Üksikasjad',
};
export default common;
diff --git a/shared/src/i18n/fr/common.ts b/shared/src/i18n/fr/common.ts
index 986c3db63..019e90a62 100644
--- a/shared/src/i18n/fr/common.ts
+++ b/shared/src/i18n/fr/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK a été mis à jour pendant que cet onglet était ouvert. Rechargez pour obtenir la nouvelle version.',
'common.errorPluginTitle': "Ce plugin n'a pas pu être affiché",
'common.needsConnection': 'Cela nécessite une connexion. Réessaie dès que TREK sera de nouveau en ligne.',
+ 'common.errorDetails': 'Détails',
};
export default common;
diff --git a/shared/src/i18n/gr/common.ts b/shared/src/i18n/gr/common.ts
index 5600be833..c10fa5d15 100644
--- a/shared/src/i18n/gr/common.ts
+++ b/shared/src/i18n/gr/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'Το TREK ενημερώθηκε ενώ αυτή η καρτέλα ήταν ανοιχτή. Κάντε επαναφόρτωση για τη νέα έκδοση.',
'common.errorPluginTitle': 'Δεν ήταν δυνατή η εμφάνιση αυτού του πρόσθετου',
'common.needsConnection': 'Αυτό χρειάζεται σύνδεση. Δοκίμασε ξανά μόλις το TREK συνδεθεί ξανά.',
+ 'common.errorDetails': 'Λεπτομέρειες',
};
export default common;
diff --git a/shared/src/i18n/he/common.ts b/shared/src/i18n/he/common.ts
index 83645741e..887da8c75 100644
--- a/shared/src/i18n/he/common.ts
+++ b/shared/src/i18n/he/common.ts
@@ -82,6 +82,7 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK עודכן בזמן שהלשונית הייתה פתוחה. רעננו כדי לקבל את הגרסה החדשה.',
'common.errorPluginTitle': 'לא ניתן להציג את התוסף הזה',
'common.needsConnection': 'הפעולה הזו דורשת חיבור. נסו שוב כש-TREK יחזור לרשת.',
+ 'common.errorDetails': 'פרטים',
};
export default common;
diff --git a/shared/src/i18n/hu/common.ts b/shared/src/i18n/hu/common.ts
index b5d987c8e..6b2f1bc09 100644
--- a/shared/src/i18n/hu/common.ts
+++ b/shared/src/i18n/hu/common.ts
@@ -80,5 +80,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'A TREK frissült, amíg ez a lap nyitva volt. Töltse újra az új verzióért.',
'common.errorPluginTitle': 'Ezt a bővítményt nem sikerült megjeleníteni',
'common.needsConnection': 'Ehhez kapcsolat kell. Próbáld újra, amint a TREK újra online lesz.',
+ 'common.errorDetails': 'Részletek',
};
export default common;
diff --git a/shared/src/i18n/id/common.ts b/shared/src/i18n/id/common.ts
index 5c38fe1a8..39471b441 100644
--- a/shared/src/i18n/id/common.ts
+++ b/shared/src/i18n/id/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK diperbarui saat tab ini terbuka. Muat ulang untuk mendapatkan versi baru.',
'common.errorPluginTitle': 'Plugin ini tidak dapat ditampilkan',
'common.needsConnection': 'Ini memerlukan koneksi. Coba lagi begitu TREK kembali online.',
+ 'common.errorDetails': 'Detail',
};
export default common;
diff --git a/shared/src/i18n/it/common.ts b/shared/src/i18n/it/common.ts
index 76ec7a8c0..ab8bc996e 100644
--- a/shared/src/i18n/it/common.ts
+++ b/shared/src/i18n/it/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK è stato aggiornato mentre questa scheda era aperta. Ricarica per ottenere la nuova versione.',
'common.errorPluginTitle': 'Impossibile mostrare questo plugin',
'common.needsConnection': 'Serve una connessione. Riprova quando TREK tornerà online.',
+ 'common.errorDetails': 'Dettagli',
};
export default common;
diff --git a/shared/src/i18n/ja/common.ts b/shared/src/i18n/ja/common.ts
index 726a34ab4..6c80a03a1 100644
--- a/shared/src/i18n/ja/common.ts
+++ b/shared/src/i18n/ja/common.ts
@@ -79,5 +79,6 @@ const common: TranslationStrings = {
'このタブを開いている間に TREK が更新されました。再読み込みして新しいバージョンを取得してください。',
'common.errorPluginTitle': 'このプラグインを表示できませんでした',
'common.needsConnection': 'この操作には接続が必要です。TREK がオンラインに戻ってから、もう一度お試しください。',
+ 'common.errorDetails': '詳細',
};
export default common;
diff --git a/shared/src/i18n/ko/common.ts b/shared/src/i18n/ko/common.ts
index 180192442..bf1cadf28 100644
--- a/shared/src/i18n/ko/common.ts
+++ b/shared/src/i18n/ko/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': '이 탭이 열려 있는 동안 TREK이 업데이트되었습니다. 새로고침하여 새 버전을 받으세요.',
'common.errorPluginTitle': '이 플러그인을 표시할 수 없습니다',
'common.needsConnection': '연결이 필요한 작업입니다. TREK가 다시 온라인이 되면 다시 시도하세요.',
+ 'common.errorDetails': '세부 정보',
};
export default common;
diff --git a/shared/src/i18n/nl/common.ts b/shared/src/i18n/nl/common.ts
index 1fa9af6df..97e3de8d7 100644
--- a/shared/src/i18n/nl/common.ts
+++ b/shared/src/i18n/nl/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK is bijgewerkt terwijl dit tabblad open stond. Herlaad om de nieuwe versie te krijgen.',
'common.errorPluginTitle': 'Deze plug-in kon niet worden getoond',
'common.needsConnection': 'Hiervoor is een verbinding nodig. Probeer het opnieuw zodra TREK weer online is.',
+ 'common.errorDetails': 'Details', // same-as-en
};
export default common;
diff --git a/shared/src/i18n/pl/common.ts b/shared/src/i18n/pl/common.ts
index 8e9e780a7..3f7e57a28 100644
--- a/shared/src/i18n/pl/common.ts
+++ b/shared/src/i18n/pl/common.ts
@@ -84,5 +84,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK został zaktualizowany, gdy ta karta była otwarta. Odśwież, aby pobrać nową wersję.',
'common.errorPluginTitle': 'Nie udało się wyświetlić tej wtyczki',
'common.needsConnection': 'To wymaga połączenia. Spróbuj ponownie, gdy TREK znów będzie online.',
+ 'common.errorDetails': 'Szczegóły',
};
export default common;
diff --git a/shared/src/i18n/ru/common.ts b/shared/src/i18n/ru/common.ts
index 121c0b336..c175439cb 100644
--- a/shared/src/i18n/ru/common.ts
+++ b/shared/src/i18n/ru/common.ts
@@ -85,5 +85,6 @@ const common: TranslationStrings = {
'TREK обновился, пока эта вкладка была открыта. Обновите страницу, чтобы получить новую версию.',
'common.errorPluginTitle': 'Не удалось показать этот плагин',
'common.needsConnection': 'Для этого нужно подключение. Попробуйте ещё раз, когда TREK снова будет онлайн.',
+ 'common.errorDetails': 'Подробности',
};
export default common;
diff --git a/shared/src/i18n/sk/common.ts b/shared/src/i18n/sk/common.ts
index ed39b4fab..b29ee14a1 100644
--- a/shared/src/i18n/sk/common.ts
+++ b/shared/src/i18n/sk/common.ts
@@ -83,5 +83,6 @@ const common: TranslationStrings = {
'TREK bol aktualizovaný, kým bola táto karta otvorená. Znova načítajte stránku pre novú verziu.',
'common.errorPluginTitle': 'Tento plugin sa nepodarilo zobraziť',
'common.needsConnection': 'Na toto je potrebné pripojenie. Skús to znova, keď bude TREK opäť online.',
+ 'common.errorDetails': 'Podrobnosti',
};
export default common;
diff --git a/shared/src/i18n/sv/common.ts b/shared/src/i18n/sv/common.ts
index 8cfe0c27e..76641a24d 100644
--- a/shared/src/i18n/sv/common.ts
+++ b/shared/src/i18n/sv/common.ts
@@ -81,5 +81,6 @@ const common: TranslationStrings = {
'TREK uppdaterades medan den här fliken var öppen. Ladda om för att hämta den nya versionen.',
'common.errorPluginTitle': 'Det här tillägget kunde inte visas',
'common.needsConnection': 'Det här kräver en anslutning. Försök igen när TREK är online igen.',
+ 'common.errorDetails': 'Detaljer',
};
export default common;
diff --git a/shared/src/i18n/th/common.ts b/shared/src/i18n/th/common.ts
index 9e5e0d43f..041082dcd 100644
--- a/shared/src/i18n/th/common.ts
+++ b/shared/src/i18n/th/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK ได้รับการอัปเดตขณะที่แท็บนี้เปิดอยู่ โหลดซ้ำเพื่อรับเวอร์ชันใหม่',
'common.errorPluginTitle': 'ไม่สามารถแสดงปลั๊กอินนี้ได้',
'common.needsConnection': 'การทำงานนี้ต้องใช้การเชื่อมต่อ ลองอีกครั้งเมื่อ TREK กลับมาออนไลน์',
+ 'common.errorDetails': 'รายละเอียด',
};
export default common;
diff --git a/shared/src/i18n/tr/common.ts b/shared/src/i18n/tr/common.ts
index 6367c32c9..7123d1e96 100644
--- a/shared/src/i18n/tr/common.ts
+++ b/shared/src/i18n/tr/common.ts
@@ -80,5 +80,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'Bu sekme açıkken TREK güncellendi. Yeni sürümü almak için sayfayı yenileyin.',
'common.errorPluginTitle': 'Bu eklenti gösterilemedi',
'common.needsConnection': 'Bunun için bağlantı gerekiyor. TREK yeniden çevrimiçi olduğunda tekrar dene.',
+ 'common.errorDetails': 'Ayrıntılar',
};
export default common;
diff --git a/shared/src/i18n/uk/common.ts b/shared/src/i18n/uk/common.ts
index d5fbee423..efe5cf022 100644
--- a/shared/src/i18n/uk/common.ts
+++ b/shared/src/i18n/uk/common.ts
@@ -84,5 +84,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK оновився, поки ця вкладка була відкрита. Перезавантажте, щоб отримати нову версію.',
'common.errorPluginTitle': 'Не вдалося показати цей плагін',
'common.needsConnection': "Для цього потрібне з'єднання. Спробуйте ще раз, коли TREK знову буде онлайн.",
+ 'common.errorDetails': 'Подробиці',
};
export default common;
diff --git a/shared/src/i18n/vi/common.ts b/shared/src/i18n/vi/common.ts
index de07531b7..2097e039c 100644
--- a/shared/src/i18n/vi/common.ts
+++ b/shared/src/i18n/vi/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': 'TREK đã được cập nhật trong khi thẻ này đang mở. Hãy tải lại để nhận phiên bản mới.',
'common.errorPluginTitle': 'Không thể hiển thị plugin này',
'common.needsConnection': 'Thao tác này cần kết nối. Hãy thử lại khi TREK trực tuyến trở lại.',
+ 'common.errorDetails': 'Chi tiết',
};
export default common;
diff --git a/shared/src/i18n/zh-TW/common.ts b/shared/src/i18n/zh-TW/common.ts
index 4183d6bcb..f3d3009df 100644
--- a/shared/src/i18n/zh-TW/common.ts
+++ b/shared/src/i18n/zh-TW/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': '此分頁開啟期間 TREK 已更新。請重新載入以取得新版本。',
'common.errorPluginTitle': '無法顯示此外掛程式',
'common.needsConnection': '此操作需要網路連線。請在 TREK 恢復連線後再試一次。',
+ 'common.errorDetails': '詳細資訊',
};
export default common;
diff --git a/shared/src/i18n/zh/common.ts b/shared/src/i18n/zh/common.ts
index db84f34ca..d17ede4b1 100644
--- a/shared/src/i18n/zh/common.ts
+++ b/shared/src/i18n/zh/common.ts
@@ -78,5 +78,6 @@ const common: TranslationStrings = {
'common.errorUpdateBody': '此标签页打开期间 TREK 已更新。请重新加载以获取新版本。',
'common.errorPluginTitle': '无法显示此插件',
'common.needsConnection': '此操作需要网络连接。请在 TREK 恢复联网后重试。',
+ 'common.errorDetails': '详细信息',
};
export default common;