EDM-2216: Improve UX of showing results after resuming all devices#358
Merged
celdrake merged 1 commit intoOct 1, 2025
Merged
Conversation
WalkthroughIntroduces pluralized i18n keys for resume-related messages, updates MassResume modal to use count-based translations, and refactors the ResumeAllDevicesConfirmationDialog to perform an async resume request, return the resumed count via onClose, and present pre-/post-action modal content with success/warning/error handling. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant M as MassResumeDevicesModal
participant C as ResumeAllDevicesConfirmationDialog
participant API as POST /deviceactions/resume
U->>M: Open mass resume
M->>C: Open dialog (devicesToResume)
C->>U: Show confirmation (count-based i18n)
U-->>C: Confirm
activate C
C->>API: Resume devices request
API-->>C: { resumedCount } or error
C-->>U: Show result (success/warning/error)
C-->>M: onClose(resumedCount | undefined)
deactivate C
M->>U: Toast with "{{ count }} devices were resumed" (count=resumedCount)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
libs/i18n/locales/en/translation.json(1 hunks)libs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsx(3 hunks)libs/ui-components/src/components/modals/massModals/ResumeDevicesModal/ResumeAllDevicesConfirmationDialog.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
libs/ui-components/src/components/modals/massModals/ResumeDevicesModal/ResumeAllDevicesConfirmationDialog.tsx (5)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)apps/standalone/src/app/hooks/useFetch.ts (1)
useFetch(5-51)libs/types/models/DeviceResumeRequest.ts (1)
DeviceResumeRequest(8-17)libs/types/models/DeviceResumeResponse.ts (1)
DeviceResumeResponse(8-13)libs/ui-components/src/utils/error.ts (1)
getErrorMessage(6-17)
libs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsx (1)
libs/ui-components/src/types/extraTypes.ts (1)
FlightCtlLabel(15-19)
⏰ 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). (2)
- GitHub Check: integration-tests
- GitHub Check: Lint
rawagner
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When targeting all devices for resume, the second modal was closing immediately and it was not clear what the outcome had been, since the action is very quick.
Now we show the result explicitly in the second modal, and when it is closed, we also show the details in the first modal.
Pending a more in-depth UX review, this should improve the current experience.
Summary by CodeRabbit
New Features
Improvements