-
Notifications
You must be signed in to change notification settings - Fork 1.3k
UI: Remaining requests percentage displays unrounded floating-point value #1726
Copy link
Copy link
Open
Labels
area:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formattingDisplay and rendering: flickering, scrolling, line wrapping, output formatting
Description
Describe the bug
The "Remaining reqs." percentage in the UI displays unrounded floating-point values with excessive decimal places.
Example:
Remaining reqs.: 58.666666666666664%
Expected:
Remaining reqs.: 59%
Root Cause
The percentage is computed from integer division (e.g. remaining / total * 100) but the result is rendered directly without rounding, exposing IEEE 754 floating-point representation artifacts.
Suggested Fix
Round the percentage before display:
- `Remaining reqs.: ${(remaining / total * 100)}%`
+ `Remaining reqs.: ${Math.round(remaining / total * 100)}%`
### Affected version
v0.0.419
### Steps to reproduce the behavior
1. You can see it at the bottom right
Remaining reqs.: 58.666666666666664%
### Expected behavior
Remaining reqs.: 58.67%
### Additional context
_No response_Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formattingDisplay and rendering: flickering, scrolling, line wrapping, output formatting
Type
Fields
Give feedbackNo fields configured for Bug.