Skip to content

The search page can show results beyond the first ten - #1500

Merged
WaylandYang merged 2 commits into
deeplethe:devfrom
Maya-Kid:codex/search-server-pagination
Nov 16, 2026
Merged

WaylandYang merged 2 commits into
deeplethe:devfrom
Maya-Kid:codex/search-server-pagination

Conversation

@Maya-Kid

Copy link
Copy Markdown
Contributor

Why

The search API returns ten hits by default and signals that more are available. The page treated those ten hits as the entire result set, so users could never reach result 11.

What changes

Request each page from the search endpoint and use has_more to control Next. A new search starts at offset zero. Users can go back or retry a failed page.

How it was checked

  • Linux Chromium 145 with a mocked search API. The regression failed on dev (f33f9fc9) because there was no Next button. It passed on c5dc9692, covering hit 11, the final page, a query change from page two, and recovery from a failed request.
  • Linux Node 20. All 50 Vitest files passed, including the new regression that distinguishes a full first page from a full final page. The benchmark helper tests and web build passed.

Before review

  • The commit is signed off (git commit -s).
  • Web build and tests pass.
  • Search controls are localized in English and Chinese.

Signed-off-by: Maya Kid <BinjunYann@gmail.com>

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — the server already supports offset/top_k/has_more, and the depth limit is handled. Merging.

@WaylandYang
WaylandYang merged commit 4d22d2a into deeplethe:dev Nov 16, 2026
6 checks passed
@Maya-Kid
Maya-Kid deleted the codex/search-server-pagination branch November 29, 2026 05:59
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.

2 participants