feat(ui): a calm, native-looking card when a view fails or TREK was updated

The error and new-version fallback was a bordered box with a warning
triangle and the raw error message on show. It is now one centred card with
a round symbol (a friendly one for an update), a short title and line, and a
full-width reload button; the technical message stays for issue reports,
folded under Details. Phone, PWA and desktop alike.
This commit is contained in:
Maurice
2026-11-06 12:44:39 +01:00
parent d2ae9a87c4
commit 50bd1bcbc1
30 changed files with 133 additions and 61 deletions
@@ -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(
<ErrorBoundary boundaryId="route" level="route">
<Boom />
</ErrorBoundary>,
);
// 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);
});
});