Skip to content

fix(graph): report unresolved application connections - #426

Open
nicolejms wants to merge 1 commit into
mainfrom
nicolejms-unresolved-graph-connections
Open

nicolejms wants to merge 1 commit into
mainfrom
nicolejms-unresolved-graph-connections

Conversation

@nicolejms

Copy link
Copy Markdown
Contributor

Summary

Show a warning when a connection target is not in the application graph. The warning lists the owning resource ID and target ID in an expandable section. Omit edges with missing endpoints before layout and rendering. Keep valid connections visible.

The independent rubber duck review found no material issues.

Reason for change

Fixes #353

React Flow discards edges whose endpoints are missing. Without a warning, the graph can appear complete even when dependencies are absent. Check connection IDs against the full resource set, not just the resource ID parser. A connection with an exact matching node remains valid even when its ID cannot be parsed.

How to test

Use the Node.js and Yarn versions described in the build guide, then run yarn install.

  1. Run yarn workspace @radapp.io/rad-components test --watch=false --runInBand --silent. Expect all 170 tests to pass, including the missing-endpoint invariants and stored graph records.
  2. Run yarn test:e2e:components --reporter=line. Expect all 10 browser tests to pass. The new cases check that the warning is visible, the resource node remains visible, and the connection IDs can be opened with the keyboard.
  3. For a manual check, run yarn workspace @radapp.io/rad-components storybook --ci --no-open. Open the AppGraph / Missing Target and AppGraph / Unparseable Connection stories. Expect an incomplete-graph warning. Expand Show unresolved connections to see both IDs. The graph and its controls must remain visible. Open AppGraph / Multi Tier to confirm that valid edges remain visible and no warning appears.
  4. Run yarn tsc and yarn lint:all. Expect no errors.

Local validation used the pinned Yarn package because Yarn is not on this host's PATH:

Exact command Result
npx --yes --package '@yarnpkg/cli-dist@4.18.1' yarn tsc Passed
npx --yes --package '@yarnpkg/cli-dist@4.18.1' yarn lint:all Passed
npx --yes --package '@yarnpkg/cli-dist@4.18.1' yarn workspace '@radapp.io/rad-components' test --watch=false --runInBand --silent Passed: 170 tests in 5 suites
npx --yes --package '@yarnpkg/cli-dist@4.18.1' yarn test:e2e:components --reporter=line Passed: 10 tests on rerun. The preceding run passed 9 tests and failed the existing GU-11 remount timer assertion. No code change was made between runs. Both new warning cases passed in both runs.
git diff --check Passed before commit

Prettier passed for all changed TypeScript files. ShellCheck 0.11.0 is installed; no shell scripts changed, so no files apply. The full repository yarn test:all suite was not run.

File change summary

File Summary of change
packages/rad-components/src/components/appgraph/AppGraph.tsx Check endpoint IDs, collect unresolved connections, and show an accessible warning without hiding the graph.
packages/rad-components/src/components/appgraph/__test__/AppGraph.test.tsx Check warning details, valid connections, both directions, and exact matching IDs that cannot be parsed.
packages/rad-components/src/__test__/graphInvariants.test.ts Replace defect pins with missing-endpoint checks and apply the endpoint invariant to all fixtures.
packages/rad-components/src/graphRecord.ts Remove the repaired #353 entries from the known-defect list.
packages/rad-components/src/__test__/graphRecords.test.ts Update the known-defect checks and limit declared record changes to the two #353 corrections.
packages/rad-components/src/__fixtures__/graph-records/missing-target.json Remove the edge with a missing endpoint from the expected record.
packages/rad-components/src/__fixtures__/graph-records/unparseable-connection.json Remove the edge with a missing endpoint from the expected record.
packages/rad-components/src/__fixtures__/graph-expected-changes.md Declare the two exact edge removals and their reason.
packages/rad-components/src/components/appgraph/__docs__/AppGraph.stories.tsx Add missing-target and unparseable-connection stories.
packages/rad-components/e2e-tests/appGraph.test.ts Check both warning cases in the browser, including keyboard access to the IDs.
packages/rad-components/src/components/appgraph/__docs__/AppGraph.mdx Explain how unresolved connections are reported.
docs/design/2026-09-dashboard-plugin-test-plan.md Update the #353 status, regression expectations, and expected-change manifest description.

Omit edges whose endpoint is not in the application graph and show the affected resource and target IDs in an accessible warning. Preserve valid connections and update graph regression records.

Signed-off-by: nicolejms <nicolej@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: nicolejms <nicolej@microsoft.com>
@nicolejms
nicolejms requested review from a team as code owners November 5, 2026 00:45
@nicolejms nicolejms added the pr:standard Standard pull request label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added the pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable label Nov 5, 2026
@nicolejms
nicolejms requested a balanced review from Copilot November 5, 2026 16:31

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.

🟢 Approval recommended

No active review issues are recorded for the change that makes unresolved application-graph dependencies visible.

No open issues 🎉

What changed in this PR

Addresses #353 by making unresolved dependencies visible in the Radius Dashboard application graph. Connections with missing endpoints are omitted before layout and rendering, while valid connections—including exact ID matches that cannot be parsed—remain intact.

Changes:

  • Adds an expandable warning listing unresolved connections and their owning resource IDs.
  • Adds unit and browser regression coverage, including keyboard access to warning details.
  • Updates graph records, retires the repaired defect entries, and documents the behavior.
File Description
packages/​rad-components/​src/​graphRecord.ts Removes the repaired #353 known-defect entries.
packages/​rad-components/​src/​components/​appgraph/​AppGraph.tsx Validates endpoints and displays unresolved connections without hiding the graph.
packages/​rad-components/​src/​components/​appgraph/​__test__/​AppGraph.test.tsx Tests warnings, valid edges, both directions, and exact unparseable ID matches.
packages/​rad-components/​src/​components/​appgraph/​__docs__/​AppGraph.stories.tsx Adds stories for missing and unparseable targets.
packages/​rad-components/​src/​components/​appgraph/​__docs__/​AppGraph.mdx Documents the warning and expandable connection details.
packages/​rad-components/​src/​__test__/​graphRecords.test.ts Updates defect checks and restricts declared record changes to #353.
packages/​rad-components/​src/​__test__/​graphInvariants.test.ts Replaces dangling-edge defect pins with endpoint regression checks.
packages/​rad-components/​src/​__fixtures__/​graph-records/​unparseable-connection.json Removes the expected dangling edge for an unparseable target.
packages/​rad-components/​src/​__fixtures__/​graph-records/​missing-target.json Removes the expected dangling edge for an absent target.
packages/​rad-components/​src/​__fixtures__/​graph-expected-changes.md Declares the two intentional edge removals.
packages/​rad-components/​e2e-tests/​appGraph.test.ts Checks warning visibility, graph visibility, and keyboard disclosure access.
docs/​design/​2026-09-dashboard-plugin-test-plan.md Marks #353 as fixed and updates regression expectations.

Review effort: Balanced

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

pr:standard Standard pull request pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application graph silently drops connections whose target cannot be resolved

3 participants