Skip to content

Fix diagram fetches race condition#3730

Merged
ayolab merged 2 commits intomainfrom
ayolab/fix-diagram-fetches-race-condition
Feb 13, 2026
Merged

Fix diagram fetches race condition#3730
ayolab merged 2 commits intomainfrom
ayolab/fix-diagram-fetches-race-condition

Conversation

@ayolab
Copy link
Copy Markdown
Contributor

@ayolab ayolab commented Feb 10, 2026

No description provided.

Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
} else {
errorMessage = 'svgLoadingFail';
snackError({ headerId: errorMessage });
if (isNodeBuilt(currentNodeRef.current)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK it works. But I am worried about this solution. Are you sure that this is a good idea to hide ALL errors as long as the node is not built ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the node isn’t built, we display 'Node not built' in the error section. Once the node is built or when the user selects another built node we trigger a new fetch to regenerate the diagram, so the node becomes built and the error is shown. And if a node becomes unbuilt while an error exists, that error is outdated anyway

@sonarqubecloud
Copy link
Copy Markdown

@ayolab ayolab merged commit 3f9827d into main Feb 13, 2026
7 of 9 checks passed
@ayolab ayolab deleted the ayolab/fix-diagram-fetches-race-condition branch February 13, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants