chzesa / tiled-tab-groups

26 stars 6 forks source link

Restore Groups after Browser Restart #29

Open KermMartian opened 3 years ago

KermMartian commented 3 years ago

I keep a large quantity of tabs open, so this extension is a lifesaver for organizing them. However, due to its memory-leaking nature, I occasionally have to restart Firefox and then restore my session. Having done so, TTG has forgotten its list of my tab groups, showing only my "main" group as Group 0. I can see that my hidden tabs still exist, and if I start typing the title of a tab in another group and choose Firefox's "Switch to Tab" option, it'll actually switch to the proper tab group, complete with all the other tabs in that group, but I can no longer switch groups (or see my lists of tabs in groups) through TTG.

Advice on restoring tab groups with sessions (is this #24?) or even just re-adding my current groups to TTG would be greatly appreciated.

chzesa commented 3 years ago

The addon should attempt to recreate groups for tabs whose groups don't exist for some reason. Since this doesn't happen I assume an error occurs instead. Please enter about:devtools-toolbox?id=%7Bdcdaadfa-21f1-4853-9b34-aad681fff6f3%7D&type=extension in the url bar after the tabs fail to restore, select the console tab, and see if there are any errors.

To manually restore the groups I suggest performing the following steps for each group:

  1. Create a new group in TTG
  2. Switch to a tab so only one group's tabs are visible
  3. Right click a tab in the tab bar and click Select All Tabs
  4. Right click on a tab and use the context menu option to move the selected tabs to the new group.
KermMartian commented 3 years ago

Please enter about:devtools-toolbox?id=%7Bdcdaadfa-21f1-4853-9b34-aad681fff6f3%7D&type=extension in the url bar after the tabs fail to restore, select the console tab, and see if there are any errors.

A few related to another extension; none for TTG.

Do you suspect that the extension is leaking memory?

I do not.

Does the extension fail to restore groups on every startup or only occasionally?

This is the first time I've tried to restore my session since installing TTG.

Which version of firefox are you using?

93.0b9

Do you use a session manager addon to restore the session or Firefox's inbuilt session restore functionality?

Nope.

Do you use any other extensions that interact with windows or tabs?

Not that I'm aware of.

To manually restore the groups I suggest performing the following steps for each group:

  1. Create a new group in TTG

As soon as I did this, the new group (though untitled) had all the tabs from one previous group. I simply clicked the "new group" button as many times as I had groups and then renamed them. I'll update this issue if I'm able to reproduce this issue.

chzesa commented 3 years ago

I think I managed to replicate the issue: the addon doesn't detect if the session is restored manually via the history menu and this happens consistently. With the "Open previous windows and tabs" checked in the options the state is restored as normal. If the addon is disabled and re-enabled after restoring a session (before any changes to groups are made to avoid overwriting the session data) it will restore groups properly.

chzesa commented 3 years ago

5c963bab1bd06401e791db02a380a4709ddfe5ec should fix this issue if the session is manually restored.