Skip to content

Empty/loading flash on org/user/search pages when stored search provider is npm #2768

@Adebesin-Cell

Description

@Adebesin-Cell

Follow-up to #2753 (fixed in #1952).

After landing the hydration fix, SSR for /org/[name], /~/[user], and /search always renders with the default provider (algolia), then after app:mounted useEffectiveSearchProvider flips the async-data key to the user's stored preference (npm) and useLazyAsyncData refetches. While the refetch is in flight, the data ref resets to emptySearchResponse, so the page briefly shows an empty/loading state before the npm-backed results render.

The npm provider path is also slower (e.g. useOrgPackages fans out per-package metadata requests at concurrency 10), making the flash more visible than it would be with Algolia.

Repro:

  1. /settings → set Data source to npm registry.
  2. Hard-reload /org/nuxtjs (or any user/search page without ?p=).
  3. Page renders Algolia data → briefly flashes to "Loading packages." / 0 / week → finally shows npm-backed results.

Expected: keep the previously-rendered (Algolia) data visible while the npm refetch is in flight, so the swap is seamless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions