feat: make rate limit retry message more user-friendly#19004
Open
superdav42 wants to merge 2 commits intoanomalyco:devfrom
Open
feat: make rate limit retry message more user-friendly#19004superdav42 wants to merge 2 commits intoanomalyco:devfrom
superdav42 wants to merge 2 commits intoanomalyco:devfrom
Conversation
- Add i18n keys for hours and minutes formatting - Update retry message to show 'in 3h' instead of 'in 8143s' - Format delay as hours, minutes, or seconds based on duration Closes #<issue-number>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: Related PR:
The other results returned are either PR #19004 (the current PR) or unrelated PRs about other retry/error handling features. No duplicate PRs found addressing the same user-friendly retry message formatting feature. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #19004
Type of change
What does this PR do?
This PR improves the user experience when rate limits are hit by making the retry message more readable. Instead of showing "retrying in 8143s - attempt #1", it now shows "retrying in 3h - attempt #1".
The changes:
ui.sessionTurn.retry.inHoursandui.sessionTurn.retry.inMinutes)SessionRetrycomponent to intelligently format delay duration based on the time elapsed (hours → minutes → seconds)This makes it much easier for users to understand how long they need to wait before retrying, especially for longer delays.
How did you verify your code works?
I tested the logic by creating a helper function that formats delays:
The code follows the existing patterns in the codebase and uses the same i18n approach as other retry messages.
Screenshots / recordings
This is a UI change. Screenshots showing the before and after would be helpful for reviewers.
Checklist