Skip to content

Security dialog disaster recovery#597

Open
dot-enny wants to merge 6 commits into
rinafcode:mainfrom
dot-enny:security-dialog-disaster-recovery
Open

Security dialog disaster recovery#597
dot-enny wants to merge 6 commits into
rinafcode:mainfrom
dot-enny:security-dialog-disaster-recovery

Conversation

@dot-enny
Copy link
Copy Markdown

Description

Brief description of changes

  1. Analyzed Existing Implementations: I investigated the codebase to see how modals and error boundaries were currently handled. I found the central Modal component in src/components/ui/Modal.tsx and the ErrorBoundarySystem in src/components/errors/ErrorBoundarySystem.tsx.
  2. Implemented Disaster Recovery: I wrapped the inner content of the Modal component with the ErrorBoundary component. I set the isolationId to "modal-dialog" and isolationLevel to "component" so that any errors thrown by children inside the modal will be caught, logged, and isolated to the modal, presenting a fallback UI (UserFriendlyErrorDisplay) without crashing the entire application.
  3. Added Unit Tests: I created src/components/ui/tests/Modal.test.tsx using Vitest and React Testing Library to test that:
    The modal renders normally when no errors occur.
    The modal properly catches errors from a throwing child component and displays the "Something went wrong." UI (Error Boundary Fallback).
    Closing functionality remains fully operational without regressions.

Related Issue

Closes #451

Type of Change

  • Bug fix
  • [ X ] New feature
  • Breaking change
  • Documentation update

Checklist

  • [ X ] Code follows project style guidelines
  • [ X ] Self-review completed
  • [ X ] No console errors
  • [ X ] Uses Lucide icons consistently
  • [ X ] Responsive design implemented
  • [ X ] Starknet best practices followed

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@dot-enny 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

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

RUKAYAT-CODER commented May 29, 2026

Kindly resolve conflict and fix workflow.

Don't forget to pull before pushing.

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.

security Modal Dialogs : Disaster Recovery

2 participants