Skip to content

Fix/182 developer pagination - #217

Open
HereIsMuhammad wants to merge 5 commits into
sajeetharan:mainfrom
HereIsMuhammad:fix/182-developer-pagination
Open

Fix/182 developer pagination#217
HereIsMuhammad wants to merge 5 commits into
sajeetharan:mainfrom
HereIsMuhammad:fix/182-developer-pagination

Conversation

@HereIsMuhammad

Copy link
Copy Markdown
Contributor

Closes #182

Summary

Adds initial batching + progressive background loading for the developer
dataset instead of fetching everything (~1000 records) in one giant payload.

What changed

  • GET /api/developers?limit=&offset= — new optional pagination, ordered
    by score desc. Without limit, behaves exactly as before (full array),
    so nothing else that hits this endpoint breaks.
  • app/page.jsx now fetches a 500-record initial batch (fast TTI, loading
    overlay dismisses immediately), then quietly fetches the rest in 500-
    record background chunks, merging into state as each page arrives.
  • Guards against clobbering an active search: if the user searches while
    background pages are still loading, the growing dataset won't overwrite
    their results.
  • lib/pagination.js — extracted, unit-tested param parsing (clamping,
    defaults, backward-compat).

Testing

node --test tests/pagination.test.js — 8/8 passing.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

@HereIsMuhammad is attempting to deploy a commit to the sajeetharan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@HereIsMuhammad

Copy link
Copy Markdown
Contributor Author

@sajeetharan
Hi! Have you saw that?

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.

perf: optimize initial API payload size with batching / chunked loading

1 participant