Repository navigation
Description
Problem
src/lib/api.ts#apiRequest (used for all user-triggered mutating actions: claim, fund, deposit) has no retry, no rate-limit awareness, and no request deduplication/in-flight tracking. Combined with the lack of visible disabled/pending states audit needed in IssueActions.tsx/MilestoneActions.tsx (see the interrupted-flow issue in this batch), there's a related but distinct risk: nothing prevents a user from rapidly re-clicking "claim" or "fund" before the first request resolves, generating multiple concurrent identical requests. If the backend applies rate limiting (a reasonable assumption for a financial-action API, whether or not it currently does), apiRequest's error handling treats a 429 identically to any other non-2xx error — surfacing whatever generic message the backend body provides with no special handling (no backoff-and-retry suggestion, no "you're doing that too fast, wait Ns" UI), and worse, if multiple concurrent duplicate requests are in flight and the backend isn't perfectly idempotent, they risk being processed as separate actions.
Why this is hard
- Requires designing an in-flight request tracking/deduplication layer at the
apiRequest/apiPostlevel (or at each call site) that's generically reusable across claim/fund/deposit/wallet-link actions rather than a one-off fix per component, since this is a systemic gap in the shared API client, not a single call site's bug. - Must distinguish, in the UI, between a request that's deduplicated client-side (silently ignore the duplicate click, no user-visible error) versus a genuine 429 from the backend (show a clear rate-limit message, ideally respecting a
Retry-Afterheader if the backend sends one — check whetherapiRequest's current error handling even reads response headers at all, since it currently only readsres.text()/res.status). - Needs to correctly interact with the idempotency-key work from the interrupted-flow issue in this batch — deduplication and idempotency solve related but distinct problems (client-side accidental double-submit vs. server-confirmed exactly-once execution across retries) and the design here should compose with, not duplicate, that work.
- Button/CTA-level disabled states need auditing across every mutating action's UI (
IssueActions.tsx,MilestoneActions.tsx, the wallet connect button, any settings/profile mutation) to confirm they're actually disabled during an in-flight request, not just "usually is because the developer remembered" — this requires reading each component, not assuming.
Scope
- Add in-flight request deduplication to
apiRequest/apiPost(or a wrapping layer) keyed by request signature, silently coalescing duplicate rapid-fire submissions. - Add
Retry-After-aware 429 handling with a clear, distinct UI message from other error types, inApiRequestErrorand its consumers. - Audit every mutating-action UI (claim, fund, deposit, wallet link, and any others found) for correct disabled-during-pending state; fix any that are missing it.
- Add tests simulating rapid double-clicks and simulated 429 responses.
Acceptance criteria
- Rapidly clicking a claim/fund/deposit CTA multiple times results in exactly one network request being sent (or clearly coalesced), verified via network call count.
- A simulated 429 response shows a distinct, actionable rate-limit message, honoring
Retry-Afterif present.
Activity
tilljack60-cmd commentedon Aug 25, 2026
@tilljack60-cmd 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 @tilljack60-cmd to this issue.
oldtaker24 commentedon Aug 25, 2026
@oldtaker24 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 @oldtaker24 to this issue.
drips-wave commentedon Aug 25, 2026
Congratulations, @oldtaker24! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @oldtaker24: 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 🌊
feat: DST-safe deadlines, ARIA tabs, error boundaries, request dedup
drips-wave commentedon Aug 25, 2026
This issue has been completed by @oldtaker24 as part of the Stellar Wave Program's 8th Wave 🥳
😎 @oldtaker24: 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.