github / github/copilot-cli

UI: Remaining requests percentage displays unrounded floating-point value

Offen
#1,726 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:terminal-rendering
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### 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:
```diff
- `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_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.