Show expected time left for pending PRs - #788
Conversation
fedb371 to
cfef57d
Compare
| display.textContent = formattedTime; | ||
| const formattedElapsed = formatDuration(elapsedMs); | ||
| const expectedMs = AVERAGE_BUILD_DURATION_MS - elapsedMs; | ||
| const formattedExpected = expectedMs < 0 ? `~${formatDuration(-expectedMs)} overdue` : `~${formatDuration(expectedMs)} left`; |
There was a problem hiding this comment.
Not sure if "overdue" is the best wording. Open to suggestions. Also, is there some way to test the display of the queue locally without setting up a whole fake database etc.?
There was a problem hiding this comment.
Hi, thanks for the PR! I think that showing the remaining time is a good idea, but I'm not sure if we should format it like this, because it can become quite wide:
What do you think about:
- Removing
pending(since that is kinda implied) - Keeping only the expected part, so that it will always show only "1h 3m left" or "5m overdue"
?
|
I also don't love this format (thanks for sending the preview btw -- I don't have a local setup for bors). However, I feel like we should still say pending or something similar. It's obvious to us but might not be to newbies. We could use icons instead of "pending" and "approved". Could be cool but I kinda like the simplicity of using words. Another option is keeping expected if it's "1h 3m left", otherwise say how much is elapsed (and sidestep the whole overdue wording issue as well). E.g. it'd be either "pending (1h 3m left)" or "pending (5h so far)" if it's slow. Though then it's not obvious how much overdue it is. It'd be nice to keep the absolute elapsed time rather than just the relative-to-average delta, though you might be right that just showing the delta makes more sense. |
|
By the way, is the progress bar not enough for showing the expected time left? 🤔 |
|
Not really because then you need to do mental arithmetic. Like if it's 2 hours done and the bar looks around 70% full, I pretty much have to do 2/0.7 - 2, then multiply by 60, if I want to know how many minutes are left. This is why progress bars in terminals and other apps usually show visually how much is done, and the percentage done, and the time spent so far, and the expected time left. Better to make the information easily available. |
Or show how long since the expected completion time for slow PRs.

Or show how long since the expected completion time for slow PRs.