[remote-dbg-next] Show new USB devices in sidebar before runtime started

RESOLVED FIXED in Firefox 66

Status

enhancement
P1
normal
RESOLVED FIXED
5 months ago
2 months ago

People

(Reporter: jdescottes, Assigned: jdescottes)

Tracking

(Blocks 1 bug)

unspecified
Firefox 66
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(7 attachments)

(Assignee)

Description

5 months ago
Posted image image.png
In the initial mockups for remote debugging ng (https://mozilla.invisionapp.com/share/F9IVW9WPG4W#/screens/297684721) we said that we should show connected USB devices in the sidebar even if the debuggable runtime hasn't started.

See screenshot from the original mockups.
(Assignee)

Updated

5 months ago
Priority: -- → P2
(Assignee)

Updated

5 months ago
Depends on: 1501638
(Assignee)

Updated

4 months ago
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
(Assignee)

Comment 1

4 months ago
The model information is duplicated between adb runtime and adb device.
This allows to keep the information in a single place.
(Assignee)

Comment 2

4 months ago
Depends on D14307. Introduce a placeholder UnknownAdbRuntime extending AdbRuntime.
AdbRuntime implements isUnknown(). This method is used to filter out the unknown runtimes in
webide and about:debugging. (filter will be removed in about:debugging in a patch in the same
queue)
(Assignee)

Comment 3

4 months ago
Depends on D14309. Relying on head_mocks will make it easier to
update the mocks when we start calling isUnknown() on our USB runtimes.
(Assignee)

Comment 4

4 months ago
Depends on D14310. This patch enables displaying devices on which the debuggable
runtime is not started yet. To test it, simply use an android phone with USB debugging enabled
but don't start Firefox yet. You should see the Unknown Runtime item in the sidebar.

Not that once you start Firefox on the device, you need to click refresh runtimes here to get
the sidebar to refresh (more on that in the last patch of the series).

Two things I am not completely happy with: 
- calling this a runtime, when really it's just a device that has no runtime.
  but I don't want to start renaming all our state for that. Hope we can treat it as
  placeholder runtime, and forget about it.
- localization for the runtime item name can be done in many ways. Not using getString 
  at all makes things really complicated, but I'm open to suggestions if you have any
(Assignee)

Comment 6

4 months ago
Depends on D14318. This patch introduces a setInterval to check if
new runtimes have appeared on monitored devices, directly from ADB. This is
one of the scenarios where we don't get an update from ADB. ADB is able to 
track devices appearing or disappearing but here we are looking for a new 
process, containing a specific string. Out of the box I don't think we can
do anything for this. 

Maybe we could ask the devtools server to "broadcast" its presence when it
starts, but at the moment I am not sure how we should implement that.
(Assignee)

Updated

4 months ago
Keywords: leave-open

Comment 8

4 months ago
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87e9d7660f1b
Refactor AdbDevice to have an async initialize step;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/71af9cefc4ab
Add unknown runtime entries for devices with no runtime detected;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/e63355818e19
Migrate sidebar_usb_runtime to use head_mocks;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/3b9db2fd0679
Display unknown runtimes in about:debugging;r=daisuke,ladybenko,Ola
https://hg.mozilla.org/integration/autoland/rev/fb34e295bcf4
Add test for unknown USB runtimes;r=daisuke,ladybenko,Ola
(Assignee)

Updated

4 months ago
Keywords: leave-open

Comment 10

4 months ago
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ebd7cddb2718
Check for ADB runtimes updates periodically;r=daisuke,ladybenko

Comment 11

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ebd7cddb2718
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
(Assignee)

Updated

2 months ago
Duplicate of this bug: 1506000
You need to log in before you can comment on or make changes to this bug.