Open Bug 664314 Opened 13 years ago Updated 3 years ago

Display a session restore notification bar if the user has customized their home page


(Firefox :: Session Restore, defect, P5)





(Reporter: faaborg, Unassigned)


(Keywords: ux-undo, Whiteboard: p=0)


(1 file, 2 obsolete files)

This is a follow up bug from bug 592822, where we removed the save on quit dialog box.  Here's a quick review of where we are now, and how we got here.

Significant Problem: Firefox is taking an extremely long time to load relative to Chrome, because our load time often includes restoring a very large number of tabs.  Chrome just opens.  This effects tS far more than the considerable effort we put into shaving off milliseconds here or there.

Problem: Users don't always know if they need their session in the future because the future isn't now yet.  They may just need Firefox to open immediately so they can quickly perform a task.  They aren't sure, they can't predict the future.

Problem: Some users are choosing to save their session without really knowing what it means, because they were instructed to always save their data, or because saying yes to an unknown question feels safer than saying no.  These users are getting a slow load, and they didn't really want it in the first place.

Solution to all three problems: make session restore opt in on open instead of opt in on close (fixed with bug 593421, to add a very large button to Firefox Start).


*New Problem* (this bug, which we anticipated but didn't have time to solve before shipping): Not everyone has Firefox Start set as their home page, so they don't have access to the opt-in button.

Best solution: Firefox home tab ( )

Immediate solution (this bug): display a notification bar prompting the user if they want to restore their session on launch, if they have customized their home page.
smooney, this is the one that we need a product plan on to try and get it into fx7, and maybe backfitted into fx6, since its keeping people from upgrading from 3.6.x to anything post firefox 4 including this article in the providence journal that recommends that to users
Severity: normal → blocker
Priority: -- → P1
(In reply to comment #1)
> 1f1641e.html

We see things like this every release, what makes that article special?

He's obviously not completely informed as he doesn't mention the restore previous session feature - but I guess that's why we have this bug.

Alex, can we spec out the behavior here a bit more completely: Do we do this just once? Every startup? What buttons are on this notification bar? Do we use standard ones or the Sync ones? What strings are we adding?
Question: "Would you like to restore your previous session?"
action: "Restore Previous Session"
[close button]

probably use a 16x16 clock icon.
My concern with this is that it could get a little spammy and some people might want to turn it off. Can we add a checkbox to this notification like "Don't notify me again"?
I agree that this is a bit spammy (also a last minute effort to fix a problem that we didn't anticipate having since we thought the home tab would make it in).  Two concerns with the opt out of future questions checkbox:

-further clutters the UI
-there isn't a great way to undo the choice

what if we changed the preferences in General > Start up to:

"Ask me if I would like to restore my session"

and users could change this to one of the other choices if they didn't want the prompt.
I agree that it can clutter the UI, however, I think it's more useful to be given the option up-front on first instance (ie. a one-click solution) instead of having to go to the prefs dialog. I like the idea of a pref in the prefs dialog, though. I'm not sure an either-or approach is prudent.

Maybe placing all choices within a select-box would serve to declutter the UI while still giving the choice. Is it possible to have a select box with a checkbox on the bottom? In other words...

Would you like to restore your previous session?
 Restore session
 Not now
 [] don't notify me again
Something I just thought of...if this is a notification bar, how do we handle people who have customized their homepage to be multiple pages? Do we display the notification bar on the first tab only?
(In reply to comment #6)

Let me just add to my suggestion that I'm perfectly fine if we decide to have a single Restore button in the notification bar and a notification pref in the Prefs dialog. I just want to make sure we have a mechanism to disable and re-enable notifications.

If we decide to not have an up-front "disable notification" feature, we'll need to educate about the existence of the pref.
We also want to do this for when it's not a home page customization, but when the browser is opened with a url (eg, open a link in thunderbird when Firefox isn't started).
Attached file Patch v1 (WIP) (obsolete) —
This patch shows a notification bar so long as the user isn't on about:home or about:sessionrestore. Doesn't yet have a way for the user to disable the notification permanently.
Oops I forgot to mark the last attachment as a patch
Attachment #540272 - Attachment is obsolete: true
Comment on attachment 540274 [details] [diff] [review]
Patch v1 (WIP) [proper content type]

Review of attachment 540274 [details] [diff] [review]:

I think you're on the right track here, but a few things...

First off, strings need to be localized, which means putting them into a properties file (probably See what the telemetry notification is doing in _showTelemetryNotification (in nsBrowserGlue).

::: browser/components/nsBrowserGlue.js
@@ +414,5 @@
> +
> +  _showRestoreNotification: function BG__showRestoreNotification() {
> +    var win = this.getMostRecentBrowserWindow();
> +    var browser = win.gBrowser;
> +    var spec = browser.currentURI.spec;

I just ran this and looked at spec here - it looks like it'll consistently be about:blank since this fires so early, which isn't what we want. I think you can probably look at window.arguments to see what will be opened, but somebody else can tell you the truth there. Gavin?

@@ +431,5 @@
> +                    ];
> +
> +      var notifyBox = browser.getNotificationBox();
> +      var box = notifyBox.appendNotification("Would you like to restore your previous session?",
> +                                             "restore-session", null, notifyBox.PRIORITY_INFO_LOW, buttons);

We may need somebody (shorlander) to make an icon to match the icon on about home, but we'll want to use that instead of the default info icon.

@@ +432,5 @@
> +
> +      var notifyBox = browser.getNotificationBox();
> +      var box = notifyBox.appendNotification("Would you like to restore your previous session?",
> +                                             "restore-session", null, notifyBox.PRIORITY_INFO_LOW, buttons);
> +      box.persistence = 0;

box.persistence denotes how many onLocationChange events through which the notification will last. I'm not sure how long we want it to last, but as of right now, since it's being shown when about:blank is still up, it's disappearing right away when the home page loads.
Attachment #540274 - Flags: feedback-
Alex, do we have an icon for this or do we need shorlander to whip something up?
What's the status on the deactivation method -- preferences or an upfront option?

Also, how persistent should this notification be -- should it disappear once the user navigates to another page, or should it stick around for a while longer?
I would like us to introduce a preference instead of a check box on the bar.  The reason is kind of complicated.  While we often think of Firefox profiles as being equal to a single person (and this would be ideal), in reality that isn't usually the case.  Profiles travel on old computers to new people, and sometimes multiple people use the same instance of Firefox.

If we go with a pref instead of a check box, that means that fewer people will clear the bar, but the key part is that those that do clear the bar from being displayed are indicating that they really mean it.  This will help us avoid situations situations where a user wanted to see the session restore bar, but they don't because someone else at some earlier time decided to check the check box.

Additionally there this ties the option of not showing the bar to the exact same place to undo the operation.  Even if we have the preference in addition to the check box, many users will assume that it doesn't support undo because there is no clearly obvious path back to undoing the choice.
Attached patch Patch v2Splinter Review
The notification is now being activated after browser-delayed-startup-finished, which is hopefully late enough such to avoid the race conditions encountered in comment #12.

Notification text has been moved to, and the clock image added.

The notification can now be turned off permanently by setting a pref.
Attachment #540274 - Attachment is obsolete: true
Alex: How discoverable should we make the pref? Should we set it to a default value that appears in about:config, and should we make it available in the browser preferences dialog? Right now this patch does neither.
In preferences the first item

when nightly starts: [Show my home page and ask to restore my session]

this pref should effect both the bar, and the big button on about:home
So to confirm, there will be two relevant options:

when nightly starts: [Show my home page and ask to restore my session]
                     [Show my home page]

And selecting [Show my home page] will disable the notification?
yeah, perhaps:

Show my home page and no not ask to restore my session

These are getting too long though, shorten down to:

Show home page, ask to restore session
Show home page, do not ask to restore session
Hmm -- don't we want to show this notification if the user has about:blank as their home page too?
that would not be blank enough for our about:blank users.
So if the home page is about:home, we're going to have that big button to restore previous session. Should we not show that button if "Show home page, do not ask to restore session" is selected?
yeah, it makes the preferences simpler, and also some users had concerns over the privacy implications of a more discoverable session restore, so they might want to leverage the preference to disable the button.
This is many months after the damage has been done for most users, but I suppose might catch some.  The session remains incredibly vulnerable - in 6.0.1 you STILL lose it simply by starting Firefox, quitting and restarting!  See Bug 637148.

If you start an instance of Firefox via OLE, the situation has got worse!  You exit Firefox with tabs open.  You open a page externally via a link and exit Firefox when done.  You start Firefox and click on the Session Restore button.  The link (possibly confidential content from an email) is restored, but the session is gone!

As I mentioned here 3 months ago - - and bug-posted here - Bug 648081 - the obvious way of avoiding all this data loss and lack of faith in Firefox as being able to handle sessions safely is support for MULTIPLE SESSIONS.  I see no sign that this feature is in process (despite it long having been in Firefox for nested crashed sessions).  I would urge you to get onto this.
Whiteboard: p=0
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Decreasing the priority as no update for the last 2 years on this bug.
about the priority meaning.
Priority: P1 → P5

Hello! I have tried to reproduce this issue with the latest firefox versions on all os's. I will change the severity of this issue to minor, if you think this issue is still valid please feel free to change the severity to an appropriate state.

Have a nice day!

Severity: blocker → S4
You need to log in before you can comment on or make changes to this bug.