cxw42 / TabFern

Google Chrome extension for saving and restoring sets of tabs, and for switching between windows and tabs from a vertical, grouped list.
https://cxw42.github.io/TabFern/
Other
171 stars 29 forks source link

Option to remember tabs automatically on a schedule #316

Open andr222 opened 1 year ago

andr222 commented 1 year ago

Updated 2023-10-29

This ticket is now to add an option, with a parameter X, to mark all open tabs as remembered automatically every X minutes, starting X minutes after initialization completes.

Original

Currently the only way to save a tab list is to close its' window. This also applied to an individual tab, saving closes the tab.

In my case, the computer often suspends after a certain period without usage. However often I know that I will be absent from the computer for a time, sans so I could save the tab lists, along with its' annotations. If the tab list windows have been closed, it takes much longer to reload the tabs on restarting the computer. As well, there may not have been enough time for automatic suspension of the computer, a more important saving of time.

An alternate solution is periodic saving of tab lists after a certain delay, when there have been changes. If this solution is implemented, it would be better to make the delay configurable.

One of these solutions could minimize if not eliminate the "Non enregistré" (unsaved) lists on restarting the computer.

cxw42 commented 1 year ago

If you hit the pencil "Edit" icon on an open window and press Enter, it will switch to "Saved tabs". Will that meet your needs?

andr222 commented 1 year ago

Not really By tab list I mean all the tabs, open or closed, for all the windows, including the corresponding annotations.

My problem is that currently annotations are usually lost when I restart the computer, after it was automatically suspended after period without activity. So if I can save the tab list explicitly, without closing any open tabs, on restarting I would expect the tab list to be very quickly restored.

The advantage of leaving tabs open is that they are restored very quickly on restart. Otherwise reopening many tabs would be time-consuming. Also, sometimes there is an advantage to leave tabs both open and closed in the same window. A closed tab with an annotation could be a tab to avoid reopening in an ongoing search over an extended period of time.

Ideally (for me), a single button would save the tab list for every window.

I have found that tabs outliner does save annotations and open/closed tabs almost all the time, but I find it generally more awkward to use than tabfern. (It is very complicated.)

cxw42 commented 1 year ago

Let me see if I understand --- you'd like a single button to convert all "Unsaved" windows to "Saved tabs", without changing what's open or closed (windows or tabs)? If so, that is certainly doable.

andr222 commented 1 year ago

Exactly :) It would make tabfern considerably more usable for me. My computer suspends after about 5 minutes of inactivity, and most other apps restart in the same state without problem, tabfern being the big exception. This option would almost always remove the exception.

Another option, which I suspect is more complicated to implement, is to periodically (frequently) save all (open) unsaved tabs. This would be more convenient, since one wouldn't have to remember to click the save button. If new tabs and changed annotations were tracked, saving could be done only for changes.

Either option would be a big plus for tabfern.

andr222 commented 1 year ago

Thinking even more about the problem, would it be extremely difficult to automatically save new tabs or windows, and automatically save changed annotations ? If that could be done, there would no longer be unsaved tabs, windows or annotations. Tabfern would become super-stable.

cxw42 commented 1 year ago

Automatically saving new tabs/windows is indeed easy to implement at a basic level. I recall edit TO had a similar feature, and a similar debate about its merits :) . For example, if all windows start out in a "remembered" state, you can wind up with quite a lot of temporary windows cluttering up the TF tree.

What about an option to mark windows as remembered after they have been open for X minutes? or have Y tabs open?

cxw42 commented 1 year ago

annotations are usually lost when I restart the computer, after it was automatically suspended after period without activity.

This sounds like a bug somewhere, but I'm not sure where. By "annotation", you mean notes added with the pencil icon, right?

What os, browser, version? I do know that if you are using a snap installation of Chromium, TF can no longer save changes once the next version of the snap has been installed in the background :( (#215).

andr222 commented 1 year ago

Indeed, if all windows started in remembered state, there could be a lot of temporary or duplicate windows opened. Another tab manager has this problem, which (at least with my usual usage), is still better than losing tab annotations/notes. Having a programmable time for saving allows users to decide how much they want/need to save tabs with their annotations. For me, I would put it about 5 minutes, to ensure that virtually all would be saved except very short-term tabs. For others it could be much longer. I don't see any advantage of counting the number of tabs for this, but it may be useful for others. Note that to me the annotations are important. If no annotations, usually I can find an equivalent tab relatively easily. But not the info in annotations.

cxw42 commented 1 year ago

I'd like to make this ticket about one of the options and ask you to open other tickets for other options if they would be useful to you. I think this one is

an option to mark windows as remembered after they have been open for X minutes

right? Others I see in the thread above are:

andr222 commented 1 year ago

An option to mark windows (and their annotations) as remembered after being open X minutes would be perfect for me ... and allow a lot of flexibility for others. It would certainly prevent me from losing important tab annotations.

One way to implement this could be every X minutes ensure that all tabs are remembered, so for some tabs it could be almost 2X minutes. This would be simpler than verifying by tab.

The other options suggested were alternatives to solving the same problem, so would be redundant.

andr222 commented 11 months ago

Wondering how this is progressing. For not remembering tabs periodically, maybe use X=0. Using minutes (and not seconds) would avoid users setting something ridiculous like 10 seconds, which could negatively impact performance. Maybe even a minimum of 2 minutes ?

andr222 commented 11 months ago

I've been thinking about this more .... Wouldn't it be simpler to automatically remember each new tab as it is created, and automatically remember each annotation as it is created or changed ? Since probably each change would happen not more than once per minute, it wouldn't be very rapid in computer terms.

Of course, since I don't know how tabfern would be saving the status, this could be problematic. If the status could be saved like a typical database ... ok

But if the entire state must be saved each time, the solution would be more like the latest version of this issue. Just updating the status table as it occurs, then actually saving periodically. Hope my musing helps a bit.