fix: ensure loading spinner stops when marketplace app installation fails#38524
fix: ensure loading spinner stops when marketplace app installation fails#38524dodaa08 wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
WalkthroughA single file in the marketplace app's AppStatus component is modified to wrap the onSuccess handler logic in a try-finally block, ensuring the loading state is cleared regardless of whether an error occurs during action execution. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #38524 +/- ##
===========================================
+ Coverage 70.35% 70.38% +0.03%
===========================================
Files 3161 3161
Lines 110650 110652 +2
Branches 19883 19875 -8
===========================================
+ Hits 77843 77885 +42
+ Misses 30777 30742 -35
+ Partials 2030 2025 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
aleksandernsilva
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
Could you also implement some unit tests covering this behavior?
Yeah sure, let me try |
Proposed changes (including videos or screenshots)
Fixes a UI issue where the Marketplace Install button spinner never stops when an app installation fails.
The loading state is now properly reset on failure so the spinner stops and the UI does not remain stuck.
Screencast.From.2026-02-06.12-41-30.mp4
Issue(s)
Fixes #38523
Also Fixes #35518
A similar issue where spinner doesn't stop.
After:
Screencast.From.2026-02-06.13-12-12.mp4
Steps to test or reproduce
Run server locally
Further comments
The fix uses a try-finally pattern which is the standard approach for ensuring cleanup code runs regardless of success/failure. We intentionally don't use try-catch because we want errors to propagate to the existing error handling infrastructure (React Query's
onError
→
handleAPIError()
→ toast notification).
This is a minimal, focused fix that only addresses the loading state management without changing any business logic or error handling behavior.
Summary by CodeRabbit