Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 13, 2025

Related GitHub Issue

Closes: #10043

Description

This PR attempts to address Issue #10043, which reports that the internal rate limiting feature (user-configured delay between API requests via rateLimitSeconds in provider settings) was causing an "unknown API error" message to display in the chat UI.

The Problem:
When users configure a rate limit delay in their provider settings, the extension waits between API calls with a countdown message like "Rate limiting for X seconds...". This message was being passed to the error display logic in ChatRow.tsx, which did not recognize it and fell through to the "unknown error" fallback, causing alarm when the feature is working as expected.

The Solution:

  • Added detection in ChatRow.tsx for messages starting with "rate limiting" (case-insensitive)
  • These messages now display a friendly informational message: "Waiting between requests. This delay is configured in your provider settings."
  • Added the internalRateLimit localization key to all 18 locale files with appropriate translations

Key files changed:

  • webview-ui/src/components/chat/ChatRow.tsx - Added detection logic
  • All locale files under webview-ui/src/i18n/locales/*/chat.json - Added new translation key

Test Procedure

  1. Configure a rate limit delay in provider settings (e.g., rateLimitSeconds: 5)
  2. Start a task that makes multiple API calls
  3. Observe that during the delay countdown, the UI shows "Waiting between requests. This delay is configured in your provider settings." instead of "Unknown API error"

Automated testing:

  • TypeScript compilation: cd webview-ui && npx tsc --noEmit (passes)
  • ChatRow related tests: cd webview-ui && npx vitest run src/components/chat/__tests__/ChatRow.diff-actions.spec.tsx (4/4 pass)
  • Lint checks pass

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

N/A - This is a message text change, not a visual UI change.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Feedback and guidance are welcome! This PR is an attempt to address the issue based on the analysis in the issue comments.

Get in Touch

Roomote Agent

…isplay

- Add detection for internal rate limiting messages in ChatRow.tsx
- Messages starting with "rate limiting" are now shown with a friendly
  informational message instead of the "unknown API error" fallback
- Added internalRateLimit localization key to all 18 locale files

Fixes #10043
@roomote
Copy link
Contributor Author

roomote bot commented Dec 13, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR correctly addresses issue #10043 by detecting internal rate limiting messages (those starting with "rate limiting") and displaying a friendly informational message instead of the alarming "Unknown API error" fallback.

Changes verified:

  • Detection logic in ChatRow.tsx correctly matches the source message format from Task.ts
  • All 18 locale files properly updated with the new internalRateLimit translation key
  • User-facing message is appropriate and non-alarming

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

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Rate limiting causing unknown error

3 participants