-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
When using a Taxonomy in labeling mode driven by an external API, it is possible for a data race to occur between the API load time and the rendering of the existing annotations list and details sections. If the taxonomy API takes a long time to load (generally longer than a second) then the UI will draw the list of existing annotations on the right of the screen with no labels at all. It will simply have the selected text, the id of the annotation, and the taxonomy path.
Further, once the Taxonomy has loaded, if you scroll up and down the list of annotations, once a annotation record is redrawn, it suddenly has the correct information.
To Reproduce
Steps to reproduce the behavior:
- Create a taxonomy control tag in labeling mode driven by an external api
- In the API, add something like a sleep call to make it take 5 seconds for the API to return
- Label a section of some text with a taxonomy record
- Save the annotation
- Reload
- You should see in the right hand annotation details view that the taxonomy label is not included in the annotation record
Expected behavior
The UI should wait to render until the Taxonomy API returns. I believe this is already the behavior for HyperText elements.
Screenshots
With data race where the annotation details view won
With data race where the taxonomy API won
Blacked out a lot of the text as this is proprietary company info
Environment (please complete the following information):
- Browser: Chrome
- OS: macOS
- Label Studio Version 1.16.0

