Closed Bug 1033531 Opened 8 years ago Closed 8 years ago

[Vertical Homescreen] Apps don't appear in custom smart collections if Smart Collection is entered too quickly

Categories

(Firefox OS Graveyard :: Gaia::Everything.me, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)

VERIFIED FIXED
2.0 S6 (18july)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.1 --- verified

People

(Reporter: amylee, Assigned: crdlc)

References

Details

(Whiteboard: [2.0-VH-bug-bash][systemsfe])

Attachments

(2 files)

Steps to reproduce:

1. Create custom smart collection
2. Add 2 apps (line and sound cloud). 
3. Go into collection. Apps are there. 
4. Exit out. Add music app to collection. Music icon appears in smart collection icon but when you go into it, the music app icon isn’t there. 
5. Exit out. 
6. Add another app into collection (YouZeek). Go back into collection. All apps now appear
I was able to reproduce only if I quickly enter the Smart Collection after an app is added.  Same thing appears with pre-installed Smart Collection.

Sounds like a bad race condition.
blocking-b2g: --- → 2.0?
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+]
Summary: [Vertical Homescreen] Apps don't always appear in custom smart collections → [Vertical Homescreen] Apps don't appear in custom smart collections if Smart Collection is entered too quickly
Could we get an understanding of the relative speed to trigger this & a video to demonstrate it? Can we get a video?
Blocks: 1015336
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+] → [VH-FL-blocking-][VH-FC-blocking?]
Keywords: qawanted
This seems to be doable by a regular user: http://mzl.la/1qRHEhx
The first attempt demonstrates the race condition, the second shows the icon being correctly displayed.
Keywords: qawanted
blocking-b2g: 2.0? → 2.0+
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking?] → [VH-FL-blocking-][VH-FC-blocking+]
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Attached file Github pull request
Thanks Kevin for taking a look at this
Attachment #8452247 - Flags: review?(kgrandon)
Comment on attachment 8452247 [details]
Github pull request

It looks good to me, but I am a bit concerned that we may still miss the event? See comment on github. Thanks!
Attachment #8452247 - Flags: review?(kgrandon) → review+
Moved handler below collection.refresh() where get the pinned app from datastore and waiting for Travis
Merged in master:

https://github.com/crdlc/gaia/commit/f692b8c3a7de00161538744cefb971af9e0ce673
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S6 (18july)
Custom collections do not have a categoryId, so the condition:
> if (collection.categoryId !== data.categoryId)
will fail for two custom collections.

Can we use collection.id instead?
https://github.com/mozilla-b2g/gaia/blob/81e8ba637a4f269dfceac8b9191b9b7f4734df94/apps/collection/js/view_apps.js#L67

(Sorry for my late comment. I was not aware of this bug.)
Flags: needinfo?(crdlc)
Blocks: 1057964
OK, filled bug 1057964

(In reply to Amir Nissim (:amirn) from comment #9)
> Custom collections do not have a categoryId, so the condition:
> > if (collection.categoryId !== data.categoryId)
> will fail for two custom collections.
> 
> Can we use collection.id instead?
> https://github.com/mozilla-b2g/gaia/blob/
> 81e8ba637a4f269dfceac8b9191b9b7f4734df94/apps/collection/js/view_apps.js#L67
> 
> (Sorry for my late comment. I was not aware of this bug.)
Flags: needinfo?(crdlc)
This issue has been successfully verified on Flame v2.1&2.0.
See attachment: verified_v2.1.mp4.
Reproduce rate: 0/5

STR:
1. Install Line,Sound Cloud and YouZeek app from Marketplace.
2. Create a custom smart collection named as "smart",or other names.
**The custom collection is created successfully.
3. Add Line and Sound Cloud into the collection. 
4. Open the collection. 
**The 2 apps are there. 
5. Exit out, and add Music app to the collection. 
**Music icon appears in smart collection icon and it is here after reopening the collection. 
6. Exit out, and add YouZeek app into the collection. 
**Go back into collection,all apps appear in the collection.

Flame 2.1 build:
Gaia-Rev        38e17b0219cbc50a4ad6f51101898f89e513a552
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/8b92c4b8f59a
Build-ID        20141205001201
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141205.035305
FW-Date         Fri Dec  5 03:53:16 EST 2014
Bootloader      L1TC00011880

Flame 2.0 build:
Gaia-Rev        856863962362030174bae4e03d59c3ebbc182473
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/e40fe21e37f1
Build-ID        20141208000206
Version         32.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141208.035628
FW-Date         Mon Dec  8 03:56:38 EST 2014
Bootloader      L1TC00011880
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.