Skip to content

Fb optic 1870 investigation: DO NOT MERGE #7389

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

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.

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.

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

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

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.

1 participant