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

Feat: make taskprocessing task types toggleable #49727

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

janepie
Copy link
Member

@janepie janepie commented Dec 9, 2024

Summary

Makes taskprocessing task types toggable in AI admin settings: disabled types will not be available and will not show up in e.g. the assistant.
Task types are enabled by default. The values are stored in a new appconfig db record.

Before:
Screenshot_20241209_112014

After:
Screenshot_20241209_095400

Checklist

@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 6e42792 to adf5524 Compare December 9, 2024 08:19
@janepie janepie changed the title Feat/make tasks types toggleable Feat: make taskprocessing task types toggleable Dec 9, 2024
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch 3 times, most recently from 51ae6eb to b4437fb Compare December 9, 2024 10:14
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch 15 times, most recently from 7312acd to 1109a5e Compare December 11, 2024 17:05
@janepie janepie marked this pull request as ready for review December 11, 2024 17:05
@janepie janepie requested a review from skjnldsv as a code owner December 11, 2024 17:05
@janepie janepie requested a review from julien-nc December 11, 2024 17:06
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 1109a5e to 28ff78b Compare December 11, 2024 17:13
@janepie janepie removed the request for review from skjnldsv December 11, 2024 17:13
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 8f56d71 to 0a22e93 Compare December 11, 2024 17:19
@janepie janepie requested a review from marcelklehr December 11, 2024 17:20
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 0a22e93 to 25f74fe Compare December 12, 2024 09:10
@janepie janepie requested a review from kyteinsky December 12, 2024 09:13
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 25f74fe to 8a22461 Compare December 12, 2024 10:06
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from d2ff0bb to 608fee3 Compare December 12, 2024 14:43
if ($json === '') {
return [];
}
return json_decode($json, true, flags: JSON_THROW_ON_ERROR);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that this wasn't clear, we should also handle the JSON exceptions somewhere, so they don't break the whole server and cause a HTTP 500.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think should happen if the value is not parsable, return all task types or return none? I would say none so we do not enable something that should be disabled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense. Perhaps, we can also reset the value in the config to a valid json value when this happens?

@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 99c0960 to 7699f88 Compare December 12, 2024 15:13
@janepie janepie force-pushed the feat/make-tasks-types-toggleable branch from 7699f88 to 7024824 Compare December 12, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggle task types in admin settings
3 participants