Skip to content

fix: ensure loading spinner stops when marketplace app installation fails#38524

Open
dodaa08 wants to merge 1 commit intoRocketChat:developfrom
dodaa08:fix/Marketplace-Loading
Open

fix: ensure loading spinner stops when marketplace app installation fails#38524
dodaa08 wants to merge 1 commit intoRocketChat:developfrom
dodaa08:fix/Marketplace-Loading

Conversation

@dodaa08
Copy link
Contributor

@dodaa08 dodaa08 commented Feb 6, 2026

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

  1. Open Marketplace
  2. Try installing any app
  3. Force installation failure
  4. Spinner should stop and show error state

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

  • Bug Fixes
    • Improved error handling to ensure the loading indicator is properly cleared during marketplace app status actions, preventing the UI from remaining in a loading state.

@dodaa08 dodaa08 requested a review from a team as a code owner February 6, 2026 08:11
@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: c4ce436

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 6, 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 6, 2026

Walkthrough

A 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

Cohort / File(s) Summary
Error Handling Enhancement
apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppStatus/AppStatus.tsx
Wraps onSuccess handler body in try-finally block to guarantee setLoading(false) executes even if an error occurs during marketplace action or request operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A loading state that wouldn't clear,
Now wrapped in try-finally, no fear!
Though errors dance and actions sway,
The finally block saves the day! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding error handling to ensure the loading spinner stops when marketplace app installation fails, which aligns with the code modification using try-finally pattern.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.38%. Comparing base (ac9065f) to head (c4ce436).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 60.36% <0.00%> (+0.04%) ⬆️
e2e-api 48.83% <ø> (+1.07%) ⬆️
unit 71.36% <0.00%> (+<0.01%) ⬆️

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
Contributor

@aleksandernsilva aleksandernsilva left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
Could you also implement some unit tests covering this behavior?

@dodaa08
Copy link
Contributor Author

dodaa08 commented Feb 6, 2026

Thanks for the contribution! Could you also implement some unit tests covering this behavior?

Yeah sure, let me try

@dougfabris dougfabris added contrib: valid A valid contribution where maintainers will review based on priority area: ui Touches the code on client side labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Touches the code on client side contrib: valid A valid contribution where maintainers will review based on priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install spinner stuck after failed marketplace install fix: Loading Stays Active When Clicking Outside Iframe Popup.

3 participants