Skip to content

feat(frontend): error boundaries, crash reporting, and Soroban contract hooks#283

Closed
Smartdevs17 wants to merge 2 commits into
Gildado:mainfrom
Smartdevs17:fix/issues-245-246
Closed

feat(frontend): error boundaries, crash reporting, and Soroban contract hooks#283
Smartdevs17 wants to merge 2 commits into
Gildado:mainfrom
Smartdevs17:fix/issues-245-246

Conversation

@Smartdevs17
Copy link
Copy Markdown
Contributor

Summary

Consolidated implementation for issues #70 (Error Boundaries) and #71 (Soroban Contract Hook).

Error Boundaries & Crash Reporting (#245)

  • GlobalErrorBoundary: Enhanced error boundary with reset functionality that wraps the entire app
  • ComponentErrorBoundary: Reusable component-level error boundary for isolating individual component failures
  • PageErrorFallback: Full-page error fallback with proper app layout (header, footer)
  • useErrorHandler: Hook for programmatic error handling with Sentry integration
  • i18n: Added translations for new error states (English and Spanish)

Soroban Contract Invocation Hook (#246)

  • useSorobanContract(contractId): Returns invoke, loading, error, and result state
  • Simulation: Integrates simulateTransaction before every live submission
  • Wallet Signing: Delegates to useWalletSigning
  • Result Parsing: On-chain result decoded and returned as typed data
  • Error Handling: Error states surfaced via useNotification toast system
  • Typed Contract Hooks:
    • useBulkPaymentContract(contractId): For bulk_payment contract
    • useVestingEscrowContract(contractId): For vesting_escrow contract
    • useRevenueSplitContract(contractId): For revenue_split contract

Files Added/Modified

File Purpose
frontend/src/components/GlobalErrorBoundary.tsx Global error boundary
frontend/src/components/ComponentErrorBoundary.tsx Component-level error boundary
frontend/src/components/PageErrorFallback.tsx Full-page error fallback
frontend/src/hooks/useErrorHandler.ts Programmatic error handling
frontend/src/hooks/usePayrollContracts.ts Typed Soroban contract hooks
frontend/src/main.tsx Uses new GlobalErrorBoundary
frontend/src/locales/en/translation.json English translations
frontend/src/locales/es/translation.json Spanish translations

Acceptance Criteria

  • Global and component-level error boundaries implemented
  • User-friendly error fallback pages with full layout
  • Production crash reports sent to Sentry monitoring system
  • useSorobanContract(contractId) returns invoke, loading, error, result
  • Hook integrates simulateTransaction before submission
  • Wallet signing delegated to useWalletSigning
  • On-chain result decoded and returned as typed data
  • Error states surfaced via useNotification toast

Closes #245
Closes #246

- Add GlobalErrorBoundary with reset functionality for full app recovery
- Add ComponentErrorBoundary for component-level error isolation
- Add PageErrorFallback with full page layout for major errors
- Add useErrorHandler hook for programmatic error handling
- Add i18n translations for new error states (en/es)
- Integrate with Sentry for production crash reporting

Closes Gildado#245
Error Boundaries & Crash Reporting (Gildado#245):
- Add GlobalErrorBoundary with reset functionality for full app recovery
- Add ComponentErrorBoundary for component-level error isolation
- Add PageErrorFallback with full page layout for major errors
- Add useErrorHandler hook for programmatic error handling
- Add i18n translations for new error states (en/es)
- Integrate with Sentry for production crash reporting

Soroban Contract Invocation Hook (Gildado#246):
- useSorobanContract(contractId) returns invoke, loading, error, result state
- Hook integrates simulateTransaction before every live submission
- Wallet signing delegated to useWalletSigning
- On-chain result decoded and returned as typed data
- Error states surfaced via useNotification toast system
- Add typed contract hooks: useBulkPaymentContract, useVestingEscrowContract, useRevenueSplitContract

Closes Gildado#245
Closes Gildado#246
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 24, 2026

@Smartdevs17 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Wilfred007 pushed a commit that referenced this pull request May 29, 2026
… metrics

Issue #728 / #283 — surface tables with high sequential scan ratios and
cumulative WAL generation statistics from pg_stat_wal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wilfred007 pushed a commit that referenced this pull request May 29, 2026
Issue #728 / #283 — expose GET /seq-scan-stats and GET /wal-stats with
parameter validation and Swagger annotations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wilfred007 pushed a commit that referenced this pull request May 29, 2026
…al-stats

Issue #728 / #283 — six test cases covering limit validation and error paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

#071: Soroban Contract Invocation Hook #070: Error Boundaries & Crash Reporting

1 participant