Text describing "time past due date" is never refreshed

If a task has a due date and is overdue, a little calendar icon appears with the time that has passed since the due date. This text is incorrect for two reasons:

  1. The phrasing implies the due date is in the future when it is actually in the past. When the due date has passed, it says “in about X hours”.
  2. The time-post-due is not calculated correctly. It’s off by 12 hours + (what I’m guessing is) UTC offset.

Wow, I’m dumb. I just didn’t fresh the page. Sorry, I’m having a moment.

However, this is kind of a thing. If you spend all your time on the same page and only interact with that page or pop-ups, then these dates are never refreshed.

image

image

We had refreshes every few seconds for a few things but these turned out to be a resource hog. Maybe it could work with updates every minute or even less often? That may mean times lag behind but it should be good enough. @dpschen Do you have another idea?

Can you do some sort of a compromise based on how far away the due dates are? If there we’re mentioning timespans in seconds, then check every 10 seconds or so, but if we’re mentioning minutes, then check once a minute, hours for hours, etc.

I realize that due dates can change, but that’s not what I’m talking about here. I was actually thinking this could be completely client side javascript. It’s just the “Time until due” that would be changing.

The thing is, we don’t know how far away a due date is until we check it. And it’s the check interval that’s taking up resources. A compromise would be a check every minute or something like that. I guess we’ll just implement different intervals and see which one has the best performance.

Yeah that’s exactly what I had in mind.

1 Like

I’ve pushed a change to update the due date display every minute in abbc11528e. That should be a reasonable trade-off between actuality and performance.

1 Like