Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Nov 7, 2025

Closes: #7922
This PR generalizes the rate-limit UI to a more generic retry/backoff interface with improved user feedback and comprehensive translations.

Changes

  • Generalize rate-limit UI to generic retry/backoff with cause information
  • Mark retry status updates as non-interactive to avoid ask race conditions
  • Update translation keys for all locales with consistent suffixes
  • Improve feedback messages in chat for better user experience
  • Add comprehensive test coverage for retry status components

Supersedes

This PR supersedes #8503 and incorporates the same functionality but with a slightly different UI.

Screenshots

image image

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.

  • Behavior:
    • Generalizes rate-limit UI to a generic retry/backoff interface with cause information.
    • Marks retry status updates as non-interactive to avoid race conditions.
    • Improves feedback messages in chat for better user experience.
    • Adds comprehensive test coverage for retry status components.
  • Schemas and Components:
    • Introduces retryStatusSchema and rateLimitRetrySchema in message.ts.
    • Adds RetryStatusRow and RateLimitRetryRow components in ChatRow.tsx.
  • Translations:
    • Updates translation keys for all locales with consistent suffixes.
    • Adds new translation entries for retry status messages in multiple languages.

This description was created by Ellipsis for fca211b. You can customize this summary. It will automatically update as commits are pushed.

elianiva and others added 5 commits November 3, 2025 15:38
… 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
@roomote
Copy link

roomote bot commented Nov 7, 2025

Rooviewer Clock   See task on Roo Cloud

No new issues found in commit 945c0ff. The commit removes unused legacy code (the sendRateLimitUpdate function) which is safe dead code removal.

TODO:

  • Add missing translation keys waitingWithAttemptMax and waitingWithAttempt to retryStatus.rateLimit in all locale files
  • Fix retryStatus.rateLimit.retrying key - should be proceeding based on existing translations
  • Update test to use correct translation keys that exist in locale files
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Nov 7, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Nov 7, 2025
…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
Comment on lines +152 to +175
"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"
},
Copy link
Collaborator

@mrubens mrubens Nov 8, 2025

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?

Copy link
Collaborator

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

@xiayezhicheng
Copy link

@CodiumAI-Agent /review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Spinner + countdown with rate limit triggered — please wait

6 participants