Skip to content

BountyCard's Link relies on Next.js's default prefetch-on-visible behavior, which combined with request()'s hardcoded no-store caching triggers a full uncached backend fetch for every scrolled-past bounty #271

Closed

Description

@chonilius

src/components/bounty/BountyCard.tsx links to each bounty's detail page with a plain
next/link:

<Link href={`/issues/${bounty.id}`} className="relative block ...">

Next.js's <Link> prefetches the linked route by default whenever it scrolls into the
viewport in production — this is a deliberate framework feature, not a bug on its own.
Combined with src/lib/api.ts#request()'s hardcoded cache: "no-store" (used by
fetchBounty, which /issues/[id]/page.tsx calls on every render), every one of those
automatic prefetches triggers a full, live, uncached round trip to mergefi-backend for
that specific bounty — not just for cards the visitor actually clicks, but for every card
that merely scrolls into view while browsing /issues.

On a bounty list with many cards (once pagination/infinite scroll exists, or simply on a
long single page today), this means scrolling through the list alone generates one live
backend request per card shown, none of which can be served from cache, regardless of
whether the visitor ever opens any of them.

Suggested fix: either disable prefetch on BountyCard's Link (prefetch={false}) since
the detail page's data can't benefit from prefetching anyway under the current no-store
policy, or allow fetchBounty's underlying request() call to use a short-lived cache
window so a prefetch and a subsequent real navigation can share one fetch instead of
issuing two.

Activity

  1. added
    performance
    bug
    very hard
    help wanted
    on Aug 21, 2026
  2. added
    Stellar Wave
    on Aug 25, 2026
  3. edrizxabdulganiyu-blip commented on Aug 25, 2026

    @edrizxabdulganiyu-blip

    @edrizxabdulganiyu-blip has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello Maintainer, I’ve reviewed the issue description and I’m confident I can work on it effectively. Please assign it to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @edrizxabdulganiyu-blip to this issue.

  4. Abbyhay commented on Aug 25, 2026

    @Abbyhay

    @Abbyhay has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello, I’ve carefully assessed the issue and believe I can provide an appropriate fix that meets the acceptance criteria. Kindly consider me for the assignment.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Abbyhay to this issue.

  5. Ova-Klik commented on Aug 25, 2026

    @Ova-Klik

    @Ova-Klik has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    hello can i work on this issue please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ova-Klik to this issue.

  6. ijeoma270 commented on Aug 25, 2026

    @ijeoma270
    Contributor

    @ijeoma270 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    hello can i work on this issue please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @ijeoma270 to this issue.

  7. drips-wave commented on Aug 25, 2026

    @drips-wave

    Congratulations, @ijeoma270! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

    🧑‍💻 @ijeoma270: 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 🌊

  8. added a commit that references this issue on Aug 25, 2026
  9. drips-wave commented on Aug 25, 2026

    @drips-wave

    This issue has been completed by @ijeoma270 as part of the Stellar Wave Program's 8th Wave 🥳

    😎 @ijeoma270: 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.

  10. removed
    Stellar Wave
    on Oct 15, 2026
  11. added
    Stellar Wave
    on Oct 15, 2026
  12. removed
    Stellar Wave
    on Oct 15, 2026
  13. added
    Stellar Wave
    on Oct 15, 2026
  14. removed
    Stellar Wave
    on Oct 15, 2026
  15. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar Wavebughelp wantedperformancevery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions