Beaker: Feature request: Restore tabs from last time

Created on 2 Nov 2017  路  5Comments  路  Source: beakerbrowser/beaker

Operation System: OSX 10.11.6
Beaker Version: 0.7.8

Wishing for a setting to bring back the tabs from the last session when the browser is restarted.

I'm one of those users who keeps twenty tabs open to read later. Losing my tab state is a major usability issue.

This would also make crashes less painful.

PRs welcome! enhancement

Most helpful comment

Got the first bit working: Multiple window restoration

multiwindowrestoration

All 5 comments

Seems like this would be a good default behavior for crashes. If anybody wants to hit this, here's what I'd suggest:

  • [ ] Save all tab state every time there's a change to it. (Possibly refer to how pinned tabs are saved)
  • [ ] Watch for orderly closes of a window, which suggests it's not a crash. Delete any saved tab state that's not pinned.
  • [ ] Restore all saved tab state on window open.

Something to note: we do have pinned tabs now, which is how you can save state on a per-tab bases.

This would also make crashes less painful.

:( Yeah sorry about that. We've got a fix landed in electron, so that should stop in a coming release

@pfrazee seems that other than "what tabs are open" you'll also need to keep track of "what windows are open". We _could_ temporarily restore all tabs to a single window just to get the feature out there. Not sure how difficult tracking windows would be (I know some browsers try to track which monitor or workspace the windows were open on and how they were positioned on the screen).

Where would be a good starting point in the codebase to start looking into this change?

Edit

If you're going to save the window state as well (including even window positions) then you probably want to use background-process/ui/windows. I'd monitor any state-change events and write them to a json file in the user data, and then read from that .json if appropriate during startup.

For the tabs, I think you'll need to setup messages between the shell-window and the background-process for tracking the open tabs, which can then be stored to the .json as well.

Got the first bit working: Multiple window restoration

multiwindowrestoration

Great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShalokShalom picture ShalokShalom  路  4Comments

pfrazee picture pfrazee  路  3Comments

NicholasGWK picture NicholasGWK  路  4Comments

flpvsk picture flpvsk  路  4Comments

pfrazee picture pfrazee  路  3Comments