zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
104 stars 29 forks source link

Classification started_at is off by hours (or days) for continuous sessions in the same tab. #6447

Open eatyourgreens opened 1 week ago

eatyourgreens commented 1 week ago

I looked back through my classifications on my admin page (https://local.zooniverse.org:3735/admin/users/149?env=production) and classification 596255757 was started at 12:46:12 but finished at 17:32:48, which is the time that the classification was saved to Panoptes. There's a bunch of classifications that were submitted in between, around about 13:30, each taking roughly 30 seconds or so.

A classification from Squirrel Mapper, displayed on my admin page. It's recorded as having taken 4 hours and 45 minutes. Other cl;assifications at that time took about 45 seconds.

Originally posted by @eatyourgreens in https://github.com/zooniverse/front-end-monorepo/issues/6441#issuecomment-2459689168

Classification 596255757, shown above was started at about 17:32:00 and submitted at 17:32:48. The timestamp recorded on the classification has it starting at 12:46:12.

To reproduce this:

  1. Classify a few subjects.
  2. Leave the tab for a while.
  3. Return to the tab and classify the subject that's already loaded.

In the case of the classification that's shown in the screenshot, I triggered this bug by doing some classifications on Squirrel Mapper in the morning, then returning and continuing to classify in the afternoon, creating one classification that's recorded as being ~5 hours long.

Classifications start when the subject loads, which will be the end of your previous classification session in this case. It would be more accurate to record the time that the first annotation is created or updated. You can detect when a volunteer begins to interact with an annotation by tracking when annotation._inProgress changes from false to true. https://github.com/zooniverse/front-end-monorepo/blob/b7b228db9470d7c121df051d5f09d6592cf79371/packages/lib-classifier/src/plugins/tasks/models/Annotation.js#L33-L39

Talk discussion here: https://www.zooniverse.org/talk/17/3490049?comment=5742039

eatyourgreens commented 1 week ago

From Peter Mason on Talk:

I have seen differences in the start time (started classifying by the volunteer) and finished times (completed classification received by zooniverse) of many hours, even days.

eatyourgreens commented 1 week ago

PFE also sets started_at when the subject first loads, so it should be possible to reproduce this bug there too. That probably accounts for the majority of the bad data that Peter is dealing with.

eatyourgreens commented 5 days ago

Here's the equivalent issue and PR for PFE: