Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task order not reflecting Lab choice + freezing workflow #5807

Open
1 of 6 tasks
snblickhan opened this issue Dec 22, 2023 · 13 comments · May be fixed by zooniverse/Panoptes-Front-End#7099
Open
1 of 6 tasks

Task order not reflecting Lab choice + freezing workflow #5807

snblickhan opened this issue Dec 22, 2023 · 13 comments · May be fixed by zooniverse/Panoptes-Front-End#7099
Assignees
Labels
bug Something isn't working

Comments

@snblickhan
Copy link

snblickhan commented Dec 22, 2023

FEM

Choose from the list:

  • app-content-pages
  • app-project
  • lib-classifier
  • lib-panoptes-js
  • lib-react-components
  • unknown

Describe the bug

3/13/24 update: This is a known PFE bug. It has a bandaid fix in PFE's classifier component, so the bug won't be an issue on PFE projects. FEM projects do not have this bandaid fix yet. For most projects, we will catch any instances of this bug at the building stage or at least during internal review/beta. Projects at risk of launching live workflows with this bug are: 1) already on FEM; and 2) have already launched and are adding new workflows without as much testing (e.g. copying a workflow).

--
A branching workflow in FEM (project ID: 21696) is at times displaying the 'Next' button when a specific task should lead to 'Submit classification and load next subject'. The 'Next' button doesn't lead anywhere and leaves the user stuck.

The project has multiple branching workflows (with identical structure), and this bug is appearing in some of them. The project owner can sometimes fix the issue by changing the 'next task' to a different task, and then changing it back to 'Submit classification and load next subject'.

