/devices (or alternative) endpoint should return filtered and sorted list specifically for display in UI
Categories
(Cloud Services :: Server: Firefox Accounts, enhancement)
Tracking
(Not tracked)
People
(Reporter: markh, Assigned: jrgm)
References
Details
Attachments
(2 files)
All our browsers display an unfiltered list of devices in "send tab" UI. Often there are duplicates - this is particularly noticeable on mobile where uninstalling the app without first explicitly disconnecting leaves a phantom device.
Desktop also doesn't filter, but sorts the list by name. We have bugs where users request it be sorted by recently used, which sounds perfectly reasonable.
Rather than having each browser learn how to dedupe and decide what to sort by, it seems reasonable that this be done by FxA. This means we can roll out changes to this without waiting for trains and all browsers will offer the same experience.
There's probably value in an end-point that doesn't filter, so there are a few options:
- existing end-point filters, but a special query param is required to filter, or required to not filter.
- a new end-point specifically for this.
- we decide there's no value to that unfiltered end-point, so just make it the only available option.
I'm open to any of these. Desktop will need to change regardless (to avoid sorting) and a change to our mobile platforms would be simple - so whatever works for fxa will work for us.
The initial rollout could be fairly conservative - eg, just filter devices with exactly matching names where the other devices haven't been used in some period. For reference, I'm attaching what my test account looks like on Fenix and Desktop, to hopefully make it clear what problem I'm looking to solve.
| Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
There's probably value in an end-point that doesn't filter, so there are a few options:
We used to use the /devices endpoint both for populating the send-tab device list, and for displaying the "Devices and Apps" list in the FxA settings page. We've since switched to using the new /attached_clients endpoint for the later, which I think fits the bill of non-filtering endpoint as you describe above.
I would argue in favour of making the /devices endpoint specifically fit the needs of clients who are showing device-related UI such as send-tab, whatever we decide those needs to be.
Comment 3•5 years ago
|
||
How would you de-dupe these devices? Technically, they are different, right?
/cc @adavis
| Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Wil Clouser [:clouserw] from comment #3)
How would you de-dupe these devices? Technically, they are different, right?
"Technically" they are different but in actual fact they are the same device. So we'd need heuristics. Something like "has an identical name as another and hasn't been used in (say) 1 week" might be a good first step? Having those heuristics live on the server and so able to have different train schedules than the clients is one reason why I think it makes sense for the server to do that filtering.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
:markh The PR in the above comment has been merged. Can this bug be marked as resolved?
| Reporter | ||
Comment 6•2 years ago
|
||
Yeah, we've no plans for further work here.
Description
•