Multi task feature#835
Open
coryzoon wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for multi-task workflows on mobile (volunteer answers 2+ tasks in sequence before a single
classification POST) and refactors the four classifier screens into a single unified shell to make that
possible.
What changed
Phase 1 — Classifier refactor (prep work for multi-task)
The four legacy classifier screens (Question, MultiAnswer, Drawing, Swiper) previously each owned their own data
loading, layout, and submission logic. They've been replaced with a single
ClassifierScreenshell thatdispatches to one of four prop-driven workflow body components (
SingleChoice,MultiSelect,Drawing,Swipe).useSubjectQueue,useWorkflowResources,useProjectTranslations,useFeedbackFlow.connect()ed legacy versions where the new prop-driven flow needs them (drawingcanvas, tool panel, subject viewer, modal sheet).
thunks stay in place so the legacy screens still work as a rollback option.
regresses.
Phase 2 — Multi-task chain
taskChain.js— pure helpers (isMultiTaskWorkflow,getNextTaskKey,isLastTaskInChain,activePathTaskKeys) that decide whether a workflow chains and where each task points next.classificationRTK slice extended withcurrentTaskKey,taskHistory, andannotationsByTaskso eachchain task's annotation is stored, restorable on Back, and prunable on re-branch.
ClassifierScreenreadscurrentTaskKeyfrom the slice and remounts the correct body on chain advance.Subject queue lifted into the shell so a Swipe → non-Swipe advance keeps the active subject.
ChainBackButtonrenders whenevertaskHistory.length > 0. Re-picking a different branch after Backautomatically prunes stale downstream annotations.
is gated on a non-empty selection mid-chain (matches FEM).
next,done,back) inen/mobileEn.json; other locales fall back to inline English.Notes for review
src/actions/projects.jshas three// TEMP:patches that force the HAVI testproject (
32778) and workflow (31723) through the project/workflow pipeline despitemobile_friendly: false.These must be removed once the backend marks HAVI as mobile-friendly and
isValidMobileWorkflowis relaxed toaccept multi-task chains.