Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Web Cleanup: Ensure `FlaggableElement` always has a list of valid labels

Open fozziethebeat opened this issue 2 years ago • 1 comments

FlaggableElement now wraps any message. These messages get used throughout the frontend in both tasks and when displaying messages or conversations.

To make things work I've piped an array of valid labels where possible for all task types and an empty array for the message views.

A more scalable approach would be fore FlaggableElement to automatically fetch the valid labels itself (and thus simplify all places that use FlaggableElement) but using smart caching so that the call only happens the first time FlaggableElement is used somewhere in the app.

fozziethebeat avatar Jan 10 '23 05:01 fozziethebeat

I have something working to my satisfaction. Will cleanup and prepare PR

fozziethebeat avatar Jan 10 '23 11:01 fozziethebeat