Uh oh!
There was an error while loading. Please reload this page.
fix(formatting): consolidate duration formatting into shared utility - #3118
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR successfully consolidates duplicate Key Changes
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as UI Components
participant Terminal as Terminal
participant Logs as Logs UI
participant Copilot as Copilot/Tool Call
participant Notification as Notification Service
participant Formatter as formatDuration Utility
Note over UI,Formatter: Duration Formatting Flow
Terminal->>Formatter: formatDuration(durationMs, {precision: 2})
Formatter-->>Terminal: "0.44ms" or "1.23s"
Logs->>Formatter: formatDuration(duration, {precision: 2})
Formatter-->>Logs: "500ms" or "2.50s"
Copilot->>Copilot: Round to min 1s: Math.max(1000, Math.round(ms/1000)*1000)
Copilot->>Formatter: formatDuration(roundedMs)
Formatter-->>Copilot: "1s", "2s", etc.
Notification->>Formatter: formatDuration(totalDurationMs, {precision: 1})
Formatter-->>Notification: "500ms", "1.2s", or "2.5m"
Note over Formatter: Logic:<br/>- Sub-millisecond: 2 decimal places<br/>- < 1000ms: round to integer<br/>- < 60s: format with precision<br/>- >= 60s: minutes/hours
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Feb 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…imstudioai#3118) * fix(formatting): consolidate duration formatting into shared utility * fix(formatting): preserve original precision and rounding behavior * fix(logs): add precision to logs list duration formatting * fix(formatting): use parseFloat to preserve fractional milliseconds * feat(ee): add enterprise modules (simstudioai#3121) * fix(formatting): return null for missing values, strip trailing zeros
Summary
0.44229199923574924ms→0.44ms)formatDurationimplementations into single shared utilityType of Change
Testing
Tested manually, all 46 unit tests pass
Checklist