Repository navigation
Announce the removal of connections and node pins right away - #75
Merged
Merged
Conversation
Resizing a display so that its connection was dropped crashed the editor with "Got unexpected undefined" in the connection renderer. A connection was deleted synchronously, but `didUnregister` was only emitted once the surrounding transaction had ended, a few microtasks later. A config change emits `didUpdate` for the node right after dropping the connections it invalidates, which re-renders the renderer of a connection subscribed to that node. At that point the connection was gone from the store, while the list of connections, which waits for `didUnregister`, still contained it. Emit `didUnregister` for connections as soon as they are deleted. Removing a connection cascades to nothing, so no listener can observe a half-removed state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A node pin was deleted synchronously, but the bit widths cached while it existed were only dropped when its removal was announced at the end of the transaction. Until then, the bit width of a pin derived from it, such as the output of an aggregate node whose split input pin was removed, was still reported with the removed pin counted in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee with
|
| Latest commit: |
4ef6636
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bb2acc97.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev |
| Branch Preview URL: | https://fix-connection-removal-annou.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a crash when a config change drops a connection, and a stale bit width right after a node pin is removed. Both came from the store deleting an item synchronously but announcing it only when the surrounding transaction ends, a few microtasks later.
didUpdatefor the display right after dropping the connection, which re-renders the renderer of the connection subscribed to it, while the list of connections still contains it untildidUnregister.didUnregisterfor connections is now emitted as soon as they are deleted. Removing a connection cascades to nothing, so no listener can observe a half-removed state.Testing
src/store/nodePin.test.tsthat fail without the respective change: the removal of a dropped connection is announced before the config change dropping it, and the output width of an aggregate node excludes a removed input pin right away.🤖 Generated with Claude Code