Open Bug 1608039 Opened 5 years ago Updated 2 years ago

Remote toolbox should not redirects to the connection error page when the connection is lost

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

What were you doing?

  1. Connect to a tab on a mobile device using about:debugging
  2. Edit some styles in the inspector/styleeditor
  3. Disconnect the device

What happened?

The about:devtools-toolbox redirects to the error page, and all the style changes the user had entered are lost.

What should have happened?

We should find a way to avoid losing the user inputs. Either we keep the toolbox alive after the connection is lost, or we are able to restore "sessions" in the panels that allow to edit styles.

Anything else we should know?

In Bug 1505368, we started redirecting the remote toolbox (about:devtools-toolbox page) to the error page as soon as the connection is lost.

However this means that the user will lose all the data they might have entered in DevTools. They might have CSS changes they want to preserve using the Changes panel for instance.

From the toolbox point of view, losing the connection means that the target is destroyed, which should trigger a toolbox destruction. We should see if we can special case this flow so that the UI can still be used. But, in the absence of a valid target, things might break a bit everywhere in the panels. I guess we should try and see how it goes.

If this proves too difficult, then the other way to look at this is that the panels that allow or user inputs (inspector and style editor mostly) should allow to restore the content of previous sessions (in the same way as we keep state for the breakpoints and the console history).

Was discussing this in the layout team meeting, being able to "restore" lost changes is on the roadmap and is tracked by the following bugs:

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