feat: add loading state for app filters and update getRows logic#3082
Merged
Conversation
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Devtron app list table behavior while app-filter data (environments/namespaces) is still loading, preventing premature/undesired app-list fetching and showing a table-level loading state during filter fetch.
Changes:
- Gate
getRowsto return an empty result whileappFiltersResponseLoadingis true. - Update
getRowshook dependencies to includeappFiltersResponseLoading. - Pass
appFiltersResponseLoadingto theTablecomponent via itsloadingprop.
Comments suppressed due to low confidence (1)
src/components/app/list/DevtronAppListContainer.tsx:167
updateDataSyncing(false)won’t run ifgetAppList(...)rejects (network error) or is aborted via the passedsignal, which can leave the parentisDataSyncingstate stuck. Wrap the request intry/finally(and optionally handle abort separately) so syncing is always reset, even on errors/cancellation.
updateDataSyncing(true)
const data = await getAppList(getDevtronAppListPayload(filterConfig, environmentList, namespaceList), {
signal,
})
updateDataSyncing(false)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
arunjaindev
previously approved these changes
Mar 27, 2026
vivek-devtron
previously approved these changes
Mar 27, 2026
…s in NameCellComponent
48fe6f7
arunjaindev
approved these changes
Mar 27, 2026
|
vivek-devtron
approved these changes
Mar 27, 2026
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.



Description
This pull request enhances the
DevtronAppListContainercomponent to better handle loading states when application filters are being fetched. The main improvement is ensuring that the app list table does not attempt to load or display data while filter responses are still loading, which helps prevent inconsistent or empty data from being shown to users.Loading state management improvements:
getRowsfunction now checks theappFiltersResponseLoadingflag and returns an empty result with zero rows if filters are still loading, preventing unnecessary data fetches and UI flicker.getRowscallback was updated to includeappFiltersResponseLoading, ensuring the effect is recalculated when the loading state changes.Tablecomponent now receives theappFiltersResponseLoadingflag as itsloadingprop, so the table displays a loading state while filters are being fetched.Prop handling:
DevtronAppListcomponent now accepts theappFiltersResponseLoadingprop, allowing it to respond to the filter loading state.Fixes https://github.com/devtron-labs/sprint-tasks/issues/2865
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: