Skip to content

Conversation

@ArtemHoruzhenko
Copy link
Collaborator

@ArtemHoruzhenko ArtemHoruzhenko commented Nov 27, 2025

What

Because of redux we might have a situation when masters array is empty when successfully added master groups is > 0. For such cases I've enhanced checks to not show notifications at all

Testing

Added storybook scenario, it could be verified there


Note

Hide MessageBar and compute failure count safely when masters is empty; add Storybook case to verify no notification is shown.

  • UI (SentinelDatabasesResult.tsx)
    • Safely compute countFailAdded when masters is empty.
    • Show MessageBar only when masters.length > 0.
  • Storybook
    • Add NoNotificationWhenMastersAreNotProvided scenario to validate no notification with empty masters.

Written by Cursor Bugbot for commit 8731d18. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.88% 20945/25273
🟡 Branches 68.1% 8839/12980
🟡 Functions 77.94% 5723/7343
🟢 Lines 83.29% 20512/24627

Test suite run success

5424 tests passing in 703 suites.

Report generated by 🧪jest coverage report action from 8731d18

Comment on lines +48 to +49
const countFailAdded = masters?.length
? masters.length - countSuccessAdded
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this be negative?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

based on code - yes. In reality successfully added databases should be always <= masters number. This particular fix just ensures that masters are presented.

@ArtemHoruzhenko ArtemHoruzhenko merged commit 88f7116 into main Nov 28, 2025
27 of 28 checks passed
@ArtemHoruzhenko ArtemHoruzhenko deleted the fe/bugfix/RI-7782-fix-sentinel-discovery-result-notifications branch November 28, 2025 06:54
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.

5 participants