snoozz-tab-snoozing
snoozz-tab-snoozing copied to clipboard
[FEATURE] Remember if a tab was snoozed from incognito mode
Description
When a snoozed tab gets restored it seems to always open in the browser window that's currently on top (at least in Chrome). This probably makes sense but causes issues when the extension is enabled for incognito mode:
- A tab that was snoozed from normal context might suddenly open in incognito mode (and no have the right cookies).
- A tab snoozed from incognito mode might open in normal browsing context, potentially violating user privacy expectations because the page now has cookies.
Context
I use incognito mode a lot for development so I can test pages with different credentials and having tabs restore randomly is confusing and there is no work around for the issue other than snoozing the tab again and hoping I happen to have the right window on top the next time it pops up.
Perhaps not a lot of people enable the extension in incognito mode but I find it very useful to snooze tabs from incognito windows for later.
Possible Implementation
I think there should be an option in the settings to decide how tabs are reopened:
- Open in same context they were snoozed in
- Always open in main context
- Always open in incognito mode
Potentially this could even be something to select individually at time of snoozing but that might clutter the UI too much for what is arguably an uncommon use case.
Another thing to consider is that Firefox has containers (https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/) which offer different browser contexts similar to how incognito mode works. I'm not sure how these containers interact with browser extensions but presumably one would want a snoozed tab to restore in the same container it was snoozed in.
I think there should be an option in the settings to decide how tabs are reopened: Open in same context they were snoozed in Always open in main context Always open in incognito mode
As far as I'm aware, it is not possible to know which context a tab was snoozed in. But the "Always" options seem doable on the settings page.
Potentially this could even be something to select individually at time of snoozing but that might clutter the UI too much for what is arguably an uncommon use case.
I dont think I will implement an additional action for the user to do before snoozing a tab. It will definitely complicate the UI and will overwhelm a new user for sure.
Don't use firefox much so I'm not super familiar with containers. Will definitely take a look into their existing implementation and if there are special APIs I can use to work better with them
I haven't done any Chrome extension development in years but the documentation seems to suggest there is an incognito property for each tab:
https://developer.chrome.com/docs/extensions/reference/tabs/#:~:text=and%20devtools%20windows.-,incognito,-boolean
Firefox has it as well:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab#:~:text=example%2C%20devtools%20windows).-,incognito,-boolean.%20Whether%20the
Agree that choosing at the time of snoozing the tab is too complicated but an option in the settings would be great.
I'm not using Firefox myself and don't know much about the containers. I brought it up because the it's worth checking if snoozed tab are randomly restored in different containers.
I'm a regular user of Firefox myself, and in my experience, if you snooze a tab from a container it reopens in a standard (non-container) tab. (Raised this as issue #76).
Unfortunately, last I looked Firefox does not expose container memberships part of the API, but it would certainly improve my experiences with Snoozz if tabs could remember this snooze context.