Skip to content

bug(platform): Website details skips a page after a failed Load more request #3851

Closed

Description

@yannickmonney

Bug: Website details skips a page after a failed Load more request

  • Classification: confirmed candidate defect, P2 (later pages can disappear permanently).
  • Source SHA: 9ea59724df24d62729a9360f3902d964dab39b3e.
  • Evidence: products-websites-next-load-more-error-evidence.md; an isolated current-component Vitest probe passed the offset-sequence assertion.

Reproduction

  1. Open WebsiteViewDialog with more than one page of crawled results.
  2. Let the initial offset-0 fetch succeed with hasMore: true.
  3. Click Load more and make the offset-20 request fail.
  4. Click Load more again after the error toast.

The actual action offsets are [0, 20, 40]: the dialog commits offset=20 before the request resolves, so the next click computes 40. Page 20 is never requested again and the UI has no retry for the failed page. The probe rendered the actual dialog and recorded those offsets.

Root cause

services/platform/app/features/websites/components/website-view-dialog.tsx:373-381 calls setOffset(offset + PAGE_SIZE) before fetchPages resolves. The shared onError at :317-335 only clears the first-load flag and shows a toast; it does not restore the prior offset or store a failed-page retry target. hasMore remains true, so the next click skips ahead.

Expected / actual

Expected: retain the failed offset and make Retry request 20 again, with a visible later-page error. Actual: a transient failure silently drops one page of crawl results and ordinary clicking cannot recover it.

Deduplication

This is distinct from the initial pages-read issue: it concerns a successful first page followed by a later-page failure and an unrecoverable offset transition. It is also distinct from the shared list-table error wiring.

Suggested repair

Advance the offset only after a successful response, or restore it on error and expose a retry action for that page. Add a regression asserting the second click retries offset 20.

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