You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setExportLoading(false) is called immediately after runQuery, causing the loading indicator to stop before the download completes and duplicating state updates. Consider removing the extra call outside the download promise.
There's no .catch on monolithStore.runQuery, so failures in the initial request won't reset the loading state or surface an error notification. Consider adding error handling for the query promise.
response.errors is accessed without checking if it exists, which could cause a runtime error. Ensure errors is defined or guard against undefined before checking length.
Remove the premature setExportLoading(false) call after initiating the runQuery promise, since it resets the loading state immediately instead of waiting for the download to finish.
-setExportLoading(false);+// remove this line entirely so loading remains true until download handlers run
Suggestion importance[1-10]: 8
__
Why: The extra setExportLoading(false) at line 105 resets the loading state before the download promise resolves, causing incorrect UI feedback and should be removed.
Medium
Handle runQuery failures
Add a .catch handler on the runQuery promise to handle failures, reset loading state, and show an error notification if the initial query fails.
Why: Adding a .catch on monolithStore.runQuery is important to surface query errors and reset the loading state, preventing unhandled promise rejections.
Medium
Check errors before download
Validate that response.errors is empty before calling download; if there are errors, skip download, show an error notification, and reset the loading state.
Why: Guarding the download call on response.errors helps avoid unnecessary network requests if the query failed, though the PR already checks errors post-download.
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
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.
on click of export in the engine page added success message