Skip to content

bug(platform): Website content-search failures are rendered as no results #3860

Closed

Description

@yannickmonney

Bug: Website content-search failures are rendered as no results

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

Reproduction

Open WebsiteViewDialog for a site with one indexed page. Enter broken in Search website content and submit it while the websites/actions:searchContent action rejects with a 503. The settled dialog retains broken in the input, renders the normal No results found copy, and renders no Retry control. The only feedback is a transient destructive toast. A user cannot tell whether the site has no match or the search request failed, and must guess that submitting another query or reopening the dialog may recover.

The replay probe rendered the actual component and passed one test after the rejected action. Its settled DOM was Website details … Website pages 1 indexed … No results found … Try another term, or clear the search to browse all pages. with no Retry control.

Root cause

In services/platform/app/features/websites/components/website-view-dialog.tsx at source SHA 9ea59724df24d62729a9360f3902d964dab39b3e, the search action's onError callback at lines 337-350 only clears isSearching and emits a toast. It does not record a failed search state or clear/replace activeQuery. The render branch at lines 625-639 therefore treats searchResults=[] with a non-empty activeQuery as a successful empty result and shows the no-results state.

Expected behavior is a distinct failed-search state that preserves the query and offers Retry for the same request. This is distinct from the out-of-order success race (which displays the wrong successful response), the initial pages-read failure (which concerns fetchPages), and the shared engagement-list error wiring.

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

    agent-readybugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions