mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.48k stars 175 forks source link

Show options for restoring tabs on initialization #721

Open mbnuqw opened 2 years ago

mbnuqw commented 2 years ago

Description

Detect on init if there is only one window open with one tab and check if Sidebery has data to restore from (previous tabs cache, snapshots). If these conditions are true show popup with restoring options.

Add an option to settings to control this behavior.

albino1 commented 2 years ago

I would like to see this feature implemented in some format. Right now my understanding is that every time I open Firefox I have to:

That seems like a lot of steps for something to do every time you open the browser :)

I wonder if in the meantime, while this feature is being developed, if there's a temporary easier intermediate option that doesn't require a lot of work. For example, you can already add a Create Snapshot button to the Navigation Bar, perhaps a "Restore Last Snapshot" button could be added as well? Even better if it restores to the existing window without having to create a new window and close the old one.

Apologies if I'm missing a more direct and easier workflow, I'm still fairly new to Sidebery, but have already committed to using it full time and only today switched from v4 to v5 after a couple of months of continuous use to take advantage of all the improvements.

Edit: Native tab restore appears to be working for me now after a fresh install of Sidebery v5.

Elaws commented 2 years ago

Just installed sidebery as an alternative to Tree Style Tab + Simple Tab Groups add-ons (which regularly fails at restoring previous sessions).

Once you've spent time organizing your tabs in precise tree structure and panels, it would be really useful if all of this could load automatically on startup.

Are there any news on that issue ?

Thanks !

Elaws commented 2 years ago

Well, for unknown reason, everything restores perfectly fine and automatically on each startup. Not sure why it didn't work the other day.

@albino1 : Do you still have this problem ? It's now working perfectly fine here.

Perfect alternative to TST + STG for now.

albino1 commented 2 years ago

@Elaws sorry for not replying earlier, I only just now noticed this when posting in a related thread.

Edit: I've just uninstalled Sidebery and reinstalled it fresh and it seems to be working now. I'll keep an eye out it and report back if anything changes.

Elaws commented 2 years ago

@albino1 Thanks for your reply. Not sure why it didn't work the other day. Will report here if problem happens again.

sehe commented 7 months ago

This is still very much an issue when you use different windows. If you happen to close a window with a single tab last, restarting firefox effectively loses all you Sidebery hierarchy.

And, to my knowledge, the only way to restore is by going into Settings/Snapshots/View snapshots/Open window

It would make a lot of sense for a shortcut to exist.

(Side note, it seems that all issues closed-as-duplicate of this one are essentially the same use case)

Elaws commented 5 months ago

Everytime I start Sidebery, I have to do what follows if "wrong" windows was closed the last :

  1. Go to settings > snapshot.
  2. Click on "Import snapshot".
  3. Hopefully find a snapshot save where all my tabs are.
  4. If loaded snapshot does contain the proper window, click on "open all windows". Otherwise, go back to step 2 and have the luck to find a proper save which is not too old.
  5. Close undesired window.

That's a lot of spurious steps, which could be automated on startup. We could define a "main" window (or whatever desired layout), and only open them on startup.

sehe commented 5 months ago

Everytime I start Sidebery, I have to do what follows if "wrong" windows was closed the last :

1. Go to settings > snapshot.

2. Click on "Import snapshot".

3. Hopefully find a snapshot save where all my tabs are.

4. If loaded snapshot does contain the proper window, click on "open all windows".

5. Close undesired window.

That's a lot of spurious steps, which could be automated on startup. We could define a "main" window (or whatever desired layout), and only open them on startup.

That happens to me a lot, except that it also loses the categorization I had into tabs panels, all tab groupings and container associations. I have learned to stop using tab panels and groupings because I just kept losing it. Not using them keeps my tab counts low enough so that if I lose all organization again it's not an unfeasible amount of work to reorganize.

Elaws commented 5 months ago

That happens to me a lot, except that it also loses the categorization I had into tabs panels, all tab groupings and container associations. I have learned to stop using tab panels and groupings because I just kept losing it. Not using them keeps my tab counts low enough so that if I lose all organization again it's not an unfeasible amount of work to reorganize.

Weird, I don't think I have this particular issue. When I import a snapshot, I get all my containers and trees as I had before (except tree is expanded everywhere, it didn't save particular tree layout).

Elaws commented 4 months ago

Everytime I start Sidebery, I have to do what follows if "wrong" windows was closed the last :

1. Go to settings > snapshot.

2. Click on "Import snapshot".

3. Hopefully find a snapshot save where all my tabs are.

4. If loaded snapshot does contain the proper window, click on "open all windows". Otherwise, go back to step 2 and have the luck to find a proper save which is not too old.

5. Close undesired window.

That's a lot of spurious steps, which could be automated on startup. We could define a "main" window (or whatever desired layout), and only open them on startup.

Still a problem as of 06.13.2024 : each launch needs to be followed by the aforementioned cumbersome procedure.

Just to make sure, the problem happens in the following (and very frequent) usecase :

  1. Have your main Firefox windows (with all your panels and tabs).
  2. Open another Firefox window (very classical usecase when you have a dual-monitor setup), which contains some temporary tabs.
  3. Close your main windows first.
  4. Close the second windows last.
  5. Next time you open Firefox, only the second (last) window will open.

PROPOSED SOLUTION :

It would be useful to have an option to define the first window as "main" so that only this one opens when starting. Or to have an option to open a temporary windows, which won't be opened when starting.

Environment : Sidebery v5.2.0.