Skip to content

refactor: standardize TwoFactorRequiredModal using GenericModal#39148

Open
NAME-ASHWANIYADAV wants to merge 1 commit intoRocketChat:developfrom
NAME-ASHWANIYADAV:refactor/standardize-twofactor-required-modal-genericmodal
Open

refactor: standardize TwoFactorRequiredModal using GenericModal#39148
NAME-ASHWANIYADAV wants to merge 1 commit intoRocketChat:developfrom
NAME-ASHWANIYADAV:refactor/standardize-twofactor-required-modal-genericmodal

Conversation

@NAME-ASHWANIYADAV
Copy link
Contributor

@NAME-ASHWANIYADAV NAME-ASHWANIYADAV commented Feb 27, 2026

Closes #39146

Replaced raw fuselage Modal primitives (Modal, ModalHeader, ModalTitle, ModalContent, ModalFooter, ModalFooterControllers, Button) with the standardized GenericModal component from @rocket.chat/ui-client in TwoFactorRequiredModal.

This follows the same pattern established in #38334, #38431, and #38433.

Changes

  • Replaced manual modal composition with GenericModal using its declarative prop API (title, confirmText, onConfirm, onClose)
  • Removed unused @rocket.chat/fuselage modal imports

Screenshots

No UI changes — the modal renders identically using GenericModal's internal layout.

Summary by CodeRabbit

  • Refactor
    • Modernized the two-factor authentication modal component to improve code maintainability and consistency with the design system.

@NAME-ASHWANIYADAV NAME-ASHWANIYADAV requested a review from a team as a code owner February 27, 2026 15:03
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 27, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 539659a and 0db9943.

📒 Files selected for processing (1)
  • apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx
🔇 Additional comments (2)
apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx (2)

1-1: GenericModal import standardization looks good.

This cleanly aligns the component with the shared modal abstraction and removes low-level modal coupling.


15-22: Refactor preserves behavior with a simpler modal structure.

The title/confirmText/onConfirm/onClose wiring is clear, and the body content remains unchanged while reducing JSX complexity.


Walkthrough

Refactored TwoFactorRequiredModal to replace fuselage Modal components with GenericModal from ui-client. Simplified component structure by consolidating modal implementation while maintaining existing API and user-facing behavior.

Changes

Cohort / File(s) Summary
Modal Component Refactoring
apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx
Replaced fuselage Modal primitives (ModalHeader, ModalContent, ModalFooter) with consolidated GenericModal component. Updated prop structure to use title, confirmText, onConfirm, and onClose callbacks.
Dependencies
package.json
Updated package dependencies to support GenericModal integration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: refactoring TwoFactorRequiredModal to use GenericModal for standardization, which matches the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: standardize TwoFactorRequiredModal using GenericModal

1 participant