-
Notifications
You must be signed in to change notification settings - Fork 925
feat: implement efficient backend querying on the tasks page #18488
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
3883a22
to
c4d88d5
Compare
c4d88d5
to
4f403dd
Compare
4b753a6
to
f62da9d
Compare
4f403dd
to
69a2e2d
Compare
f62da9d
to
f114f43
Compare
69a2e2d
to
97a00ba
Compare
f114f43
to
bf23151
Compare
97a00ba
to
604f994
Compare
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.
Code looks good to me!
I tried it out and my template is not showing up in the dropdown and my workspace does not show in the table, but from my brief glance at the sql I think this is just because the has_ai_task
column is always false at the moment?
@@ -211,7 +247,7 @@ const TaskForm: FC<TaskFormProps> = ({ templates }) => { | |||
form.reset(); | |||
} catch (error) { | |||
const message = getErrorMessage(error, "Error creating task"); | |||
const detail = getErrorDetail(error) ?? "Please, try again"; | |||
const detail = getErrorDetail(error) ?? "Please try again"; |
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.
Extremely minor, just noticing that this error message has no comma but the ones on 174 and 379 do. Personally I like it better without a comma.
/> | ||
); | ||
} | ||
if (templates == null) { |
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.
Also minor: I think the linter is fine with this, but everywhere else we do === null
(triple equals) or just if (templates)
.
1273e3c
to
5a42c7e
Compare
604f994
to
b791c0a
Compare
Use the
/workspaces?q=has-ai-task=true
,/templates?q=has-ai-task=true
and/aitasks/prompts
endpoints to fetch Task templates and workspaces on the/tasks
page.Also:
Related to #18454 and coder/internal#660.
DANGER: this PR must be merged only after all issues mentioned in #18454 are closed to avoid breaking the dogfood environment.