-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: generalize retry/backoff UI with improved feedback #9088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… with cause
- Replace rateLimitRetrySchema with retryStatusSchema including cause and rateLimitSeconds fields
- Add new RetryStatusRow component with differentiated messaging:
- Rate limit: 'Rate limit set to {{rateLimitSeconds}} seconds' (title) + 'Waiting {{seconds}} seconds' (subtitle)
- Retry: Error message (title) + 'Trying in {{seconds}} seconds (attempt #{{attempt}})' (subtitle)
- Update Task.say emitters to use retryStatus metadata with appropriate cause:
- 'rate_limit' for provider window waits and 429 errors (includes rateLimitSeconds)
- 'backoff' for exponential backoff retries
- Migrate i18n keys from rateLimitRetry to retryStatus with new nested structure in English
- Maintain backward compatibility with legacy rateLimitRetry metadata
- Update tests to cover new RetryStatusRow component and metadata structure
- Migrate chat.rateLimitRetry.* → chat.retryStatus.* across 17 locales - Add nested structure: retryStatus.rateLimit.* and retryStatus.backoff.* - Provide contextual messaging for rate limits vs exponential backoff
No new issues found in commit 945c0ff. The commit removes unused legacy code (the TODO:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
webview-ui/src/components/chat/__tests__/RetryStatusRow.spec.tsx
Outdated
Show resolved
Hide resolved
webview-ui/src/components/chat/__tests__/RetryStatusRow.spec.tsx
Outdated
Show resolved
Hide resolved
…empts and empty metadata cases - Add support for attempt/maxAttempts parameters in rate limit scenarios - Return default backoff waiting message when metadata is missing - Fix test expectations to match component output - All 6 tests now passing
webview-ui/src/components/chat/__tests__/RetryStatusRow.spec.tsx
Outdated
Show resolved
Hide resolved
…ây'; update RetryStatusRow tests
| "retryStatus": { | ||
| "rateLimit": { | ||
| "title": "Rate limit set to {{rateLimitSeconds}} seconds", | ||
| "waiting": "Waiting {{seconds}} seconds", | ||
| "proceeding": "Proceeding now…", | ||
| "cancelled": "Request cancelled" | ||
| }, | ||
| "backoff": { | ||
| "title": "Request failed", | ||
| "waiting": "Trying in {{seconds}} seconds", | ||
| "waitingWithAttempt": "Trying in {{seconds}} seconds (attempt #{{attempt}})", | ||
| "waitingWithAttemptMax": "Trying in {{seconds}} seconds (attempt #{{attempt}}/{{maxAttempts}})", | ||
| "retrying": "Trying now…", | ||
| "cancelled": "Retry cancelled" | ||
| } | ||
| }, | ||
| "rateLimitRetry": { | ||
| "title": "Rate limit triggered — please wait.", | ||
| "waiting": "Retrying in {{seconds}}s", | ||
| "waitingWithAttempt": "Retrying in {{seconds}}s (attempt {{attempt}})", | ||
| "waitingWithAttemptMax": "Retrying in {{seconds}}s (attempt {{attempt}}/{{maxAttempts}})", | ||
| "retrying": "Retrying now…", | ||
| "cancelled": "Retry cancelled" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kind of confused here - I thought there were only two cases (rate limits and errors). What's the difference between the second and the third?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I prefer "Retrying" to "Trying" in these strings btw
|
@CodiumAI-Agent /review |
Closes: #7922
This PR generalizes the rate-limit UI to a more generic retry/backoff interface with improved user feedback and comprehensive translations.
Changes
Supersedes
This PR supersedes #8503 and incorporates the same functionality but with a slightly different UI.
Screenshots
Thanks to @elianiva for the original contribution!
Co-authored-by: elianiva [email protected]
Important
Generalizes retry/backoff UI with improved feedback, new schemas, components, and comprehensive translations.
retryStatusSchemaandrateLimitRetrySchemainmessage.ts.RetryStatusRowandRateLimitRetryRowcomponents inChatRow.tsx.This description was created by
for fca211b. You can customize this summary. It will automatically update as commits are pushed.