Skip to content

HTML blocks disappear after sequential setEntities calls #249

@Sharzon

Description

@Sharzon

Calling setEntities twice in a row—first to clear the graph and then immediately to fill it—causes the HTML blocks to disappear. This was discovered when using mocked data; while real network delays might mask it, the issue consistently reproduces when updates happen in rapid succession.
In storybook environment, this reproduces strictly without timeouts, while in my case, even a small timeout does not prevent the issue.

Steps to Reproduce

In the Playground, trigger a function that updates the state without a timeout:

const crashHtml = () => {
  setEntities({ blocks: [], connections: [] });
  setEntities(generatePlaygroundActionBlocks(10, 100));
};

Actual Behavior

The HTML blocks disappear from the graph. In some cases, even a small timeout between calls doesn't prevent the issue.

Expected Behavior

The graph should correctly render the final set of entities provided in the last setEntities call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions