Skip to content

Conversation

@elianiva
Copy link
Contributor

@elianiva elianiva commented Oct 4, 2025

Related GitHub Issue

Closes: #7922

Roo Code Task Context (Optional)

Description

This PR adds a more user friendly UI to display error caused by rate limit.

Test Procedure

Added a test file along with manual instructions.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Screen.Recording.2025-10-04.at.15.49.48.mov

Documentation Updates

Additional Notes

Get in Touch

@elianiva


Important

Enhances chat UI with a user-friendly rate limit error display, including countdown and retry logic, and updates localization files for multiple languages.

  • Behavior:
    • Adds user-friendly UI for rate limit errors in chat with countdown and retry mechanism.
    • Implements RateLimitRetryRow component in ChatRow.tsx to display retry status.
    • Updates Task.ts to handle rate limit retries with countdown and retry logic.
  • Localization:
    • Adds translations for rate limit retry messages in multiple language files including chat.json for id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, and zh-TW.
  • Testing:
    • Adds RateLimitRetryRow.spec.tsx for testing the new UI component.

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

@elianiva elianiva requested review from cte, jr and mrubens as code owners October 4, 2025 10:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 4, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention in this PR.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 4, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention in this PR.

let rateLimitDelay = 0

const sendRateLimitUpdate = async (payload: RateLimitRetryPayload, isPartial: boolean): Promise<void> => {
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Mark rate-limit status updates as non-interactive

api_req_retry_delayed is a UI-only status row and shouldn't mutate lastMessageTs. Currently sendRateLimitUpdate calls say() without isNonInteractive, which updates lastMessageTs for new messages in say(). This can interfere with Task.ask's blocking/waiting logic if a status update races with an ask.

Setting isNonInteractive true keeps the message ordering/UI unchanged while avoiding unintended ask lifecycle interactions.

Suggested change
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
isNonInteractive: true,
metadata: { rateLimitRetry: payload },
})

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 28, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 28, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 3, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 3, 2025

Rooviewer Clock   See task on Roo Cloud

Reviewed PR #8503. Most issues have been resolved. One minor translation inconsistency remains.

  • Add isNonInteractive: true to both sendRateLimitUpdate functions in Task.ts (lines 2681 and 3089) to prevent rate limit status updates from interfering with Task.ask's blocking logic
  • Indonesian seconds abbreviation consistency - use "dtk" instead of "d" in rateLimitRetry translations (see comment #2403909654)
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:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Nov 3, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Nov 3, 2025
@mrubens mrubens moved this from PR [Needs Review] to PR [Changes Requested] in Roo Code Roadmap Nov 6, 2025
@mrubens
Copy link
Collaborator

mrubens commented Nov 6, 2025

I think @daniel-lxs is working on another version of this - my main feedback was that the rate limit message is separate from the error retry, which I think this is.

@daniel-lxs
Copy link
Member

I committed my changes to the wrong branch, woops

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 6, 2025
@daniel-lxs
Copy link
Member

Thank you @elianiva for your contribution! This PR has been superseded by #9088 which incorporates the same functionality with a slightly different approach to the UI. We appreciate your excellent work on improving the retry/rate-limit user experience!

@daniel-lxs daniel-lxs closed this Nov 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 7, 2025
@github-project-automation github-project-automation bot moved this from PR [Changes Requested] to Done in Roo Code Roadmap Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Changes Requested size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

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

4 participants