Skip to content

Usage page can spin indefinitely when a request never settles #8355

Description

@talissoncosta

The Flagsmith organisation with the "Disabled Flags" project selected shows a spinner that never resolves.

Why it can hang

isLoading is loadingOrganisation || loadingUsage || loadingLimit. There is no upper bound on any of them. A request that never settles, rather than failing, leaves the page spinning with nothing to say.

A request that errors is handled: isError renders "Usage could not be loaded". The gap is a request that neither resolves nor rejects, or one slow enough to look that way.

What to do

  • find out what the usage endpoint does for that project, since a response that never arrives is a backend problem first
  • give the page a way out regardless: after some threshold, say the data is taking longer than expected rather than spinning indefinitely
  • an indefinite spinner is the least useful state on the page, and it is the one we currently fall into by default

Done when

No combination of organisation and project leaves the page spinning with no explanation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    front-endIssue related to the React Front End Dashboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions