Skip to content

feat: improving error handling across the major pages#755

Draft
thostetler wants to merge 4 commits intoadsabs:masterfrom
thostetler:feat/network-resilience
Draft

feat: improving error handling across the major pages#755
thostetler wants to merge 4 commits intoadsabs:masterfrom
thostetler:feat/network-resilience

Conversation

@thostetler
Copy link
Member

  • Add retry utilities with exponential backoff for transient failures
  • Configure React Query with global retry strategy (5xx, timeouts, network errors)
  • Add PageErrorBoundary and PageErrorFallback components
  • Wrap major pages (/, /search, /classic-form, /abs/*) with error boundaries
  • Add useNetworkStatus hook for online/offline detection
  • Add NetworkStatusIndicator for app-wide connectivity feedback
  • Improve _error.tsx with recovery options and user-friendly messages
  • Add tests for retry and network status utilities

@thostetler thostetler requested a review from shinyichen January 7, 2026 18:05
@thostetler thostetler marked this pull request as draft January 7, 2026 18:05
- Add retry utilities with exponential backoff for transient failures
- Configure React Query with global retry strategy (5xx, timeouts, network errors)
- Add PageErrorBoundary and PageErrorFallback components
- Wrap major pages (/, /search, /classic-form, /abs/*) with error boundaries
- Add useNetworkStatus hook for online/offline detection
- Add NetworkStatusIndicator for app-wide connectivity feedback
- Improve _error.tsx with recovery options and user-friendly messages
- Add comprehensive tests for retry and network status utilities
- Added hideHomeButton prop to PageErrorFallback for home page
- Wrapped all /abs/[id] sub-pages with error boundaries
- Wrapped all /search sub-pages with error boundaries
- Wrapped feedback forms, auth pages, journalsdb, and public-libraries
- Wraps page component in ErrorBoundary inside Layout
- Preserves app shell (header/nav) when errors occur
- Acts as safety net for pages without explicit boundaries
@thostetler thostetler force-pushed the feat/network-resilience branch from 541d291 to e24a8c6 Compare January 8, 2026 18:20
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 66.20000% with 169 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.7%. Comparing base (9678f94) to head (bb03088).

Files with missing lines Patch % Lines
...components/PageErrorFallback/PageErrorFallback.tsx 19.2% 110 Missing ⚠️
src/lib/retry.ts 86.9% 29 Missing ⚠️
...components/PageErrorBoundary/PageErrorBoundary.tsx 75.0% 16 Missing ⚠️
src/lib/useNetworkStatus.ts 79.8% 14 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #755     +/-   ##
========================================
- Coverage    71.8%   71.7%   -0.1%     
========================================
  Files         217     222      +5     
  Lines       24485   24934    +449     
  Branches     1402    1452     +50     
========================================
+ Hits        17575   17869    +294     
- Misses       6878    7033    +155     
  Partials       32      32             
Files with missing lines Coverage Δ
src/api/search/search.ts 45.6% <ø> (+0.1%) ⬆️
src/components/PageErrorBoundary/index.ts 100.0% <100.0%> (ø)
src/components/PageErrorFallback/index.ts 100.0% <100.0%> (ø)
src/pages/paper-form.tsx 70.1% <100.0%> (+0.5%) ⬆️
src/lib/useNetworkStatus.ts 79.8% <79.8%> (ø)
...components/PageErrorBoundary/PageErrorBoundary.tsx 75.0% <75.0%> (ø)
src/lib/retry.ts 86.9% <86.9%> (ø)
...components/PageErrorFallback/PageErrorFallback.tsx 19.2% <19.2%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant