Repository navigation
Description
Problem
The README explicitly states data fetching relies on Server Components hitting the backend with no mention of any real-time layer, and the roadmap section says "Real-time bounty/escrow status via websockets or polling once the backend emits webhook-driven events" is future work — meaning today, bounty/escrow status displayed to a user is only as fresh as their last full page load/navigation. For a flow this time-sensitive (a contributor waiting to see their claim register as accepted, a maintainer waiting to see a PR-merge trigger an on-chain payout, a sponsor watching budget deplete as bounties get funded by others), the current architecture has no mechanism for a user to discover a state change without manually refreshing, and worse, if two users are looking at the same bounty (e.g. two contributors both considering claiming it), there's no protection against a stale-render race where both see "open" simultaneously, both attempt to claim, and the UI gives no indication of the resulting conflict beyond whatever apiRequest's generic error surfacing does for the loser of the race.
Why this is hard
- Full websocket infrastructure is explicitly out of scope per the roadmap (that's a backend-driven event system that doesn't exist yet) — this issue is about the best achievable interim UX given that constraint: designing and implementing smart polling (not naive
setIntervalfetch-everything) for the specific views where staleness is most costly (an open bounty's claim status while a contributor is actively viewing it, an escrow/funding status while a transaction is pending). - Must avoid the classic naive-polling failure modes: polling that doesn't pause when the tab is backgrounded (wasting requests and battery), polling that doesn't back off when the resource stops changing, polling that fights with the
cache: "no-store"Server Component fetch model (this needs to happen client-side, meaning the relevant status-sensitive fragments need to become Client Components with their own fetch loop, which is an architectural change from the current all-Server-Component-with-fallback pattern for at least these specific fragments). - The claim-race scenario specifically needs a designed resolution: when a claim attempt fails because someone else claimed first (the backend should reject the second claim), the frontend needs to detect this specific failure reason (distinct from a generic network/validation error — check whether the backend error
message/status code distinguishes "already claimed" from other 4xx causes, and if not, flag it as a needed backend contract) and show a clear "someone else claimed this first" message with an updated view of the bounty's new state, not a generic error toast. - Needs to define the specific set of views/fragments that get polling treatment (likely: the bounty detail page's status/claim section, and an in-progress claim/fund/deposit's confirmation status) rather than blanket-polling every route, which would be wasteful and against the Server-Component-first architecture the rest of the app uses.
Scope
- Identify and scope the specific status-sensitive UI fragments that justify client-side polling (bounty detail claim status, in-flight transaction confirmation).
- Implement a reusable polling hook with tab-visibility awareness (pause when backgrounded) and backoff when no change is observed over several polls.
- Add specific detection and UX for the "lost the claim race" scenario, distinct from generic errors; flag any needed backend error-code contract in the PR if the backend doesn't currently distinguish this case.
- Document why full websockets are out of scope for this change and what the interim polling approach covers vs. doesn't.
Acceptance criteria
- The bounty detail page's claim status reflects a change made by another user within the defined polling interval, without a manual refresh.
- Polling pauses when the tab is backgrounded and resumes on refocus, verified via network call inspection.
- A user who loses a claim race sees a specific, clear message distinct from a generic error, with the bounty's current state updated in view.
Activity
Truphile commentedon Jul 18, 2026
Hi team, I’d love to take this on!
I am a software engineer experienced in React Server Component (RSC) hybrid architectures, client-side caching strategies, and resilient polling patterns. I am ready to implement this smart client-side polling solution to eliminate stale-render data visibility windows.
I will deliver:
Targeted Client Fragments: Convert the specific status/claim blocks on the bounty detail page and the pending transaction confirmation modals from Server Components to Client Components to house the fetch loops.
Smart Polling Hook (useSmartPolling.ts):** Build a reusable hook utilizing SWR or native fetch that detects tab visibility changes (document.hidden) to pause background executions, implementing an exponential backoff sequence when resources remain unchanged.
Conflict Resolution UX: Add explicit error interception to detect "already claimed" backend 409 responses, replacing generic error toasts with a clear "Someone else claimed this first" conflict-resolution layout that force-refreshes the current view.
Architecture Strategy: Document the interim polling framework boundaries in the repository documentation, explicitly outlining why a full WebSocket transport layer is out of scope for this deliverable.
The Fix: Rather than blanket-polling everything, we encapsulate only the highly time-sensitive sub-components into Client Components. This completely fixes race-condition visibility gaps while keeping our lean, Server-Component-first core architecture intact.
Ready for assignment to drop a complete, highly responsive PR immediately!
mordabdul1 commentedon Jul 19, 2026
Hi, I'm mordabdul1. This issue is a good fit for my experience. I'll follow the existing architecture, handle edge cases, and ensure the implementation satisfies all acceptance criteria
Emoji-dot commentedon Aug 30, 2026
@Emoji-dot 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 @Emoji-dot to this issue.
Yasir-TechGuy commentedon Aug 30, 2026
@Yasir-TechGuy 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 @Yasir-TechGuy to this issue.
rilwanubala commentedon Aug 30, 2026
@rilwanubala 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 @rilwanubala to this issue.
drips-wave commentedon Aug 30, 2026
Congratulations, @Yasir-TechGuy! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @Yasir-TechGuy: 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 🌊
drips-wave commentedon Aug 30, 2026
This issue has been completed by @Yasir-TechGuy as part of the Stellar Wave Program's 8th Wave 🥳
😎 @Yasir-TechGuy: 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.
feat: add smart polling with claim-race detection for bounty status (…
Fix: Wire up smart-polling/claim-race, Tabs a11y, request timeout, CS…