tabwrangler icon indicating copy to clipboard operation
tabwrangler copied to clipboard

Tab lock timer reset on browser restart

Open BlueInt32 opened this issue 8 years ago • 7 comments

Since one of the recent releases (maybe it's due to new Chrome version), when I close Chrome the "closing in..." timing is not maintained accross Chrome restarts even though Chrome startup settings is set to "Continue where we left off".

Observed behavior :

  • time to restart is set to 60min
  • Chrome settings for tabs is "Continue where we left off"
  • a tab has a "closing in" of say 18min
  • chrome is closed
  • when chrome is reoppened, the tab has "closing in" reset to 60min

Expected behavior:

  • time to restart is set to 60min
  • Chrome settings for tabs is "Continue where we left off"
  • a tab has a "closing in" of say 18min
  • chrome is closed
  • when chrome is reoppened, the tab still has "closing in" set to 18min

BlueInt32 avatar May 19 '17 05:05 BlueInt32

From what I see in the master branch current implementation has no functionality for saving the array of the last accessed times and restoring it when the browser starts. Instead the startup function has this code:

  chrome.tabs.query({
    windowType: 'normal',
  }, tabmanager.initTabs);

which just populates TabManager.tabTimes with Date.now() for each existing tab.

Thus to fix this issue two things should be done:

  1. Implement save/load for TabManager.tabTimes
  2. Modify startup to not overwrite last accessed times which are loaded from persistent storage.

Original reporter mentioned that in some older version last acces times was not reset on the chrome restart. If this is true It would be great to know exactly when it was broken.

igorsol avatar Jan 29 '18 09:01 igorsol

I don’t believe Tab Wrangler ever preserved tab countdowns, so I don’t think there is any previous code to look at. It would be great to persist them though. This would be a nice addition to the extension.

ssorallen avatar Jan 29 '18 14:01 ssorallen

I'm reverting the changes made to implement this because the behavior is currently inconsistent. The code expects synchronous access to local storage, but it's async. The code that interacts with local storage needs more thought to ensure consistent reading and writing. I don't want to release a feature that half works.

ssorallen avatar Apr 05 '18 03:04 ssorallen

This is expected behavior by at least one new user and was reported as a bug in a Chrome Web Store comment:

It keeps resetting itself when I close the browser. It won't remember which tabs I've already locked, forcing me to reopen and re-lock them again when I realize what I'm missing.

ssorallen avatar Jun 27 '18 13:06 ssorallen

hi! Any chances to get this issue solved? My tabs are kept for 1 week so, for example, a restart of the computer reverts all the tabs to the default counter which is yet 7 more days :(

al4u avatar May 26 '21 08:05 al4u

I'm reverting the changes made to implement this because the behavior is currently inconsistent. The code expects synchronous access to local storage, but it's async. The code that interacts with local storage needs more thought to ensure consistent reading and writing. I don't want to release a feature that half works.

hi! That's how I must had created my question yesterday (see above). Any chances not to reset timers upon restarting the browser? I'm afraid that could be a decision making point for me.

al4u avatar May 27 '21 06:05 al4u

Just want to push it. But in my case it is Firefox: https://github.com/tabwrangler/tabwrangler/issues/339

Vondor avatar Apr 26 '22 13:04 Vondor

This was (finally) added in v7.2.0.

ssorallen avatar Dec 13 '23 14:12 ssorallen