stoically / temporary-containers

Firefox Add-on that lets you open automatically managed disposable containers
https://addons.mozilla.org/firefox/addon/temporary-containers/
MIT License
852 stars 60 forks source link

Unable to recover URLs from closed temporary tabs #344

Closed geeknik closed 4 years ago

geeknik commented 4 years ago

This behavior seems new to me. Maybe it's related to #263?

Create a new Nightly profile.

Install Multi-Account-Containers and Temporary-Containers. Set Temporary Containers to Auto so that all new tabs go into a temporary container. Then set TC to reuse available numbers and to delete the temporary container when the last tab in it closes.

Create a container and assign a site like Twitter to always open in that container so that it in essence becomes a permanent container.

Visit a random website in a temporary container tab, now open a new tab. Close the Twitter tab and the random website in a temporary container tab so that all you have left is the new empty tab.

Now perform an operation to Undo Close Tab. A "New Tab" opens. Do it again and the permanent Twitter container re-opens. The URL that opened in the temporary container tab is lost forever.

I don't have TC setup to delete history or anything like that, so I don't believe the URL should be lost if the temporary container it was opened in was deleted.

stoically commented 4 years ago

That's expected behavior. There's a tooltip when selecting the removal delay giving a hint that the delay is required to undo. That was implemented in #28 - it has details why undo doesn't work in case of instant removal. The reason it might now be more obvious is because since #305 the container removal is faster than before. Hope that helps.

stoically commented 4 years ago

Oh and btw, the URLs aren't deleted from history. They're just not in the "recently closed tabs" anymore, and hence undo doesn't work. You could check history to recover the URL.

geeknik commented 4 years ago

That seems like a silly limitation on the part of Firefox.

stoically commented 4 years ago

Well, it kinda makes sense. If the container is deleted you would open the URL in another container (or no container) without being aware. While opening from history is more explicit, because URLs from there open in the currently active container (normally).

geeknik commented 4 years ago

Well, except temporary containers are just that, temporary, so if undoing a tab close operation re-opens that tab in a new temporary container, I don't think anyone would be bothered by the behavior because isolation is working. But I'll just bump the timeout up to 2 minutes and hope the browser doesn't geek out when there is an abundant amount of temporary tabs to delete every 2 minutes.

stoically commented 4 years ago

Not everyone uses TC in Automatic Mode or with Isolation. So if you explicitly open a TC without having that enabled, close the TC, it gets removed, and you undo, you'd end up with that URL in the default container.

Removing a lot of containers work good for me. There's a 2.5seconds delay between each removal which in my tests works fine when closing ~200 tabs at once.