Firefox/Projects/TabCandy/Design/BrowserRestart
This is a re-working of bug #575903.
The guiding principal for Firefox restart is to put the user back to exactly where they were before. If Tab Candy was open on quit/restart, we bring them back to Tab Candy. If they were on a particular tab, bring them back there. There are three cases for browser restart that we need to handle for Tab Candy. It is important that restart remain highly performant.
(1) Tab Candy was last open.
In this case, Tab Candy is opened at launch. The loading of TabCandy must feel near instant and we should be minimizing startup time regressions. While a spec should not dictate implementation directions, at the very least we should be saving the thumbnails of tabs from last time to make layout super fast. If that isn't fast enough, we can potentially save an image of the entire TabCandy interface.
(2) A tab was last open.
In this case, we return to that Tab. There should be no "loading" phase where there are extra tabs in the tabstrip, and tabcandy should be loaded in the background.
(3) The session restore page is invoked
Example of session restore
In this case, TabCandy should be loaded blank with no groups or tabs. There are a couple of cases we'll need to handle.
If TabCandy groups are NOT integrated into Session Restore (fallback outcome)
- If the user restores a window, that window's Tab Candy is fully restored.
- If the user restores a tab in isolation or multiple tabs it restores all of the groups that contain those tabs and none of the groups that don't. All ungrouped go where they were before.
- If the user uses the session restore feature after starting to populate TabCandy by browsing, then we try to merge the two sets of groups (i.e., restore the old groups and then let the pushAway code handle the overlaps).
- If the user hits "start new session", TabCandy should do the first-run thing
If TabCandy groups are integrated into Session Restore (preferred outcome)
- If the user restores a window, that window's Tab Candy is fully restored.
- If the user restores a tab in isolation or multiple tabs without groups, they all get put into a untitled group and placed as in the First-Run experience.
- If the user restores groups or multiple groups, just those groups are restored. And orphaned tabs are placed in an untitled group in the largest open spot.
- If the user uses the session restore feature after starting to populate TabCandy by browsing, then we try to merge the two sets of groups (i.e., restore the old groups and then let the pushAway code handle the overlaps).
- If the user hits "start new session", TabCandy should do the first-run thing
A mockup of how the TabCandy integrated into session restore would look