Skip to content

refactor: change how timings are formatted #17623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

No description provided.

@BrunoQuaresma BrunoQuaresma added the hotfix PRs only. Harmless small change. Only humans may set this. label Apr 30, 2025
@BrunoQuaresma BrunoQuaresma requested a review from Copilot April 30, 2025 16:50
@BrunoQuaresma BrunoQuaresma self-assigned this Apr 30, 2025
Copy link

@cdr-bot cdr-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors how timing values are formatted in the WorkspaceTiming module by replacing the multiple unit decomposition with a simplified conditional format based on thresholds.

  • Refactored the formatTime function for clearer unit conversion.
  • Updated the calculation of formatted time using a single value and unit based on predefined thresholds.

@BrunoQuaresma BrunoQuaresma merged commit 205076e into main Apr 30, 2025
38 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-better-format-intervals branch April 30, 2025 16:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix PRs only. Harmless small change. Only humans may set this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant