Skip to content

Show expected time left for pending PRs - #788

Open
camelid wants to merge 1 commit into
rust-lang:mainfrom
camelid:patch-1
Open

Show expected time left for pending PRs#788
camelid wants to merge 1 commit into
rust-lang:mainfrom
camelid:patch-1

Conversation

@camelid

@camelid camelid commented Jul 23, 2026

Copy link
Copy Markdown
Member

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

@camelid
camelid force-pushed the patch-1 branch 2 times, most recently from fedb371 to cfef57d Compare July 23, 2026 19:08
Comment thread web/templates/queue.html Outdated
display.textContent = formattedTime;
const formattedElapsed = formatDuration(elapsedMs);
const expectedMs = AVERAGE_BUILD_DURATION_MS - elapsedMs;
const formattedExpected = expectedMs < 0 ? `~${formatDuration(-expectedMs)} overdue` : `~${formatDuration(expectedMs)} left`;

@camelid camelid Jul 23, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.?

View changes since the review

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:

Image

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"
    ?

View changes since this review

@camelid

camelid commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

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.

@Kobzol

Kobzol commented Jul 24, 2026

Copy link
Copy Markdown
Member

By the way, is the progress bar not enough for showing the expected time left? 🤔

@camelid

camelid commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

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.

@Kobzol

Kobzol commented Jul 29, 2026

Copy link
Copy Markdown
Member

Showing everything (but still without %) doesn't look great:
image

I think that a compromise would be to show the expected remaining time, that might be a bit more useful than the elapsed time.

Or show how long since the expected completion time for slow PRs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants