Skip to content

fix(vscode): keep the data of each relationship in a connects pair - #3567

Open
markscott-ms wants to merge 1 commit into
fix/3518-canvas-keeps-fieldsfrom
fix/3519-bidirectional-keeps-data
Open

markscott-ms wants to merge 1 commit into
fix/3518-canvas-keeps-fieldsfrom
fix/3519-bidirectional-keeps-data

Conversation

@markscott-ms

Copy link
Copy Markdown
Contributor

Description

Closes #3519. Stacked on #3566: review and merge that first.

CALM Canvas merged A→B and B→A connects relationships into one bidirectional edge. When it wrote the document, it gave the second relationship the protocol, description and metadata of the first, and removed its controls.

The canvas now merges a pair only when both relationships have the same data in the fields that it edits (protocol, description, controls, metadata). Key order is ignored. A pair with different data shows as two edges, and each edge writes back its own relationship. The issue lists this as the second possible fix. I did not pick the first one (keep the data of both relationships on one edge), because then the Properties panel cannot show which description it edits.

A merged pair has the same data, so an edit of the edge now goes to both relationships. This includes controls, which the reverse relationship did not get before.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Schema (calm/)
  • CALM AI (calm-ai/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • CALM Lab (calm-lab/)
  • CALM Models (calm-models/)
  • CALM Server (calm-server/)
  • CALM Studio (calm-studio/)
  • CALM Widgets (calm-widgets/)
  • CALMGuard (calm-guard/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

New tests: a pair with different data stays as two edges and gives the same text after a round trip. A pair with the same data merges, also when its keys are in a different order, and an edit of the merged edge goes to both relationships.

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

@markscott-ms
markscott-ms requested a review from a team as a code owner October 28, 2026 22:07
@markscott-ms
markscott-ms added this pull request to stack #3585 October 29, 2026 22:59
CALM Canvas merged A→B and B→A connects relationships into one edge
and wrote the data of the first back to both. Merge a pair only when
both have the same edited data, and write controls to the reverse.

Closes #3519
@rocketstack-matt
rocketstack-matt force-pushed the fix/3519-bidirectional-keeps-data branch from 568bc66 to aa43aff Compare November 6, 2026 15:22

This branch has not been deployed

No deployments
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.

1 participant