From 8798eeac95b81834af26314ef6430c525514e965 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 27 Jul 2025 00:36:36 +0000 Subject: [PATCH 1/5] Initial plan From ff7ca50a11f899498a0c590c0809eaa52e41dab4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 27 Jul 2025 00:42:45 +0000 Subject: [PATCH 2/5] Initial exploration and planning for error boundaries, suspense fallbacks, and performance improvements Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com> --- client/tsconfig.tsbuildinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/tsconfig.tsbuildinfo b/client/tsconfig.tsbuildinfo index c97f44bb..09114ab5 100644 --- a/client/tsconfig.tsbuildinfo +++ b/client/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./vite.env.d.ts","./vite.config.ts","./src/routeTree.gen.ts","./src/core/components/nested-select/utils.ts","./src/core/hooks/use-debounce.ts","./src/core/hooks/use-mobile.ts","./src/core/i18n/config.ts","./src/features/accounts/components/Account.type.ts","./src/features/accounts/components/account.utils.ts","./src/features/accounts/hooks/useBrand.ts","./src/features/accounts/hooks/useMono.ts","./src/features/accounts/services/account.queries.ts","./src/features/accounts/services/account.ts","./src/features/accounts/services/account.types.ts","./src/features/analytics/services/analytics.ts","./src/features/auth/services/auth.mutations.ts","./src/features/auth/services/auth.queries.ts","./src/features/auth/services/auth.ts","./src/features/auth/services/auth.types.ts","./src/features/auth/stores/auth.store.ts","./src/features/categories/services/category.ts","./src/features/categories/services/category.types.ts","./src/features/dashboard/charts/loader.ts","./src/features/dashboard/charts/store.ts","./src/features/dashboard/charts/types.ts","./src/features/dashboard/charts/expense-income/index.ts","./src/features/dashboard/services/chart.ts","./src/features/dashboard/stores/dashboard.store.ts","./src/features/onboarding/services/onboarding.ts","./src/features/onboarding/stores/onboarding.store.ts","./src/features/plugins/loader.ts","./src/features/plugins/store.ts","./src/features/plugins/types.ts","./src/features/plugins/real-estate/index.ts","./src/features/plugins/real-estate/store.ts","./src/features/plugins/real-estate/types.ts","./src/features/preferences/services/feedback.ts","./src/features/preferences/services/merchants.ts","./src/features/preferences/services/meta.ts","./src/features/preferences/services/preferences.ts","./src/features/preferences/services/tags.ts","./src/features/preferences/services/user.mutations.ts","./src/features/preferences/services/user.ts","./src/features/preferences/services/webhooks.ts","./src/features/preferences/stores/preferences.store.ts","./src/features/preferences/stores/settings.store.ts","./src/features/rules/services/rule.service.ts","./src/features/rules/services/rule.types.ts","./src/features/transactions/services/transaction.ts","./src/features/transactions/services/transaction.types.ts","./src/lib/authed-query.ts","./src/lib/axios.ts","./src/lib/currency.ts","./src/lib/env.ts","./src/lib/error.ts","./src/lib/formatting.ts","./src/lib/logger.ts","./src/lib/trycatch.ts","./src/lib/utils.ts","./src/lib/__tests__/formatting.test.ts","./src/types/mono-connect.d.ts","./src/app.tsx","./src/main.tsx","./src/router.tsx","./src/core/assets/icons/Burger.tsx","./src/core/assets/icons/ICWLG.tsx","./src/core/assets/icons/IconFull.tsx","./src/core/assets/icons/Logo.tsx","./src/core/assets/icons/apple.tsx","./src/core/assets/icons/github.tsx","./src/core/assets/icons/google.tsx","./src/core/components/EmptyStateGuide.tsx","./src/core/components/NotFound.tsx","./src/core/components/icon-picker/index.helper.tsx","./src/core/components/icon-picker/index.tsx","./src/core/components/layouts/mobile-burger.tsx","./src/core/components/nested-select/index.tsx","./src/core/components/ui/alert-dialog.tsx","./src/core/components/ui/alert.tsx","./src/core/components/ui/avatar.tsx","./src/core/components/ui/badge.tsx","./src/core/components/ui/breadcrumb.tsx","./src/core/components/ui/button.tsx","./src/core/components/ui/calendar.tsx","./src/core/components/ui/card.tsx","./src/core/components/ui/chart.tsx","./src/core/components/ui/checkbox.tsx","./src/core/components/ui/collapsible.tsx","./src/core/components/ui/combobox.tsx","./src/core/components/ui/command.tsx","./src/core/components/ui/context-menu.tsx","./src/core/components/ui/datetime.tsx","./src/core/components/ui/dialog-sheet.tsx","./src/core/components/ui/dialog.tsx","./src/core/components/ui/drawer.tsx","./src/core/components/ui/dropdown-menu.tsx","./src/core/components/ui/form.tsx","./src/core/components/ui/input-otp.tsx","./src/core/components/ui/input.tsx","./src/core/components/ui/inset-input.tsx","./src/core/components/ui/label.tsx","./src/core/components/ui/loading-spinner.tsx","./src/core/components/ui/overlap-input.tsx","./src/core/components/ui/popover.tsx","./src/core/components/ui/progress.tsx","./src/core/components/ui/radio-group.tsx","./src/core/components/ui/scroll-area.tsx","./src/core/components/ui/search-select.tsx","./src/core/components/ui/select.tsx","./src/core/components/ui/separator.tsx","./src/core/components/ui/sheet.tsx","./src/core/components/ui/sidebar.tsx","./src/core/components/ui/skeleton.tsx","./src/core/components/ui/sonner.tsx","./src/core/components/ui/spinner.tsx","./src/core/components/ui/switch.tsx","./src/core/components/ui/table.tsx","./src/core/components/ui/tabs.tsx","./src/core/components/ui/textarea.tsx","./src/core/components/ui/tooltip.tsx","./src/features/accounts/components/account.balance-chart.tsx","./src/features/accounts/components/account.constants.tsx","./src/features/accounts/components/account.create-modal.tsx","./src/features/accounts/components/account.delete-dialog.tsx","./src/features/accounts/components/account.edit-modal.tsx","./src/features/accounts/components/account.loading.tsx","./src/features/accounts/components/account.net-worth.tsx","./src/features/accounts/components/account.summary-card.tsx","./src/features/accounts/components/account.tsx","./src/features/accounts/components/csv-import-dialog.tsx","./src/features/analytics/components/budget-comparison-chart.tsx","./src/features/analytics/components/cashflow-forecast-chart.tsx","./src/features/analytics/components/category-breakdown-chart.tsx","./src/features/analytics/components/dashboard.loading.tsx","./src/features/analytics/components/dashboard.tsx","./src/features/analytics/components/expense-heatmap-chart.tsx","./src/features/analytics/components/financial-health-score.tsx","./src/features/analytics/components/income-expense-chart.tsx","./src/features/analytics/components/insight-card.tsx","./src/features/analytics/components/investment-performance-chart.tsx","./src/features/analytics/components/net-worth-chart.tsx","./src/features/analytics/components/savings-goal-chart.tsx","./src/features/analytics/components/spending-overview-chart.tsx","./src/features/auth/components/auth-interceptor.tsx","./src/features/dashboard/charts/expense-income/component.tsx","./src/features/dashboard/components/add-chart.tsx","./src/features/dashboard/components/dashboard-grid.tsx","./src/features/dashboard/components/chart-card/chart-card.loading.tsx","./src/features/dashboard/components/chart-card/chart-renderer.tsx","./src/features/dashboard/components/chart-card/index.tsx","./src/features/dashboard/hooks/useLazyChart.tsx","./src/features/plugins/real-estate/components/add-property-dialog.tsx","./src/features/plugins/real-estate/components/morgage-payment-chart.tsx","./src/features/plugins/real-estate/components/property-card.tsx","./src/features/plugins/real-estate/components/property-value-chart.tsx","./src/features/plugins/real-estate/components/rental-income-chart.tsx","./src/features/plugins/real-estate/pages/analytics.tsx","./src/features/plugins/real-estate/pages/map.tsx","./src/features/plugins/real-estate/pages/overview.tsx","./src/features/plugins/real-estate/pages/properties.tsx","./src/features/plugins/real-estate/pages/settings.tsx","./src/features/preferences/components/preferences-provider.tsx","./src/features/preferences/contexts/theme.context.tsx","./src/features/preferences/contexts/theme.provider.tsx","./src/features/preferences/hooks/use-theme.tsx","./src/features/rules/components/create-rule-dialog.tsx","./src/features/rules/components/edit-rule-dialog.tsx","./src/features/rules/components/rule-action-badge.tsx","./src/features/rules/components/rule-condition-badge.tsx","./src/features/rules/components/rules-management.tsx","./src/features/transactions/components/add-records-dialog.tsx","./src/features/transactions/components/bulk-edit-dialog.tsx","./src/features/transactions/components/create-edit-rule-dialog.tsx","./src/features/transactions/components/del-records-dialog.tsx","./src/features/transactions/components/edt-records-sheet.tsx","./src/features/transactions/components/filter-demo.tsx","./src/features/transactions/components/floating-records-bar.tsx","./src/features/transactions/components/import-transactions-dialog.tsx","./src/features/transactions/components/neural-records-dialog.tsx","./src/features/transactions/components/records-table.column.tsx","./src/features/transactions/components/records-table.loading.tsx","./src/features/transactions/components/records-table.tsx","./src/features/transactions/components/rules-dialog.tsx","./src/features/transactions/components/transaction-filter-dropdown.tsx","./src/features/transactions/components/transaction-filters.tsx","./src/routes/__root.tsx","./src/routes/forgot-password.tsx","./src/routes/import-demo.tsx","./src/routes/index.tsx","./src/routes/login.tsx","./src/routes/signup.tsx","./src/routes/dashboard/$.tsx","./src/routes/dashboard/accounts.$id.tsx","./src/routes/dashboard/accounts.tsx","./src/routes/dashboard/analytics.tsx","./src/routes/dashboard/home.tsx","./src/routes/dashboard/index.tsx","./src/routes/dashboard/records.tsx","./src/routes/dashboard/route.tsx","./src/routes/dashboard_/settings/appearance.tsx","./src/routes/dashboard_/settings/categories.tsx","./src/routes/dashboard_/settings/currencies.tsx","./src/routes/dashboard_/settings/features.tsx","./src/routes/dashboard_/settings/feedback.tsx","./src/routes/dashboard_/settings/index.tsx","./src/routes/dashboard_/settings/localization.tsx","./src/routes/dashboard_/settings/merchants.tsx","./src/routes/dashboard_/settings/news.tsx","./src/routes/dashboard_/settings/profile.tsx","./src/routes/dashboard_/settings/route.tsx","./src/routes/dashboard_/settings/rules.tsx","./src/routes/dashboard_/settings/security.tsx","./src/routes/dashboard_/settings/tags.tsx","./src/routes/dashboard_/settings/webhooks.tsx","./src/routes/dashboard_/settings/-components/tag-list.tsx","./src/routes/onboarding/complexity.tsx","./src/routes/onboarding/features.tsx","./src/routes/onboarding/finance-interest.tsx","./src/routes/onboarding/goals.tsx","./src/routes/onboarding/index.tsx","./src/routes/onboarding/name.tsx","./src/routes/onboarding/route.tsx","./src/routes/onboarding/social-proof.tsx"],"errors":true,"version":"5.8.3"} +{"root":["./vite.env.d.ts","./vite.config.ts","./src/routeTree.gen.ts","./src/core/components/icon-picker/__tests__/index.helper.test.ts","./src/core/components/nested-select/utils.ts","./src/core/hooks/use-debounce.ts","./src/core/hooks/use-mobile.ts","./src/core/i18n/config.ts","./src/features/accounts/components/Account.type.ts","./src/features/accounts/components/account.utils.ts","./src/features/accounts/hooks/useBrand.ts","./src/features/accounts/hooks/useMono.ts","./src/features/accounts/services/account.queries.ts","./src/features/accounts/services/account.ts","./src/features/accounts/services/account.types.ts","./src/features/analytics/services/analytics.ts","./src/features/auth/services/auth.mutations.ts","./src/features/auth/services/auth.queries.ts","./src/features/auth/services/auth.ts","./src/features/auth/services/auth.types.ts","./src/features/auth/stores/auth.store.ts","./src/features/categories/services/category.ts","./src/features/categories/services/category.types.ts","./src/features/dashboard/charts/loader.ts","./src/features/dashboard/charts/store.ts","./src/features/dashboard/charts/types.ts","./src/features/dashboard/charts/expense-income/index.ts","./src/features/dashboard/services/chart.ts","./src/features/dashboard/stores/dashboard.store.ts","./src/features/onboarding/services/onboarding.ts","./src/features/onboarding/stores/onboarding.store.ts","./src/features/plugins/loader.ts","./src/features/plugins/store.ts","./src/features/plugins/types.ts","./src/features/plugins/real-estate/index.ts","./src/features/plugins/real-estate/store.ts","./src/features/plugins/real-estate/types.ts","./src/features/preferences/services/categories.service.ts","./src/features/preferences/services/feedback.queries.ts","./src/features/preferences/services/feedback.ts","./src/features/preferences/services/github-releases.queries.ts","./src/features/preferences/services/github-releases.service.ts","./src/features/preferences/services/merchants.service.ts","./src/features/preferences/services/merchants.ts","./src/features/preferences/services/meta.ts","./src/features/preferences/services/preferences.ts","./src/features/preferences/services/settings.queries.ts","./src/features/preferences/services/tags.service.ts","./src/features/preferences/services/tags.ts","./src/features/preferences/services/user.mutations.ts","./src/features/preferences/services/user.ts","./src/features/preferences/services/webhooks.service.ts","./src/features/preferences/services/webhooks.ts","./src/features/preferences/stores/preferences.store.ts","./src/features/preferences/stores/settings.store.ts","./src/features/preferences/stores/__tests__/settings.integration.test.ts","./src/features/preferences/stores/__tests__/settings.store.test.ts","./src/features/rules/services/rule.service.ts","./src/features/rules/services/rule.types.ts","./src/features/transactions/services/recurring-transaction.service.ts","./src/features/transactions/services/recurring-transaction.types.ts","./src/features/transactions/services/transaction.ts","./src/features/transactions/services/transaction.types.ts","./src/features/transactions/utils/transaction-status.ts","./src/lib/authed-query.ts","./src/lib/axios.ts","./src/lib/currency.ts","./src/lib/env.ts","./src/lib/error.ts","./src/lib/formatting.ts","./src/lib/logger.ts","./src/lib/trycatch.ts","./src/lib/utils.ts","./src/lib/__tests__/formatting.test.ts","./src/routes/dashboard_/settings/__tests__/settings-ui.test.ts","./src/types/mono-connect.d.ts","./src/app.tsx","./src/main.tsx","./src/router.tsx","./src/core/assets/icons/Burger.tsx","./src/core/assets/icons/ICWLG.tsx","./src/core/assets/icons/IconFull.tsx","./src/core/assets/icons/Logo.tsx","./src/core/assets/icons/apple.tsx","./src/core/assets/icons/github.tsx","./src/core/assets/icons/google.tsx","./src/core/components/EmptyStateGuide.tsx","./src/core/components/NotFound.tsx","./src/core/components/icon-picker/index.helper.tsx","./src/core/components/icon-picker/index.tsx","./src/core/components/layouts/mobile-burger.tsx","./src/core/components/nested-select/index.tsx","./src/core/components/ui/alert-dialog.tsx","./src/core/components/ui/alert.tsx","./src/core/components/ui/avatar.tsx","./src/core/components/ui/badge.tsx","./src/core/components/ui/breadcrumb.tsx","./src/core/components/ui/button.tsx","./src/core/components/ui/calendar.tsx","./src/core/components/ui/card.tsx","./src/core/components/ui/chart.tsx","./src/core/components/ui/checkbox.tsx","./src/core/components/ui/collapsible.tsx","./src/core/components/ui/color-picker.tsx","./src/core/components/ui/combobox.tsx","./src/core/components/ui/command.tsx","./src/core/components/ui/context-menu.tsx","./src/core/components/ui/date-picker.tsx","./src/core/components/ui/datetime.tsx","./src/core/components/ui/dialog-sheet.tsx","./src/core/components/ui/dialog.tsx","./src/core/components/ui/drawer.tsx","./src/core/components/ui/dropdown-menu.tsx","./src/core/components/ui/form.tsx","./src/core/components/ui/input-otp.tsx","./src/core/components/ui/input.tsx","./src/core/components/ui/inset-input.tsx","./src/core/components/ui/label.tsx","./src/core/components/ui/loading-spinner.tsx","./src/core/components/ui/overlap-input.tsx","./src/core/components/ui/popover.tsx","./src/core/components/ui/progress.tsx","./src/core/components/ui/radio-group.tsx","./src/core/components/ui/scroll-area.tsx","./src/core/components/ui/search-select.tsx","./src/core/components/ui/select.tsx","./src/core/components/ui/separator.tsx","./src/core/components/ui/sheet.tsx","./src/core/components/ui/sidebar.tsx","./src/core/components/ui/skeleton.tsx","./src/core/components/ui/sonner.tsx","./src/core/components/ui/spinner.tsx","./src/core/components/ui/switch.tsx","./src/core/components/ui/table.tsx","./src/core/components/ui/tabs.tsx","./src/core/components/ui/textarea.tsx","./src/core/components/ui/tooltip.tsx","./src/features/accounts/components/account.balance-chart.tsx","./src/features/accounts/components/account.constants.tsx","./src/features/accounts/components/account.create-modal.tsx","./src/features/accounts/components/account.delete-dialog.tsx","./src/features/accounts/components/account.edit-modal.tsx","./src/features/accounts/components/account.loading.tsx","./src/features/accounts/components/account.net-worth.tsx","./src/features/accounts/components/account.summary-card.tsx","./src/features/accounts/components/account.tsx","./src/features/accounts/components/csv-import-dialog.tsx","./src/features/analytics/components/budget-comparison-chart.tsx","./src/features/analytics/components/cashflow-forecast-chart.tsx","./src/features/analytics/components/category-breakdown-chart.tsx","./src/features/analytics/components/dashboard.loading.tsx","./src/features/analytics/components/dashboard.tsx","./src/features/analytics/components/expense-heatmap-chart.tsx","./src/features/analytics/components/financial-health-score.tsx","./src/features/analytics/components/income-expense-chart.tsx","./src/features/analytics/components/insight-card.tsx","./src/features/analytics/components/investment-performance-chart.tsx","./src/features/analytics/components/net-worth-chart.tsx","./src/features/analytics/components/savings-goal-chart.tsx","./src/features/analytics/components/spending-overview-chart.tsx","./src/features/auth/components/auth-interceptor.tsx","./src/features/dashboard/charts/expense-income/component.tsx","./src/features/dashboard/components/add-chart.tsx","./src/features/dashboard/components/dashboard-grid.tsx","./src/features/dashboard/components/chart-card/chart-card.loading.tsx","./src/features/dashboard/components/chart-card/chart-renderer.tsx","./src/features/dashboard/components/chart-card/index.tsx","./src/features/dashboard/hooks/useLazyChart.tsx","./src/features/plugins/real-estate/components/add-property-dialog.tsx","./src/features/plugins/real-estate/components/morgage-payment-chart.tsx","./src/features/plugins/real-estate/components/property-card.tsx","./src/features/plugins/real-estate/components/property-value-chart.tsx","./src/features/plugins/real-estate/components/rental-income-chart.tsx","./src/features/plugins/real-estate/pages/analytics.tsx","./src/features/plugins/real-estate/pages/map.tsx","./src/features/plugins/real-estate/pages/overview.tsx","./src/features/plugins/real-estate/pages/properties.tsx","./src/features/plugins/real-estate/pages/settings.tsx","./src/features/preferences/components/preferences-provider.tsx","./src/features/preferences/contexts/theme.context.tsx","./src/features/preferences/contexts/theme.provider.tsx","./src/features/preferences/hooks/use-theme.tsx","./src/features/rules/components/create-rule-dialog.tsx","./src/features/rules/components/edit-rule-dialog.tsx","./src/features/rules/components/rule-action-badge.tsx","./src/features/rules/components/rule-condition-badge.tsx","./src/features/rules/components/rules-management.tsx","./src/features/transactions/components/add-records-dialog.tsx","./src/features/transactions/components/bulk-approval-dialog.tsx","./src/features/transactions/components/bulk-edit-dialog.tsx","./src/features/transactions/components/calendar-view.tsx","./src/features/transactions/components/create-edit-rule-dialog.tsx","./src/features/transactions/components/custom-recurring-modal.tsx","./src/features/transactions/components/del-records-dialog.tsx","./src/features/transactions/components/edt-records-sheet.tsx","./src/features/transactions/components/filter-demo.tsx","./src/features/transactions/components/floating-records-bar.tsx","./src/features/transactions/components/import-transactions-dialog.tsx","./src/features/transactions/components/neural-records-dialog.tsx","./src/features/transactions/components/pending-transactions-dashboard.tsx","./src/features/transactions/components/records-table.column.tsx","./src/features/transactions/components/records-table.loading.tsx","./src/features/transactions/components/records-table.tsx","./src/features/transactions/components/recurring-select.tsx","./src/features/transactions/components/recurring-transaction-form.tsx","./src/features/transactions/components/rules-dialog.tsx","./src/features/transactions/components/transaction-filter-dropdown.tsx","./src/features/transactions/components/transaction-filters.tsx","./src/routes/__root.tsx","./src/routes/forgot-password.tsx","./src/routes/import-demo.tsx","./src/routes/index.tsx","./src/routes/login.tsx","./src/routes/signup.tsx","./src/routes/dashboard/$.tsx","./src/routes/dashboard/accounts.$id.tsx","./src/routes/dashboard/accounts.tsx","./src/routes/dashboard/analytics.tsx","./src/routes/dashboard/home.tsx","./src/routes/dashboard/index.tsx","./src/routes/dashboard/records.tsx","./src/routes/dashboard/route.tsx","./src/routes/dashboard_/settings/appearance.tsx","./src/routes/dashboard_/settings/categories.tsx","./src/routes/dashboard_/settings/currencies.tsx","./src/routes/dashboard_/settings/features.tsx","./src/routes/dashboard_/settings/feedback.tsx","./src/routes/dashboard_/settings/index.tsx","./src/routes/dashboard_/settings/localization.tsx","./src/routes/dashboard_/settings/merchants.tsx","./src/routes/dashboard_/settings/news.tsx","./src/routes/dashboard_/settings/profile.tsx","./src/routes/dashboard_/settings/route.tsx","./src/routes/dashboard_/settings/rules.tsx","./src/routes/dashboard_/settings/security.tsx","./src/routes/dashboard_/settings/tags.tsx","./src/routes/dashboard_/settings/webhooks.tsx","./src/routes/dashboard_/settings/-components/tag-list.tsx","./src/routes/onboarding/complexity.tsx","./src/routes/onboarding/features.tsx","./src/routes/onboarding/finance-interest.tsx","./src/routes/onboarding/goals.tsx","./src/routes/onboarding/index.tsx","./src/routes/onboarding/name.tsx","./src/routes/onboarding/route.tsx","./src/routes/onboarding/social-proof.tsx"],"errors":true,"version":"5.7.3"} \ No newline at end of file From d58219ae5351ac0091716afcbe2b3ddd6edb3463 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 27 Jul 2025 00:49:52 +0000 Subject: [PATCH 3/5] Implement Phase 1: Error boundaries and enhanced loading components Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com> --- client/package-lock.json | 13 ++ client/package.json | 1 + .../component-error-fallback.tsx | 52 ++++++++ .../error-boundary/error-fallback.tsx | 48 +++++++ .../core/components/error-boundary/index.tsx | 24 ++++ .../error-boundary/route-error-fallback.tsx | 68 ++++++++++ client/src/core/components/loading/index.tsx | 123 ++++++++++++++++++ client/src/main.tsx | 3 +- client/src/routes/__root.tsx | 5 +- client/src/routes/dashboard/home.tsx | 28 ++-- client/src/routes/dashboard/route.tsx | 13 +- 11 files changed, 356 insertions(+), 22 deletions(-) create mode 100644 client/src/core/components/error-boundary/component-error-fallback.tsx create mode 100644 client/src/core/components/error-boundary/error-fallback.tsx create mode 100644 client/src/core/components/error-boundary/index.tsx create mode 100644 client/src/core/components/error-boundary/route-error-fallback.tsx create mode 100644 client/src/core/components/loading/index.tsx diff --git a/client/package-lock.json b/client/package-lock.json index 73fd1e00..4f430948 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -55,6 +55,7 @@ "react-day-picker": "9.7.0", "react-dom": "^19.1.0", "react-dropzone": "^14.3.8", + "react-error-boundary": "^6.0.0", "react-hook-form": "^7.58.1", "react-hotkeys-hook": "^4.6.2", "react-i18next": "^15.5.3", @@ -7410,6 +7411,18 @@ "react": ">= 16.8 || 18.0.0" } }, + "node_modules/react-error-boundary": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-6.0.0.tgz", + "integrity": "sha512-gdlJjD7NWr0IfkPlaREN2d9uUZUlksrfOx7SX62VRerwXbMY6ftGCIZua1VG1aXFNOimhISsTq+Owp725b9SiA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/react-hook-form": { "version": "7.60.0", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.60.0.tgz", diff --git a/client/package.json b/client/package.json index 1a6ddca6..efb69e84 100644 --- a/client/package.json +++ b/client/package.json @@ -69,6 +69,7 @@ "react-day-picker": "9.7.0", "react-dom": "^19.1.0", "react-dropzone": "^14.3.8", + "react-error-boundary": "^6.0.0", "react-hook-form": "^7.58.1", "react-hotkeys-hook": "^4.6.2", "react-i18next": "^15.5.3", diff --git a/client/src/core/components/error-boundary/component-error-fallback.tsx b/client/src/core/components/error-boundary/component-error-fallback.tsx new file mode 100644 index 00000000..88befebd --- /dev/null +++ b/client/src/core/components/error-boundary/component-error-fallback.tsx @@ -0,0 +1,52 @@ +import { Button } from "@/core/components/ui/button"; +import { AlertCircle, RefreshCw } from "lucide-react"; + +interface ComponentErrorFallbackProps { + error: Error; + resetErrorBoundary: () => void; + componentName?: string; +} + +export function ComponentErrorFallback({ + error, + resetErrorBoundary, + componentName = "Component" +}: ComponentErrorFallbackProps) { + return ( +
+ This component failed to load. Try refreshing or contact support if the issue persists. +
+ + + + {process.env.NODE_ENV === 'development' && ( +
+ {error.message}
+
+ + We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists. +
+ +
+ {error.message}
+
+ + This page encountered an error and couldn't be loaded. You can try refreshing the page or returning to the dashboard. +
+ +
+ {error.stack}
+
+ )}
+ Loading...
+