Skip to content

site-admin: fix loading state when loading feature flags

Warren Gifford requested to merge fix-query-feature-flags-state into main

Created by: bobheadxi

On fetching feature flags, rather than unwrapping the Observable and then wrapping it back into an observable in queryFeatureFlags with of, leave it as an Observable and use piping stuffs inside queryFeatureFlags. This allows the loading state of FilteredConnection work correctly - previously, when loading, feature flags will be undefined and fall back to a list of empty nodes, and the list view will show "no results" rather than "loading".

Related to https://github.com/sourcegraph/sourcegraph/issues/31182

Test plan

sg start web-standalone

Spam reload the /site-admin/feature-flags page, see loading indicator

Merge request reports

Loading