Drive4ik / simple-tab-groups

Create, modify and quick change tab groups. Inspired by the Tab Groups app :)
https://addons.mozilla.org/firefox/addon/simple-tab-groups/
Mozilla Public License 2.0
1.18k stars 93 forks source link

[Req] Remember the container for each tab in a group #671

Open bobpaul opened 4 years ago

bobpaul commented 4 years ago

Is your feature request related to a problem? Please describe. One of the ways use containers to control which accounts are used. For example, I open github in one of 3 different containers depending on which github account I'm using. I open Google websites in one of several containers depending on which Google account I'm using, etc.

I use Groups to organize tasks. For a task, I might have a Google Drive document open on one account, a different Google Drive document open in a different account. One or two github tabs which might be in the same container. A search tab in another container, etc.

When I close the window or select a different group, Simple Tab Groups saves all these tabs, but doesn't save which containers were used. When I later re-open the group to resume that task, the tabs all open in the default container (no container) instead of the container they were opened in when I closed the Window/switched groups.

I don't mind that I have to pick which container to use when I open a brand new tab; that's how the Multi-Accounts containers extension is supposed to be used. But I do mind when I restore a Group and I need to go through and right click every tab to "re-open in container BLAH". sometimes, just from looking at the URL, I can't immediately tell which container was originally using.

Describe the solution you'd like I would like Simple Tab Groups to keep track of which container each tab is using and restore tabs to the same container.

Describe alternatives you've considered I've seen suggestions to force a Group to always use a specific container. That doesn't fit my use case. But I think my more general solution mostly solves the problem for those who want the other solution.

Drive4ik commented 4 years ago

I don't quite understand the logic behind which the tab containers are reset aaaaaaaaaa

smichel17 commented 3 years ago

I can reproduce this by repeating the steps in your video above, but closing all Firefox windows before switching to group 2, then re-opening ff.

Here's a screen recording of it: lost-containers.zip

