Skip to content

feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widget#2701

Open
markscott-ms wants to merge 2 commits into
finos:mainfrom
markscott-ms:feat/1600-ignore-connected-interfaces
Open

feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widget#2701
markscott-ms wants to merge 2 commits into
finos:mainfrom
markscott-ms:feat/1600-ignore-connected-interfaces

Conversation

@markscott-ms

@markscott-ms markscott-ms commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1600

Adds a new ignore-connected-interfaces boolean option to the block-architecture widget.

When using focus-interfaces with edges=connected and render-interfaces=true, the widget currently renders all interfaces on every visible node — including unrelated ones on connected nodes. This makes the diagram cluttered and harder to read when the user is trying to understand a specific interface and its connections.

With ignore-connected-interfaces=true, only the interfaces that actually participate in the active relationships are rendered. All other interfaces (on seed nodes and connected nodes alike) are hidden. Edges still route to the interface sub-nodes, which are now correctly rendered.

Example (payment architecture)

Focusing on payment-api with edges=connected render-interfaces=true:

Interface Without option With ignore-connected-interfaces=true
payment-api (seed) ✅ shown ✅ shown
fraud-check-api (active destination) ✅ shown ✅ shown
email-iface (active destination) ✅ shown ✅ shown
audit-log-iface (seed, not in any active rel) ✅ shown ❌ hidden
risk-model-iface, score-db-iface (connected, inactive) ✅ shown ❌ hidden
sms-iface (connected, inactive) ✅ shown ❌ hidden

Screenshots

Without ignore-connected-interfaces (existing behaviour)

{{block-architecture focus-interfaces="payment-api" render-interfaces=true edges="connected"}}
image

With ignore-connected-interfaces=true (new behaviour)

{{block-architecture focus-interfaces="payment-api" render-interfaces=true edges="connected" ignore-connected-interfaces=true}}
image

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 Server (calm-server/)
  • CALM Widgets (calm-widgets/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widget

Testing

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

New tests added:

  • node-factory.spec.ts: filters interfaces by activeInterfaceIds; produces no interfaces when set is empty
  • container-builder.spec.ts: passes activeInterfaceIds through to the node factory
  • options-parser.spec.ts: parses ignore-connected-interfaces option
  • E2E fixture ignore-connected-interfaces/: side-by-side before/after using a 3-node payment architecture

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 June 20, 2026 19:59
…rchitecture widget

When focus-interfaces is used with edges=connected, all interfaces on all
visible nodes are rendered, including unrelated ones on connected nodes.
The new ignore-connected-interfaces option restricts rendering to only
the interfaces that appear in the active (filtered) relationships, hiding
all others regardless of which node they belong to.

Closes finos#1600
@markscott-ms markscott-ms force-pushed the feat/1600-ignore-connected-interfaces branch from 1b8d5a8 to 4815c7f Compare June 20, 2026 20:06
@markscott-ms markscott-ms requested a review from Copilot June 20, 2026 20:08

Copilot AI left a comment

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.

Pull request overview

Adds a new ignore-connected-interfaces option to the block-architecture widget (calm-widgets) to declutter focused interface views by rendering only interfaces that participate in the currently active/filtered relationships.

Changes:

  • Introduces the ignore-connected-interfaces option (types + parsing) and threads an activeInterfaceIds allowlist into VM construction.
  • Updates node/container VM factories to optionally filter rendered interfaces, with unit coverage for the new filtering behavior.
  • Adds an end-to-end fixture demonstrating before/after output and documents the new option in calm-widgets/README.md.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
calm-widgets/test-fixtures/block-architecture-widget/ignore-connected-interfaces/template.hbs New fixture template showing before/after usage of the option.
calm-widgets/test-fixtures/block-architecture-widget/ignore-connected-interfaces/expected.md Expected Mermaid output for the new fixture (before/after).
calm-widgets/test-fixtures/block-architecture-widget/ignore-connected-interfaces/context.json Fixture model containing interfaces + relationships to exercise filtering.
calm-widgets/src/widgets/block-architecture/types.ts Adds the new option to public and normalized options types.
calm-widgets/src/widgets/block-architecture/core/vm-builder.ts Computes and passes “active interfaces” allowlist into container/node building.
calm-widgets/src/widgets/block-architecture/core/visibility-resolver.ts Extends VisibilityResult to expose seedNodes from strategies.
calm-widgets/src/widgets/block-architecture/core/options-parser.ts Parses ignore-connected-interfaces into normalized options.
calm-widgets/src/widgets/block-architecture/core/options-parser.spec.ts Unit tests for parsing the new option.
calm-widgets/src/widgets/block-architecture/core/factories/vm-factory-interfaces.ts Extends VMNodeFactory.createLeafNode signature to accept activeInterfaceIds.
calm-widgets/src/widgets/block-architecture/core/factories/node-factory.ts Filters rendered interfaces using the passed allowlist.
calm-widgets/src/widgets/block-architecture/core/factories/node-factory.spec.ts Unit tests for interface filtering behavior (including empty allowlist).
calm-widgets/src/widgets/block-architecture/core/builders/container-builder.ts Threads activeInterfaceIds through to the node factory.
calm-widgets/src/widgets/block-architecture/core/builders/container-builder.spec.ts Verifies activeInterfaceIds are passed to the node factory.
calm-widgets/src/widgets.e2e.spec.ts Adds an E2E test that runs the new fixture.
calm-widgets/README.md Documents the new widget option and links the new fixture example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread calm-widgets/src/widgets/block-architecture/core/vm-builder.ts
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.

Enhance block-architecture to ignore interfaces

2 participants