fix(joint-react): do not hide links connected to other links - #3478
Merged
zbynekstara merged 2 commits intoAug 24, 2026
Merged
Conversation
The paper hides a freshly inserted link view until its end views are 'ready' (portal-rendered elements are empty until their React content mounts). The readiness check resolved the end id via getElementView() only, so an end pointing at another link never became ready and the link stayed hidden forever. Only elements can render asynchronously — a link end never needs to be waited for. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
samuelgja
approved these changes
Aug 24, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes a Joint React PaperView issue where links whose source/target is another link could remain permanently hidden because the “link-end readiness” logic only considered elements as valid end targets. The change aligns the readiness check with actual async rendering behavior (only elements can be portal-delayed) and adds coverage to prevent regressions.
Changes:
- Treat link ends that reference a link cell as immediately “ready” (do not hide the newly inserted link view).
- Add Jest tests covering link-to-link endpoints, chained link-to-link endpoints, and portal-less element scenarios.
- Add a patch changeset for
@joint/react.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/joint-react/src/mvc/paper.ts | Updates isLinkEndReady to return ready when the end cell is a link, preventing permanent hiding for link-to-link connections. |
| packages/joint-react/src/mvc/tests/paper-portal-selector.test.ts | Adds regression tests ensuring link-to-link and portal-less link scenarios are not hidden. |
| .changeset/light-moons-wonder.md | Publishes the fix as a patch release for @joint/react. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
samuelgja
reviewed
Aug 24, 2026
kumilingus
added a commit
to clientIO/joint-demos
that referenced
this pull request
Aug 24, 2026
Aligns all @joint/* dependencies at 4.3.2 (a version mismatch duplicates @joint/plus and breaks class identity, e.g. the Selection frames value) and removes the render:done workaround for link-to-link visibility — fixed upstream in clientIO/joint#3478. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kumilingus
added a commit
to clientIO/joint-demos
that referenced
this pull request
Aug 24, 2026
The release contains the link-to-link visibility fix (clientIO/joint#3478), so the render:done unhide workaround is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
The react paper hides a freshly inserted link view (
visibility: hidden) until its end views are "ready" — portal-rendered elements are empty until their React content mounts, so a link pointing at them would otherwise dangle in the void.The readiness check (
isLinkEndReady → isElementReady → getElementView(id)) only ever resolves the end id among elements. When a link's end is another link (e.g. a BPMN annotation attached to a flow), the end never becomes ready and the link stays hidden forever —checkPendingLinksre-checks with the same test on every element insert, so it never recovers.Fix
A link end never needs to be waited for — only elements render asynchronously.
isLinkEndReadynow returnstruewhen the end cell is a link.Elements without portals are unaffected (already handled per view by
isElementReady— a view with no portal node is ready), so mixed portal/portal-less diagrams keep working.Tests
🤖 Generated with Claude Code