Skip to content

Search function is not working sometimes #1198

Description

@Lexachoc

Sometimes the documentation search is not working:
Image

It shows nothing.

But if I click on the Search button and wait for 2 seconds and type useMutation, it will return the results:
Image

This problem seems to have been around for a while, as I met the same problem a few months ago.

To reproduce:

  1. open any doc page, e.g., https://tanstack.com/query/latest/docs/reference/onlineManager
  2. click on the search button, then paste useMutation
  3. if you haven't see the issue, you might need to reload page and redo step 2.

Activity

  1. tannerlinsley commented on Aug 31, 2026

    @tannerlinsley
    Member

    Source audit evidence:

    • The attached failed state still says “Results for useMutation”. In the current source, that summary only renders when useInstantSearch().results.nbHits is greater than zero, while the visible rows come from useInfiniteHits(). This narrows the symptom to those two InstantSearch views getting out of sync, not a simple zero-hit query.
    • I ran 12 fresh Chromium first-open trials against the reported Query page. Every completed trial returned HTTP 200 from Algolia with 14 or 15 query hits and rendered 16 command items. I could not reproduce the empty list.
    • Open PR fix(search): focus cmdk input on first modal open #1021 changes first-open preloading and focus, and Replace Kapa with TanStack AI and Algolia Agent Studio #1184 changes the AI chat integration. Neither owns this useInstantSearch / useInfiniteHits mismatch.

    An automatic fix would be speculative without the failed request or client state. The most useful next evidence is a preserved browser console plus the Algolia POST and response from a failed attempt, including request order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source-auditTracked by the automated source audit

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions