-
Notifications
You must be signed in to change notification settings - Fork 26
feat: task layout design update #227
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
Conversation
54191ec to
b30edd8
Compare
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this works really well and looks good already 👍
I didn't review the code yet.
- It would be nice to select the task sidebar element (set the
activeprop of theNcAppNavigationItemto true) that is currently displayed (when the item is clicked or when submitting a new task, right after adding the sidebar item) - I agree with you, the loading view makes less sense now. It could be replaced by information in the i/o form. For running/scheduled tasks, we still need the "cancel" button to be very visible (not only in the context menu of the sidebar item). It could be next to the submit button. We also need a "get notified" button (like the one in the loading view) if the user wants to get a notification when the task finishes
- When will we update the data for a running task? The logic could be that if a running/scheduled task is selected, the assistant polls the task info (just like the loading view does)
- There could also be a single request to
taskprocessing/task/{taskId}when selecting a task (any state) to check if it still exists (remove it from the sidebar it if does not) and launch the polling if it is running or scheduled - We need to check that the "view result" button in notifications still opens the assistant with the task selected
What do you think?
b30edd8 to
c9932d8
Compare
Except that I'm currently reusing the TaskList component which uses
Still works for me.
Even if a running task is not selected, maybe it would be useful to poll it anyway, so that the entire task list for a selected task type appears to automatically update as tasks are completed. That and everything else can be added later in a future PR, perhaps. |
I think we should avoid constantly polling to get the status of all tasks.
|
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When clicking on "new task" the values are cleared but the sidebar item stays selected. It could just be deselected
- When switching task types, the info of which task is selected is kept, it could be deselected as well. Now if we select task type TT1, select task TA1, switch to task type TT2, switch back to task type TT1, the TA1 task is still selected in the sidebar but the form is clear.
Code looks good. I agree with all the little fixes you made in AssistantFormInputs.vue and TaskListItem.vue.
jancborchardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edward-ly could you add a screenshot or short video so I can do a quick design review? Or is it deployed somewhere? :)
Sorry about that, thanks for the reminder! |
Done for both. |
Yes.
I overall agree, but there are some finer details that need ironing out:
Maybe these are all questions that should be taken care of in a separate issue/PR. |
Yes, and then when switching to a task that is scheduled/running, we should start polling.
There is no endpoint to poll a list of tasks (that would take a list of task ID as parameter). But I think we don't need it. It is enough for now to only poll the selected task. The flow would be:
My idea is to replace the form (just the form, not the entire assistant view) with the loading view (the one that contains the NcEmptyContent, the progress etc...) while the task is scheduled/running so there is no need to disable the form. If you prefer getting rid of that loading screen then yes, it seems like a good alternative to disable the form while being in the scheduled/running state (and still display, somewhere above the form: the progress if running, the estimated runtime, a cancel button and a button to toggle the notification for this task). |
Yes we can do that in a separate PR. So the only remaining adjustment to make IMO is to get the task state when selecting a task that we know is scheduled/running. And then if it is still scheduled/running, show the loading view (just like after having submitted a task) so we stay consistent. |
7de4372 to
eff6e9c
Compare
Still needs some more thorough testing, but I think both of those are working now. Although, I couldn't figure out an elegant way to update the status in the task list as all the |
|
Latest commit also resolves #217. |
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the adjustments. Code looks good.
I tried to check everything. The only thing that is not working is the preservation of the "input" input because the default values are applied in 2 places:
- AssistantTextProcessingForm::onTaskTypeUserChange (where the input is preserved)
- AssistantFormInputs::watch::selectedTaskType
and if the second one happens after the first, the input field is cleared.
Let's just remove the last commit and merged this. We can think about #217 in a different PR.
Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
This helps display more relevant text in the sidebar. Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
… task Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>
Signed-off-by: Edward Ly <[email protected]>


Resolves #211. This is a large change that involves reorganizing the locations and properties of multiple components, so there will likely still be some visual and/or functional bugs that need ironing out. Feel free to add such bugs as to-do items here if you find any. Most tasks aside from context chat or context agent have been lightly tested.
Some missing items:
move (and possibly reorganize) the loading and scheduled screens(de-scoped in the meantime)New taskbutton not clearing the input prompt