Skip to content

Feature/partner-search: stop pagination at the candidate ceiling - #4399

Open
Joker666 wants to merge 3 commits into
fix/search-box-debounce-and-precedencefrom
improvement/partner-search-pagination-cap
Open

Feature/partner-search: stop pagination at the candidate ceiling#4399
Joker666 wants to merge 3 commits into
fix/search-box-debounce-and-precedencefrom
improvement/partner-search-pagination-cap

Conversation

@Joker666

Copy link
Copy Markdown
Collaborator

Partner search: stop pagination at the candidate ceiling

Stacked on fix/search-box-debounce-and-precedence. Addresses a limitation of #4333: a search reports its exact total (say "12,000 partners") while the list can only serve the top 999 ranked candidates, so Next kept walking into guaranteed-empty pages ("No partners found" from page 41 onward at 25 rows per page).

What changed

  • maxBrowsableRows on useTable/Table (opt-in). The page count TanStack sees is clamped to min(rowCount, maxBrowsableRows), so Next stops on the last servable page, while the footer keeps reporting the exact total from rowCount.
  • Out-of-range deep links snap back. A URL or saved view pointing past the browsable range moves to the last valid page instead of landing on an empty state.
  • The clamp only runs when the cap is opted in. rowCount is 0 while a count is still loading, and clamping on that would reset a deep-linked page on every paginated table before the real count arrives.
  • Wired into the three tables that search through the provider: partners, partner applications, and rejected applications. The admin network table queries its own endpoint with no candidate ceiling and is untouched.

The ceiling stays a deliberate trade (see #4333); this only makes the UI honest about it.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dub Ready Ready Preview Aug 26, 2026 6:28pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e22b3b4-183c-442d-81e8-8ba6d1bc0dbf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Joker666
Joker666 force-pushed the improvement/partner-search-pagination-cap branch 3 times, most recently from 94015fa to 9803f91 Compare August 26, 2026 17:41
Search reports its exact total while the list serves only the top 999
candidates, so Next could page into guaranteed-empty pages. Adds an
opt-in maxBrowsableRows to the table: navigation stops at the last
servable page, the footer keeps the exact total, and out-of-range deep
links snap back. Wired into the three partner tables that search
through the provider.
@Joker666
Joker666 force-pushed the improvement/partner-search-pagination-cap branch from 9803f91 to 3766e5a Compare August 26, 2026 17:42
@Joker666 Joker666 changed the title Partner search: stop pagination at the candidate ceiling Feature/partner-search: stop pagination at the candidate ceiling Aug 26, 2026
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