Skip to content

Conversation

@bmartel
Copy link
Contributor

@bmartel bmartel commented Apr 16, 2025

This pull request introduces a significant improvement to the stability of the AppStore and TabStore by adding checks for the isAlive state from the mobx-state-tree library. These changes ensure that operations are not performed on instances that have been destroyed, preventing potential runtime errors. Additionally, the isAlive check has been applied consistently across views, actions, and flows in both stores.

Stability Enhancements:

AppStore Updates:

  • Added isAlive checks to computed properties like isLabeling, currentView, and dataStore to prevent accessing properties of destroyed instances. [1] [2] [3]
  • Wrapped critical actions such as startPolling, setMode, and removeAction with isAlive checks to ensure they are only executed on valid instances. [1] [2]
  • Updated flows like setTask, fetchProject, and fetchUsers to return early if the instance is no longer alive. [1] [2] [3]

TabStore Updates:

  • Added isAlive checks to views like all, canClose, and columns to prevent returning invalid data.
  • Ensured actions such as setSelected, deleteView, and addView are only executed when the instance is alive. [1] [2] [3]
  • Protected flows like saveView, updateViewOrder, and duplicateView with isAlive checks to avoid modifying destroyed instances. [1] [2] [3]

These changes collectively enhance the robustness of the application by preventing operations on invalid or destroyed store instances.

@netlify
Copy link

netlify bot commented Apr 16, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 903b555
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-storybook/deploys/680102cd86aebc000862b6bf
😎 Deploy Preview https://deploy-preview-7389--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 site configuration.

@netlify
Copy link

netlify bot commented Apr 16, 2025

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

Name Link
🔨 Latest commit 903b555
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/680102cd4ec9a40008770731

@netlify
Copy link

netlify bot commented Apr 16, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 903b555
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/680102cdb29206000917169d

@robot-ci-heartex
Copy link
Collaborator

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@robot-ci-heartex
Copy link
Collaborator

This PR was closed because it has been stalled for 10 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants