Repository navigation
Description
Problem
src/app/issues/page.tsx renders the bounty board — presumably the highest-traffic, most performance-sensitive route since it's the primary discovery surface for contributors per the README's feature map. fetchBounties in src/lib/api.ts has no pagination, filtering, or sorting parameters — it fetches the entire /bounties collection in one call every time the page renders. As the platform grows past a small demo dataset, this becomes a scaling problem on multiple axes simultaneously: unbounded server-side payload size and Server Component render time, no way for a contributor to filter by difficulty/asset/repo/reward-range without client-side filtering of an already-fully-loaded dataset (wasteful and eventually infeasible), and no URL-shareable filter/sort state (a contributor can't bookmark or share "beginner USDC bounties over $50" as a link).
Why this is hard
- This requires designing a pagination/filtering contract against a backend (
mergefi-backend) that, per the currently visible frontend code, has no evidence of supporting query params on/bountiesat all — you need to either verify the backend already supports this (check themergefi/backendrepo) or explicitly scope this as a paired frontend+backend change and design the frontend to degrade sensibly if backend support lands later. - Filter/sort state needs to live in the URL (Next.js
searchParamsin the Server Component) for shareability and correct back/forward browser navigation, not in client-only React state — this affects whether/issuescan remain a Server Component or needs restructuring, since readingsearchParamsin a Server Component and passing filtered/paginated results down is the correct App Router pattern but requires re-architecting howfetchBounties/adaptBountyare invoked (per-page-load with params, not once with a static fallback). - The mock-data fallback path (
fetchWithFallback/fetchBounties's catch-and-return-fallback) needs to also respect the same filter/sort/pagination params againstmock-data.tsso the "always demoable without a backend" property from the README isn't broken by this change — i.e.mock-data.tsneeds in-memory filter/sort/paginate logic mirroring what the backend would do. - Must design sensible defaults and limits (page size, max sortable fields) and handle edge cases: filters that produce zero results, invalid/out-of-range page numbers in the URL, combining multiple simultaneous filters.
Scope
- Design and document the pagination/filter/sort query contract (params, defaults, limits).
- Update
fetchBounties(andrequest) to accept and forward these params to the backend. - Add equivalent in-memory filter/sort/pagination logic for the
mock-data.tsfallback path so demos remain fully functional offline. - Restructure
src/app/issues/page.tsxto readsearchParams, pass them through, and render filter/sort controls that update the URL (not just local state). - Add an empty-state and invalid-page-number handling (e.g. clamp or redirect to a valid page).
- Coordinate/document the required backend contract as a note in the PR if backend support doesn't yet exist.
Acceptance criteria
- Filtering and sorting the bounty board produces a shareable, bookmarkable URL that reproduces the same filtered view on reload.
- The page works fully (with correct filtering/sorting/pagination) against mock data with no backend running.
- Invalid page/filter query params degrade gracefully rather than erroring the page.
Activity
Umesh-Tiruvalluru commentedon Aug 3, 2026
Hi! I'd like to work on this issue. Could you please assign it to me?
Kriss255 commentedon Aug 25, 2026
@Kriss255 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Kriss255 to this issue.
charliechinedu19-netizen commentedon Aug 25, 2026
@charliechinedu19-netizen has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @charliechinedu19-netizen to this issue.
Max347bot commentedon Aug 25, 2026
@Max347bot has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Max347bot to this issue.
danfulani0 commentedon Aug 25, 2026
@danfulani0 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @danfulani0 to this issue.
Godbrand0 commentedon Aug 26, 2026
@Godbrand0 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Godbrand0 to this issue.
drips-wave commentedon Aug 26, 2026
Congratulations, @Godbrand0! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @Godbrand0: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
grantfox-oss commentedon Sep 28, 2026
🎉 This issue has been marked as completed on GrantFox!
@Godbrand0's PR #574 was approved and merged by @chonilius.
🏆 @Godbrand0: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (564 total points). Track your full progress on GrantFox.
👏 Great work, @Godbrand0! Keep contributing to MergeFi.
drips-wave commentedon Sep 28, 2026
This issue has been completed by @Godbrand0 as part of the Stellar Wave Program's 9th Wave 🥳
😎 @Godbrand0: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Add bounty board filter/sort/pagination and validate avatar image URLs