From the original report (via Freshdesk ticket https://zooniverse.freshdesk.com/a/tickets/18560):

often, while testing the workflows, I pushed a button that resulted in “Submit classification and load next subject” and it didn’t work as expected: instead, the workflow would loop back to the same box, this time empty – without submitting the classification. I managed to make it work by changing the destination to some other step, and then switch back to the one but that it did not work consistently.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://frontend.preview.zooniverse.org/projects/johandmi/arctic-archives-unraveling-greenlands-weather-history/classify/workflow/25700
  2. Click on the 9pm workflow
  3. Choose the 'monthly' data format
  4. See error at step 'Aar/annee': 'Next button' doesn't lead anywhere, and is incorrectly presented (should be 'Submit classification and load next subject').

Screenshots

demo.mp4

Expected behavior

The lab behavior is set to 'Submit classification and load next subject' for this step, which is what would be expected, not the 'Next' button

Device information

Desktop (please complete the following information):

  • OS: Mac OS Ventura
  • Browser: Chrome
  • Version: 120

Additional context

The project owner has ID'd a workaround for this, albeit it isn't always reliable:

a workaround that (sometimes) works: changing the Next task to some other task than “Submit classification and load next subject”, then exit the workflow, reenter, and change back to “Submit classification and load next subject”. Somehow, this fixed the issue in one of the other workflows, but it is not so practical.

@snblickhan snblickhan added the bug Something isn't working label Dec 22, 2023
@snblickhan
Copy link
Author

Possibly seeing the same issue on project 20163, workflow 25006. Freshdesk ticket link.

Somehow the 'next' button doesn't work and you can't go on to the next picture, which also means it is currently not possible to actually submit a transcription. (The second workflow works without this issue.)

Note that this is a single-task workflow, not branching. I was able to replicate right away. After drawing 2 boxes and entering test transcription data, I clicked 'Next' and nothing happened. I can confirm that, in the Lab, the next step is set to 'Submit classification and load next subject'.

@snblickhan
Copy link
Author

Update: on project 20163, workflow 25006, I tried the workaround that the original team described (changing the next step to a different task, then re-selecting "submit") and it seemed to work, at least temporarily. I'll ask the team to keep an eye on it and let us know if they encounter the issue again.

@goplayoutside3
Copy link
Contributor

goplayoutside3 commented Dec 22, 2023

An important distinction is that this bug only occurs in the FEM classifier, not the PFE classifier. I updated the project link in "How to Replicate" to https://frontend.preview.zooniverse.org/projects/johandmi/arctic-archives-unraveling-greenlands-weather-history/classify/workflow/25700

Noting that the second project mentioned is ABC's of Dialect on FEM https://frontend.preview.zooniverse.org/projects/dschopper/the-abcs-of-dialect

@eatyourgreens
Copy link
Contributor

This sounds like a Project Builder bug that came up a couple of times during Engaging Crowds. When you delete a task, it doesn't necessarily clear task.next for the previous task.

In the broken workflow, you can see that task.next is 'T8' for the broken task (T7.) There is no task T8, so the Next button does nothing.

When a task doesn't exist, the Project Builder incorrectly shows 'Submit classification…' as the next task. I bet that's what has happened here.

@Saicbmm
Copy link

Saicbmm commented Jan 2, 2024

In regards to the freezing workflow, when I inspected the code for the done button, it seems that there is no code for the on-click activity of the done button in the monthly data workflow which should be coded in JS. Adding the code along with connecting it to the backend should fix the job.

@goplayoutside3
Copy link
Contributor

@eatyourgreens how did you inspect the broken workflow to see task.next? Did you look at the workflow response when viewing its project builder page in the browser tools?

I'm looking for the best way to debug here because it's confusing that the above mentioned project's workflow is broken in the FEM classifier, but NOT in the PFE classifier. I don't think anyone's been able to replicate the classifier bug in PFE yet.

@eatyourgreens
Copy link
Contributor

how did you inspect the broken workflow to see task.next? Did you look at the workflow response when viewing its project builder page in the browser tools?

Yep, I looked at workflow.tasks in the network panel for the broken workflow. The broken task is T7, and T7.next is set to 'T8', which doesn't exist.

When you delete a task in the project builder, I don't think the workflow editor clears any references to that task key in other workflow tasks. So tasks can be left with task.next pointing to a task that doesn't exist. This bug has come up a few times before. I remember it from Engaging Crowds projects, which had some very complicated workflows.

I'm looking for the best way to debug here because it's confusing that the above mentioned project's
workflow is broken in the FEM classifier, but NOT in the PFE classifier. I don't think anyone's been able to replicate the classifier bug in PFE yet.

PFE overwrites task.next with an empty string, if it points to a task key that doesn't exist. That works, but hides any bugs in the underlying workflow.tasks object.
https://github.com/zooniverse/Panoptes-Front-End/blob/5e06958b45589a65c55af1f34fcfe06d717553bf/app/classifier/task-nav.jsx#L90-L92

@eatyourgreens
Copy link
Contributor

In regards to the freezing workflow, when I inspected the code for the done button, it seems that there is no code for the on-click activity of the done button in the monthly data workflow which should be coded in JS. Adding the code along with connecting it to the backend should fix the job.

This reads like it was generated by ChatGPT.

@goplayoutside3
Copy link
Contributor

goplayoutside3 commented Jan 2, 2024

PFE overwrites task.next with an empty string, if it points to a task key that doesn't exist. That works, but hides any bugs in the underlying workflow.tasks object.

Thanks this helps! Sounds like it would be beneficial to make the fix in the workflow editor and that FEM's classifier is doing its job even though T8 doesn't exist.

@goplayoutside3
Copy link
Contributor

goplayoutside3 commented Jan 2, 2024

Actually, several of the editor files in the project builder are written in coffeescript 😬 I might favor adding the same nextTaskKey = '' safeguard to FEM's classifier noting that FEM is getting a new "pages editor" in which we can make sure not to replicate the same task deletion bug.

@eatyourgreens did you look into how to change the current project builder so the task editor clears any references to a deleted task key in other tasks? (when encountered in Engaging Crowds work)

@eatyourgreens
Copy link
Contributor

I haven't looked into it, but this is the function that removes a task from a workflow.

https://github.com/zooniverse/Panoptes-Front-End/blob/5e06958b45589a65c55af1f34fcfe06d717553bf/app/pages/lab/workflow.jsx#L797-L814

@snblickhan
Copy link
Author

snblickhan commented Mar 13, 2024

Davy Notebooks Project experienced this issue. They copied an existing workflow and deleted one task from the workflow. When they launched, the last task in the new workflow showed the 'Next' button instead of 'Done', so the workflow couldn't move ahead.

Talk report: https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project/talk/2586/3292582?page=1&scrollToLastComment=true

I fixed the issue by changing the ordering for the last task from 'Submit' to another task in the workflow, then changing it BACK to 'Submit'. After this, the workflow performed as expected.

Why this is an edge case:

  • Most projects would catch this at internal testing, so it's low risk of making it into a live project
  • DNP is exception because they add new workflows regularly, and the new workflows are always copies of previous workflows. This one was an exception because they removed a Question Task from the end of the workflow (first time doing so). Moving ahead, expectation should always be for research team to test a workflow before making it active whether they've made changes or not.

@eatyourgreens
Copy link
Contributor

zooniverse/Panoptes-Front-End#7099 will fix this by removing dangling task keys, when you delete a task in the Project Builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants