Skip to content

bug(platform): Website search shows old results while the input contains a new query #3871

Closed

Description

@yannickmonney

Bug: Website search shows old results while the input contains a new query

  • Classification: P3 confirmed product defect (Website details search)
  • Source SHA: 9ea5972
  • Evidence: /Users/yannick/.codex/notes/tale-1000-additional/products-websites-next-search-input-stale-results-evidence.md
  • Scope: isolated local jsdom/Vitest component probe; no production network or writes.

Reproduction

Open WebsiteViewDialog, submit the content query alpha, and let the actual search action return an alpha result. Then edit the non-empty input directly to beta without pressing Enter. The real dialog shows beta in the input while the alpha result remains in the result list. It has no submitted-query label to tell the user that the visible results belong to an older query. The replay probe passed one test against source SHA 9ea59724df24d62729a9360f3902d964dab39b3e.

Root cause and impact

website-view-dialog.tsx updates searchQuery in handleSearchChange, but only clears activeQuery and searchResults when the new value is empty. A non-empty edit leaves the previous activeQuery and result array intact until Enter triggers another request. The results branch does not render activeQuery, so the UI visually combines a new query with old content. Users can act on or cite the wrong page excerpt, especially when editing a term to refine a search.

Expected behavior is to mark results stale or clear them when a non-empty input differs from the submitted query, or to display the submitted query and an explicit Search action. This is distinct from the out-of-order response race and from a rejected search being shown as no results.

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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions