-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: FIT-983: [FSM UI] StateChip popover with history #8809
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8809 +/- ##
===========================================
- Coverage 67.71% 60.00% -7.71%
===========================================
Files 806 554 -252
Lines 62093 38999 -23094
Branches 10328 10333 +5
===========================================
- Hits 42044 23400 -18644
+ Misses 20046 15596 -4450
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request introduces a comprehensive state transition history feature for tasks and annotations, including backend API endpoints and frontend UI components for displaying state history in popovers. The changes enable users to view the complete FSM (finite state machine) state transition history for tasks and annotations, improving transparency and debugging capabilities.
Backend: State History API Endpoints
label_studio/tasks/api.pyto retrieve the full state transition history for a specific task or annotation, including metadata such as who triggered the transition, timestamps, and reasons. These endpoints are registered inlabel_studio/tasks/urls.py. [1] [2]Frontend: State History Popover Components and Hooks
StateHistoryPopoverReact component inweb/apps/labelstudio/src/components/FSM/StateHistoryPopover.tsxthat displays the state history in a popover with color-coded badges, timestamps, and user info.useStateHistoryfor fetching state history from the new API endpoints, including caching and error handling.formatters.tsto ensure user-friendly display.index.tsbarrel file for easy import elsewhere.Integration and UI Enhancements
StateChipcomponent inweb/libs/datamanager/src/components/CellViews/StateChip.tsxthat displays the current state as a badge and, when interactive, opens the state history popover on click. This provides a consistent and interactive way to inspect state history from data tables or detail views.Minor Cleanup
console.logstatement from thePeopleListcomponent.