Skip to content

A local-first personal finance app

fix: add scoped ErrorBoundaries to mobile budget, account, and transaction pages (#8336)

Shivam S541caba5b794
diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx
index 171a8f8ce5..7d4817be15 100644
--- a/packages/desktop-client/src/components/FinancesApp.tsx
+++ b/packages/desktop-client/src/components/FinancesApp.tsx
@@ -265,7 +265,14 @@ export function FinancesApp() {
<Route
path="/budget"
- element={<NarrowAlternate name="Budget" />}
+ element={
+ <ErrorBoundary
+ FallbackComponent={FeatureErrorFallback}
+ resetKeys={[location.pathname]}
+ >
+ <NarrowAlternate name="Budget" />
+ </ErrorBoundary>
+ }
/>
<Route
@@ -351,15 +358,27 @@ export function FinancesApp() {
<Route
path="/accounts/:id"
- element={<NarrowAlternate name="Account" />}
+ element={
+ <ErrorBoundary
+ FallbackComponent={FeatureErrorFallback}
+ resetKeys={[location.pathname]}
+ >
+ <NarrowAlternate name="Account" />
+ </ErrorBoundary>
+ }
/>
<Route
path="/transactions/:transactionId"
element={
- <WideNotSupported>
- <TransactionEdit />
- </WideNotSupported>
+ <ErrorBoundary
+ FallbackComponent={FeatureErrorFallback}
+ resetKeys={[location.pathname]}
+ >
+ <WideNotSupported>
+ <TransactionEdit />
+ </WideNotSupported>
+ </ErrorBoundary>
}
/>
diff --git a/upcoming-release-notes/8100.md b/upcoming-release-notes/8100.md
new file mode 100644
index 0000000000..ae3f8a45a8
--- /dev/null
+++ b/upcoming-release-notes/8100.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [BIGSUS24]
+---
+
+Add scoped error boundaries around the mobile budget, account, and transaction edit pages so a rendering error in one of them no longer crashes the entire app.