Skip to content

Add Svelte error-boundary guards for LexBox page throws - #2602

Open
hahn-kev-bot wants to merge 1 commit into
developfrom
frontend/svelte-error-boundaries
Open

Add Svelte error-boundary guards for LexBox page throws#2602
hahn-kev-bot wants to merge 1 commit into
developfrom
frontend/svelte-error-boundaries

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

we now catch render errors in the UI so users don't get stuck without knowing what's going on.


AI summary

LexBox SvelteKit now wraps layout children in Svelte 5 <svelte:boundary> so a page render throw can recover in place instead of taking down the whole tree.

  • New ErrorBoundary traces with app.error.source: svelte-boundary and never resets from onerror
  • ErrorRecovery shows errors.apology, the error message, Retry, and Go home (rel="external" for a full document load)
  • Root layout wraps only {@render children?.()} (footer, overlay, UnexpectedErrorAlert stay outside)
  • Authenticated layout wraps children inside <Layout> so AppBar survives
  • Sandbox has a one-shot Throw render error control to prove Retry remounts sandbox ok
  • errors.retry added in en/es/fr/ko

+error.svelte and UnexpectedErrorAlert are unchanged.

Test plan

  • pnpm check in frontend/ (0 errors)
  • Open /sandbox, click Throw render error
    • Other cards stay visible
    • Fallback shows apology, sandbox render error, Retry, and Go home
    • Retry restores sandbox ok
    • Go home does a full navigation (rel="external"); unauthenticated users land on /login
  • Window-level errors still use UnexpectedErrorAlert (unchanged)

Wrap layout children in <svelte:boundary> with retry/go-home recovery so a render throw no longer takes down the whole tree.
@github-actions github-actions Bot added the 📦 Lexbox issues related to any server side code, fw-headless included label Aug 26, 2026
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dd0e388e-fe53-4309-875d-b15285985fea


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hahn-kev
hahn-kev requested a review from rmunn August 26, 2026 06:24

@rmunn rmunn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 Lexbox issues related to any server side code, fw-headless included

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants