Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f7cce7

Browse files
authored
fix(site): always use 95th percentile in progress bar (#5733)
This fixes the issue where the bar flickers from "Up to X secondsremaining" to "X seconds remaining".
1 parent4420985 commit5f7cce7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎site/src/components/WorkspaceBuildProgress/WorkspaceBuildProgress.tsx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const estimateFinish = (
4242
returnisNaN(max) ?0 :max
4343
}
4444

45-
constlowGuess=secondsLeft(p50)
45+
// Under-promise, over-deliver with the 95th percentile estimate.
4646
consthighGuess=secondsLeft(p95)
4747

4848
constanyMomentNow:[number|undefined,string]=[
@@ -54,11 +54,7 @@ const estimateFinish = (
5454
if(highGuess<=0){
5555
returnanyMomentNow
5656
}
57-
constdiff=highGuess-lowGuess
58-
if(diff<3){
59-
// If there is sufficient consistency, keep display simple.
60-
return[p50percent,`${highGuess} seconds remaining...`]
61-
}
57+
6258
return[p50percent,`Up to${highGuess} seconds remaining...`]
6359
}
6460

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp