Open-Assistant
Open-Assistant copied to clipboard
Refactor the web tasks to present a server selected task type
Right now users can select the task type they want but for data collection goals it's better for the server to decide what task is most important.
We should refactor the tasks such that they're all components and a single task page (random) will fetch a task type and content from the server and then present whatever that task content is.
This requires moving some react code around and consolidating things then simplifying the landing page.
This is very high priority
Could maybe add task "points" concepts or something and have a way to see which are high value vs low value tasks etc. Eg maybe lean into the gamification stuff by putting a "price" or "value" on each task and then being able to use that to control or weight tasks and maybe even let users incentive to more higher value tasks.
Might be a bit too fancy for right now, but on the other hand if each task had a "points" associated with it that could be a useful building block to add now. Is kinda a product sort of question maybe.
Unsure myself but just throwing idea out there.
That's a good idea in the future. For the MVP we want to avoid creating any new feature requests for the backend. The backend right now doesn't have a way to check if a task type has actual tasks that need answers so the best option would be to just have a "Random" option on the dashboard and let the server pick the task which needs an answer.
Later on, your idea is the right direction to go towards but needs help in the backend.
Is there already an endpoint that will return a task_type?
EDIT: found where the task information is stored (TaskOption.tsx)
@fozziethebeat I created a draft PR to suggest how we can refactor the pages into components. It's already quite a big change, so I didn't add the "random" page yet. Want to double check I'm going in the right direction.
What I did was extract the task definitions from /Dashboard/TaskOption.tsx into /Tasks/TaskTypes.tsx and modify it to be more extendable. Then I based the components on it.
I created a Task.tsx which has the general task logic. CreateTask.tsx and EvaluateTask.tsx have the specific things those types need.
I also moved all the task pages into /tasks/ route.
I think this sounds right but i'd have to look at a PR to be sure
@fozziethebeat uploaded a new draft PR, let me know if that's more in the right direction, thanks!
@fozziethebeat Now that the refactor is merged (a big thanks to @AbdBarho for the help) we need to discuss the design of the page. The easiest way is to add a new category:

I don't think that looks good, plus it pushes the leaderboard out of view. Some suggestions:
- We can add a specific design for the random task, taking up less space
- We can reduce the gaps between categories
- We can cosider moving the leaderboard to the top
Let me know what you think.
Perhaps to add a point from the last meeting, assuming I understood everything correctly:
the random task should in theory be the only task kind available. the backend decides what the 'random' task should be based off what data is needed.
This is more or less the current behaviour of the discord bot.
@AbdBarho does the discord currently implement the labeling tasks?
Are we talking about a design like this:

If so, I think this still needs some thinking design wise.
I think this still needs a bit discussion with the team, I will add label it accordingly.
@kostiak regarding your question, I think the bot currently only shows random tasks. @AlexanderHOtt ?
With PR #470 now merged, should we also remove redundant TaskSelection folder & components?
@Klotske I did in #477, or at least what was obvious.
@AbdBarho Oh okay. Then great! I looked through the PR but missed that...
For right now (this will likely change later once there's more backend features) we should show just one task type on the dashboard. So yeah, we can clean up a lot of stuff that was for presenting all the task types.
I think this still needs a bit discussion with the team, I will add label it accordingly.
@kostiak regarding your question, I think the bot currently only shows random tasks. @AlexanderHOtt ?
The bot defaults to random, but the user can still select the type of task.
With everyone's help, this is now done!