Skip to content

feat(platform): filter a website's pages to the failed or skipped ones - #4065

Merged
larryro merged 1 commit into
mainfrom
feat/website-pages-state-filter
Oct 2, 2026
Merged

larryro merged 1 commit into
mainfrom
feat/website-pages-state-filter

Conversation

@larryro

@larryro larryro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

"47 indexed · 5 pages failed" was a number beside a list that hid the five, twenty rows at a time, ordered by last crawl. Finding a failed or a skipped page meant paging through everything and looking for a red label.

What changed

  • Dialog: a segmented control above the page list — All · Failed (n) · Skipped (n) — shown as soon as a page failed or was skipped; the "n pages failed" count in the section header is now a link-styled button that opens the failed pages. Each switch reads from the top under that state with its own Load more; a scan that moves the row re-reads under the open state; an answer for a state the reader has left is dropped; a segment at 0 says so instead of showing an empty list. The content search is unaffected.
  • Pages read (websites/actions:fetchPages, app door GET …/pages, REST GET /api/v1/websites/:id/pages): ?state=failed|skipped narrows the window; total/hasMore count that state; every answer carries counts (both numbers) and echoes state. A junk state is 400 (INVALID_QUERY over REST). The REST cursor is minted under the filtered list, so a cursor from the failed pages is refused without the filter.
  • One definition of failed/skipped: FAILED_PAGE_SQL / SKIPPED_PAGE_SQL in core/websites/types.ts feed the row sync's failedPageCount, the filter and the counts, so the number a reader sees and the list it opens agree. A page whose failure cost it no strike (charged to the render lane) now shows its reason in the list too; it was already counted as failed.
  • Locales en/de/fr (pagesDialog.filter.*, noFailedPages, noSkippedPages); docs: crawling guide and REST reference in three languages; manual KNOW-F36 + automation row.

Proof

  • backend/domains/websites/routes.test.ts, backend/rest/v1-websites.test.ts (state passthrough, state-bound cursor, 400 on junk), app/features/websites/components/website-view-dialog.test.tsx (count → Failed, segments, per-state empty, uncharged failure reason): websites feature 87 UI tests and 604 server tests pass.
  • backend/integration-check.ts, lane checkWebsitesCrawl: ?state=failed returns the failed home page alone with counts {failed:1, skipped:0}, ?state=skipped is empty, ?state=broken is 400 — run locally on a throwaway tale-db built from this tree (see the last comment for the tally).
  • tsc --noEmit, oxlint --type-aware, format:check, lint:links, lint:manual, check-guide on the knowledge suite, locale parity: green.
  • Not observed in a browser.

"47 indexed · 5 pages failed" was a number beside a list that hid the
five, twenty rows at a time. The page list gets a segmented filter
(All · Failed · Skipped) with counts, the count in the header opens the
failed pages, and the pages read (app door and REST) takes
`?state=failed|skipped`, counts that state, answers both counts and
binds its cursor to the state. One SQL definition of failed and skipped
feeds the row's failedPageCount, the filter and the counts.
@larryro

larryro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Local run of the checkWebsitesCrawl lane on a throwaway tale-db:itest built from this tree (PG on 54329, MinIO on 59002):

PASS  websites pages: the list narrows to the failed or the skipped pages and counts both — failed=failed/1/https://itest-down.example//counts {"failed":1,"skipped":0} (want failed/1/https://itest-down.example//{failed:1,skipped:0}) skipped=skipped/0/0 (want skipped/0/0) badState=400 (want 400)
PASS  websites scan end: a site whose every page failed reads error with the reason, never active — created=true row=error/error reason=No page could be stored: 1 of 1 attempted pages failed (http_error) corpus=error/error (No page could be stored: 1 of 1 attempted pages failed (http_error)) home=discovered/http_error (want discovered/http_error) counts=1/1 1/1 filter=true badFilter=400/400 dele
[itest] 38/38 checks passed across 1/1 lanes — ITEST_LANES=checkWebsitesCrawl: a filtered run, not full coverage

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant