chanzuckerberg / single-cell-data-portal

The data portal supporting the submission, exploration, and management of projects and datasets to cellxgene.
MIT License
63 stars 12 forks source link

bug( ): Extra API calls when viewing a collection detail page directly #4077

Closed NoopDog closed 1 year ago

NoopDog commented 1 year ago

Describe the bug

When the user views a collection detail page directly e.g by pasting the URL into the address bar or following a link on an external site, extra requests to the back end are made.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://cellxgene.cziscience.com/collections/296237e2-393d-4e31-b590-b03f74ac5070
  2. in the network tab see the extra requests.

image.png

Expected behavior

The collection detail API (/v1/collections/{collection_id}) is only called once

Environment

All

Additional context

The fact that the collections endpoint is being hit at all for the detail page is addressed in a separate ticket:

bug( ): Extra API calls to collection endpoints when accessing portal collection detail page#4075

NoopDog commented 1 year ago

Adding to the Curators can filter Collections by curator and status epic as the FE caching and refresh strategy is related to this issue. Hoping we can fix this with the changes for the epic.