Skip to content

chore: Show a confirmation modal when switching attribute stores#40826

Draft
KevLehman wants to merge 2 commits into
developfrom
chore/confirm-modal-store-change
Draft

chore: Show a confirmation modal when switching attribute stores#40826
KevLehman wants to merge 2 commits into
developfrom
chore/confirm-modal-store-change

Conversation

@KevLehman
Copy link
Copy Markdown
Member

@KevLehman KevLehman commented Jun 4, 2026

Proposed changes (including videos or screenshots)

Issue(s)

https://rocketchat.atlassian.net/browse/ABAC3-21

Steps to test or reproduce

Further comments

we're extending the SettingField component so it accepts an optional confirmation param that would render a modal to be shown to the user before performing the actual setting switch.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Jun 4, 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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 4, 2026

⚠️ No Changeset found

Latest commit: 00f40a3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e0100ff-2648-4a15-aab4-d6bc4c908c60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.02%. Comparing base (85fc0dd) to head (00f40a3).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40826      +/-   ##
===========================================
+ Coverage    69.90%   70.02%   +0.12%     
===========================================
  Files         3337     3337              
  Lines       123489   123521      +32     
  Branches     22013    22038      +25     
===========================================
+ Hits         86322    86498     +176     
+ Misses       33813    33666     -147     
- Partials      3354     3357       +3     
Flag Coverage Δ
e2e 59.33% <ø> (-0.02%) ⬇️
e2e-api 46.24% <ø> (+<0.01%) ⬆️
unit 70.83% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a user confirmation step before switching the ABAC attribute store, to prevent accidental irreversible clearing of existing room attribute assignments. It does so by extending the reusable SettingField component with an optional confirmation-modal renderer, and wiring it into the ABAC settings page.

Changes:

  • Added new i18n strings for the attribute store switch confirmation modal (title + confirm button).
  • Updated ABAC settings page to show a danger GenericModal before applying an attribute store change.
  • Extended SettingField with an optional renderConfirmModal prop and added unit tests covering confirm/cancel flows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/i18n/src/locales/en.i18n.json Adds English strings for the new confirmation modal.
apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingsPage.tsx Wires the attribute store setting to display a confirmation GenericModal.
apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.tsx Adds renderConfirmModal support and modal triggering logic inside onChangeValue.
apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.spec.tsx Adds tests ensuring modal gating works and dispatch only occurs after confirm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.tsx
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

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.

2 participants