Conversation
- Add parseRateLimitHeaders() to stellar.ts: parses X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After from every HTTP response into a typed RateLimitQuota snapshot. Missing or non-numeric header values are safely coerced to null. - Wire _updateQuotaFromResponse() into rateLimitedFetch so both the immediate and queued code paths push the latest quota to the store after every response, including 429s. - Add RateLimitQuota interface and rateLimitQuota / setRateLimitQuota slice to the Zustand store (store.ts). Starts null; updated on every API response that carries rate-limit headers. - Add RateLimitQuotaDisplay component: shows remaining/limit counts, an accessible progress bar (green/amber/red), reset time, and a rate-limited warning state. Renders nothing until the first quota snapshot arrives. - Add rateLimitHeaders.test.ts (15 tests): primary flow, boundary case (429 with Retry-After only), failure cases (malformed/missing headers), and store integration tests. All 15 pass.
|
@martoniel is attempting to deploy a commit to the nanle-code's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@martoniel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Collaborator
|
@martoniel Please resolve conflicts. |
Author
|
@Manuelshub I have resolved conflicts |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #842
Add parseRateLimitHeaders() to stellar.ts: parses X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After from every HTTP response into a typed RateLimitQuota snapshot. Missing or non-numeric header values are safely coerced to null.
Wire _updateQuotaFromResponse() into rateLimitedFetch so both the immediate and queued code paths push the latest quota to the store after every response, including 429s.
Add RateLimitQuota interface and rateLimitQuota / setRateLimitQuota slice to the Zustand store (store.ts). Starts null; updated on every API response that carries rate-limit headers.
Add RateLimitQuotaDisplay component: shows remaining/limit counts, an accessible progress bar (green/amber/red), reset time, and a rate-limited warning state. Renders nothing until the first quota snapshot arrives.
Add rateLimitHeaders.test.ts (15 tests): primary flow, boundary case (429 with Retry-After only), failure cases (malformed/missing headers), and store integration tests. All 15 pass.
Summary
Closes #
How was this tested?
Merge requirements
A PR is merged only when every box below is true. See
Merge requirements for the full policy.
masterif GitHub shows "This branch has conflicts").Security-sensitive changes
.github/CODEOWNERS(wallet, auth, cryptography, CI) and a code owner has been requested for review.