Sorry for including as a zip. For some reason when I tried to record my screen as a gif, the file was larger than 200 MB. I recorded as mp4 instead (2.8 MB), but GitHub does not allow uploading mp4 files :(

smichel17 commented 3 years ago

GitHub is adding support for uploading mp4 videos so I'm now able to upload directly:

https://user-images.githubusercontent.com/6563664/102630904-0b1e0e00-4145-11eb-9466-4cd7406c3281.mp4

grahamperrin commented 3 years ago

https://github.com/Drive4ik/simple-tab-groups/issues/671#issuecomment-705022235

Without a timeline, with the looping, I find it difficult to see the problem in that screen recording (sorry).

I can reproduce a problem, with closure of a second window in the mix, but I'll not attempt to make the steps consistently reproducible.

To me this smells like a bug in Firefox, involving discarding and hiding.

If someone can provide minimal steps to reproduce (STR) it will help to seek a bug in Bugzilla@Mozilla. Thanks.

https://github.com/Drive4ik/simple-tab-groups/issues/671#issuecomment-731784718

@smichel17 can you make things reproducible without the prompts to remember decisions?

Thanks

smichel17 commented 3 years ago

It's also possible that this is caused by an interaction with the temporary containers extension. I'll see if I can reproduce on a fresh profile.

I'm not very familiar with extension development -- I assume a timeline means a debug log? I'll see if I can record one of those, as well.

grahamperrin commented 3 years ago

Thanks, I meant no timeline in the looping image (GIF?) at https://github.com/Drive4ik/simple-tab-groups/issues/671#issuecomment-705022235

… also possible that this is caused by an interaction with the temporary containers extension. I'll see if I can reproduce on a fresh profile. …

I'm almost certain that my production of the issue was without the Temporary Containers extension. Gut feeling: the issue should be reproducible with Simple Tab Groups and Multi-Account Containers alone. Let's focus on the two-window scenario and closing one of the two at some point.

smichel17 commented 3 years ago

Good (I think) news: this is totally reproducible on a fresh profile.

https://user-images.githubusercontent.com/6563664/109418991-fff82180-79c2-11eb-8996-b39015d696f4.mp4

One anomaly: The very first time I tried to reproduce this, when closing the first window, it warned me, "Are you sure you want to close two tabs?" but I was only closing one. I checked "never warn me again" before taking this screen recording, but can get a recording with the popup if needed.

I had trouble figuring out what I was supposed to do to get a timeline (I found the firefox timeline, though…). I don't want to spend more time searching now, but will do that if someone gives or links me to instructions.

smichel17 commented 3 years ago

re: https://github.com/Drive4ik/simple-tab-groups/issues/671#issuecomment-705022235, I find it difficult to see the problem in that screen recording (sorry)

Ah. @grahamperrin I believe the point was that this gif doesn't reproduce the bug, and @Drive4ik was asking for clarification on the steps to reproduce.

grahamperrin commented 3 years ago

Thanks, and I should have been clearer about my meaning of timeline – your recording does have one, in that I can describe this (point at which a loss becomes visible) as at 0:26 on the timeline:

image

grahamperrin commented 3 years ago

Can you get a Firefox 88.0a1 or greater that was built after the time of the commit below?

If so, please tell whether this is reproducible.


https://hg.mozilla.org/mozilla-central/rev/4d91456f4232 probably not related, but I'd like to rule it out. In any case, a test with a recent nightly Firefox might be useful.

grahamperrin commented 3 years ago

This will be better elsewhere but for now, I'll link to it from here:

– I tested a few such extensions earlier today. The first version of the list comprises just two extensions (Simple Tab Groups and one other); I'll add results from other tests in due course.


In the meantime: I could not produce anything like this issue #671 with anything other than Simple Tab Groups. This is not to conclude that it's a bug in Simple Tab Groups – I still suspect that a fix is blocked by a bug in Firefox (and that if a fix was amongst the recent flurry of activity, it might not reach users of releases of Firefox until late April).

https://wiki.mozilla.org/Release_Management/Calendar#Future_branch_dates

smichel17 commented 3 years ago
  1. I can confirm that the bug is reproducible on today's 88.0a1 build, same steps as above.
  2. Here's a screenshot of the dialog I mentioned above. Asking about closing 2 tabs, when there's only one open.

    image

grahamperrin commented 3 years ago

… 2 tabs, when there's only one …

In the absence of an API for tab groups, Firefox can not be aware that a groups-oriented extension will do something intelligent with what's grouped and non-grouped when a window closes.

Click Cancel then seek other tabs:

image

– you might find the one that's not visible.

smichel17 commented 3 years ago

I'm aware of the "Show other tabs" section and I thought that I'd cleared it out, but I can't currently reproduce the behavior, so it's possible that I missed a tab.

grahamperrin commented 3 years ago

https://github.com/Drive4ik/simple-tab-groups/issues/671#issuecomment-787500008

… suspect that a fix is blocked by a bug in Firefox …

Maybe 1635765 - Open tabs lose container association on restart

Thanks @cesarizu for https://github.com/mozilla/multi-account-containers/issues/1867#issuecomment-781506280

julie777 commented 2 years ago

Use firefox multi-account containers to manage your containers. It will handle which container a tab belongs in.

Ambient-Impact commented 2 years ago

@julie777 What if you don't want to force a site to use only one container? Sometimes you need to open a site in a different container, i.e. if you're a web developer and need to test stuff in different accounts at the same time. Then there's the hassle of assigning many sites you might not visit again just so they restore to whatever container you opened them in before.

bobpaul commented 2 years ago

Use firefox multi-account containers to manage your containers. It will handle which container a tab belongs in.

Multi-Acccount containers is insufficient to manage this task. With Multi-Account containers extension, you can only set the default container to open a DOMAIN NAME in. And that works for some websites. For some websites, I always open that website in the same container. But for other websites, I have 2 or 3 containers that I use to open the website because I have 2-3 accounts for that website.

Look at the name of the extension. It's called "Multi-Account containers". One of the main usecases for that extension is to make it easy to manage multiple website accounts without having to log out and log back in all the time or co-mingling the cookies from multiple accounts.

So here's an example:

Personal Gmail account, Google Workspace account from my employer, special Google Workspace account for managing GCS at the office and other IT/admin tasks. To enable this, I have 3 separate containers. I can't assign a default for the following domains: gmail.com, drive.google.com, mail.google.com, accounts.google.com

The same situation hits me for heroku, github, digital ocean, and a few others.

What I'd like to do:

  1. Set up a couple of tab groups: Make a tab group for a project at work. In that tab group I have several Google documents open, some github repos, etc. All of these are using containers in Multi-Account containers that I've dedicated for these work accounts.

In the same browser another tab group with a personal project I'm working on. Here I have a couple of Google documents open, a github repo, and a couple of tabs on heroku. All of these are using containers in Multi-Account containers that I've dedicated to these personal accounts.

In the same browser another tab group that's more short lived, general tabs that don't really belong to a specific project. There might be a mix of personal and work accounts in this tab group.

(You should notice there's overlap in those websites. I can't tell Multi-Account containers "always open this website in the work container" or "always open this website in the personal container". Either Multi-Account containers needs to be aware of tab groups and let me set defaults per group (which still isn't flexible enough) or SimpleTab groups needs to be aware of the container a tab is using right now and remember that with the other data used to define that group.)

  1. Close the browser and re-open it.

  2. Simple Tab should open the tabs back up in the same containers they were in when the browser closed.

Maybe completing this feature requires changes to Multi-Account containers so the two extensions can work together. I don't think that's the case as I understand that Multi-Account containers is just providing a user interface to the container feature that's built into firefox and I think that SimpleTab groups should also be able to access that interface. But maybe not. If changes to Multi-Account containers is needed, I can add a feature request over there as well. In the mean time, I've all but stopped using Simple Tab Groups because this problem forces me to chose between either using Multi-Account containers to manage my multiple accounts or using simple tab groups to help manage my tabs. Right now I have 15 windows open as I juggle 12 different concurrent projects and I haven't touched Simple Tab groups in over a year. My workflow would really benefit from tab groups (and did when I was trying to use it), but any time the browser restarts (updates, etc) the tabs no longer know what container they're in and things just become a huge mess.