Skip to content

Conversation

@yyassi-heartex
Copy link
Contributor

This pull request introduces improvements to how FSM (Finite State Machine) states are handled for tasks that are bulk-created, ensuring their state is properly initialized even when the usual model save hooks are bypassed. Additionally, it updates the label for the initial task state in the UI for clarity.

before:
image

after:
Screenshot 2025-11-27 at 2 16 18 PM

FSM state handling improvements:

  • Added a _backfill_fsm_states method in label_studio/tasks/serializers.py to manually initialize FSM states for tasks created via bulk_create(), ensuring that FSM transitions registered with triggers_on_create=True are properly set even when the model's save() method isn't called. This includes robust error handling and logging to avoid interrupting imports if FSM backfill fails for any task or batch.

UI label update:

  • Changed the label for the CREATED state from "Created" to "Initial" in state-registry.ts to better reflect its meaning in the UI.

…n state, perhaps 'Initial' could make more sense, take a look at the screenshot
@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 50f70fd
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/692a036734ffbe0008a1fc27

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 50f70fd
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/692a036721db460008134609

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 50f70fd
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/692a03670fdcca0008bb7a34

@yyassi-heartex yyassi-heartex requested a review from a team November 27, 2025 19:19
@github-actions github-actions bot added the fix label Nov 27, 2025
@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 50f70fd
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/692a0367aedb2d0008c69109

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.46%. Comparing base (8b70162) to head (50f70fd).
⚠️ Report is 6 commits behind head on develop.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8904      +/-   ##
===========================================
+ Coverage    66.35%   66.46%   +0.11%     
===========================================
  Files          789      828      +39     
  Lines        63529    64783    +1254     
  Branches     10810    11040     +230     
===========================================
+ Hits         42153    43059     +906     
- Misses       21376    21720     +344     
- Partials         0        4       +4     
Flag Coverage Δ
lsf-e2e 51.81% <ø> (+0.01%) ⬆️
lsf-integration 48.57% <ø> (+0.30%) ⬆️
lsf-unit 8.33% <ø> (?)
pytests 81.31% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yyassi-heartex
Copy link
Contributor Author

yyassi-heartex commented Nov 28, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/apps/labelstudio/src/pages/Settings/StorageSettings/providers/localFiles.tsx

@robot-ci-heartex robot-ci-heartex merged commit 319e0c3 into develop Dec 1, 2025
103 of 107 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-fit-1059/initial-state branch December 1, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants