Skip to content

Conversation

@yyassi-heartex
Copy link
Contributor

This pull request modernizes how available actions are fetched and managed in the DataManager UI by introducing a new React hook, useActions, powered by TanStack Query. The change replaces MobX-based flows with a hook-based approach, improving caching, loading states, and developer experience. The legacy MobX fetchActions flow is now deprecated, and actions are fetched on-demand when needed, reducing unnecessary API calls and aligning with best practices for React data fetching.

Key changes:

1. Actions fetching refactor and TanStack Query integration

  • Added a new useActions hook (useActions.ts) that fetches actions from the DataManager API using TanStack Query, supporting caching, loading/error states, and per-project cache scoping.
  • Updated the ActionsButton component to use the useActions hook instead of MobX flows, simplifying logic and improving UI responsiveness and reliability. [1] [2] [3]

2. Documentation and migration guidance

  • Added a comprehensive README for DataManager hooks, documenting useActions, usage patterns, migration steps from MobX, and best practices for TanStack Query integration.

3. MobX flow deprecation and cleanup

  • Marked the MobX fetchActions flow as deprecated in AppStore.js, retaining it only for backward compatibility and logging errors for failed fetches.
  • Removed background calls to fetchActions in favor of on-demand fetching via the new hook, preventing duplicate API calls and unnecessary data fetching.

@yyassi-heartex yyassi-heartex requested a review from a team as a code owner October 20, 2025 15:35
@netlify
Copy link

netlify bot commented Oct 20, 2025

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

Name Link
🔨 Latest commit cd2bd5c
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/68ffcd2c41ebba0008a16940

@github-actions github-actions bot added the fix label Oct 20, 2025
@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit cd2bd5c
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/68ffcd2c41ebba0008a1693c

@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit cd2bd5c
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/68ffcd2c00ca440008f9f6d4
😎 Deploy Preview https://deploy-preview-8679--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit cd2bd5c
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/68ffcd2cec74a20008226b51
😎 Deploy Preview https://deploy-preview-8679--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.34%. Comparing base (d3fd5f2) to head (cd2bd5c).
⚠️ Report is 2 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (d3fd5f2) and HEAD (cd2bd5c). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (d3fd5f2) HEAD (cd2bd5c)
pytests 1 0
lsf-integration 1 0
lsf-e2e 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #8679       +/-   ##
===========================================
- Coverage    67.07%   8.34%   -58.73%     
===========================================
  Files          790     478      -312     
  Lines        60675   33264    -27411     
  Branches     10310    9034     -1276     
===========================================
- Hits         40697    2777    -37920     
- Misses       19975   30484    +10509     
  Partials         3       3               
Flag Coverage Δ
lsf-e2e ?
lsf-integration ?
lsf-unit 8.34% <ø> (ø)
pytests ?

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 Oct 26, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/ui/src/assets/icons/webhook.svg

@yyassi-heartex
Copy link
Contributor Author

yyassi-heartex commented Oct 26, 2025

/fmt

Workflow run

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.

1 participant