feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widget#2701
Open
markscott-ms wants to merge 2 commits into
Open
feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widget#2701markscott-ms wants to merge 2 commits into
markscott-ms wants to merge 2 commits into
Conversation
…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
1b8d5a8 to
4815c7f
Compare
Contributor
There was a problem hiding this comment.
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-interfacesoption (types + parsing) and threads anactiveInterfaceIdsallowlist 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.
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.
Description
Closes #1600
Adds a new
ignore-connected-interfacesboolean option to theblock-architecturewidget.When using
focus-interfaceswithedges=connectedandrender-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-apiwithedges=connected render-interfaces=true:ignore-connected-interfaces=truepayment-api(seed)fraud-check-api(active destination)email-iface(active destination)audit-log-iface(seed, not in any active rel)risk-model-iface,score-db-iface(connected, inactive)sms-iface(connected, inactive)Screenshots
Without
ignore-connected-interfaces(existing behaviour){{block-architecture focus-interfaces="payment-api" render-interfaces=true edges="connected"}}With
ignore-connected-interfaces=true(new behaviour){{block-architecture focus-interfaces="payment-api" render-interfaces=true edges="connected" ignore-connected-interfaces=true}}Type of Change
Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)Commit Message Format ✅
feat(calm-widgets): add ignore-connected-interfaces option to block-architecture widgetTesting
New tests added:
node-factory.spec.ts: filters interfaces byactiveInterfaceIds; produces no interfaces when set is emptycontainer-builder.spec.ts: passesactiveInterfaceIdsthrough to the node factoryoptions-parser.spec.ts: parsesignore-connected-interfacesoptionignore-connected-interfaces/: side-by-side before/after using a 3-node payment architectureChecklist