sonntag/tabshepherd

Would it make conceptual sense to not decrease the timer for the tab the user is viewing currently?

Opened this issue · 2 comments

I just run into this scenario:
I have set the tabs-to-keep to 1 earlier.
I've started a language lesson on Duolingo, then halfway through I realized I wanted to do something else AFK. When I came back 20 minutes later, I saw that I had a lesson underway, but wanted to quickly check some emails I got in the meantime. I've opened up a new tab, and Tab Shepherd meticulously made sure to close the tab with my ongoing lesson that very instant. Therefore losing me a couple minutes of progress.
I know that Duolingo is partly to blame here for not using onbeforeunload, but I was wondering if a simple change to Tab Shepherd would circumvent similar mistakes: Simply don't count down for the active tab. You've already stated that you wouldn't want the active tab to be shepherded. So how about we TS would only start the timer once I navigate away?

That is a possibility, however the tab lock feature is there to handle cases where a tab cannot be closed because of data loss (though it requires the user to manually set the flag).

In the next update, however, there is a new feature which should help solve this issue. I'm adding a configurable countdown timer that starts when max tabs is exceeded, and no tabs will be closed until that timer has expired. Using your scenario and assuming the new timer is configured to 5 minutes, that means that the Duolingo tab wouldn't have been closed until 5 minutes after you opened the new tab.

I'm going to think about implementing your change though. I think you're right that it shouldn't count down at all for active tabs. But it's not a trivial change, so I probably won't be able to change it by the next release.

I see. Yeah, that two-timer based solution would have also solved this issue. I'm looking forward to trying it out. :)