Skip to content

feat(frontend): link Artifact Validator checks to their CoreArtifactDefinition#9471

Open
iddocohen wants to merge 2 commits into
stablefrom
ic-feat-link-coreartifact-via-check
Open

feat(frontend): link Artifact Validator checks to their CoreArtifactDefinition#9471
iddocohen wants to merge 2 commits into
stablefrom
ic-feat-link-coreartifact-via-check

Conversation

@iddocohen

@iddocohen iddocohen commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • In the Proposed Change "Checks" tab, each CoreArtifactValidator accordion now shows a small "open in new" icon link that navigates to the originating CoreArtifactDefinition. The same link is also added as a "Definition" row in the validator details popover.
  • This addresses user feedback that there was no way to navigate from an Artifact Validator check (e.g. "Artifact Validator: MachineConfig_Artifact_Definition") back to the definition that produced it without copy-pasting the name and finding it manually under objects/CoreArtifactDefinition.

What changed

  • frontend/app/src/entities/diff/api/get-validators-from-api.ts — extended the GET_CORE_VALIDATORS query with an inline fragment on CoreArtifactValidator to fetch definition { node { id, display_label, __typename } }.
  • frontend/app/src/entities/diff/ui/checks/validator.tsx — when the validator is a CoreArtifactValidator, render a Link to CoreArtifactDefinition/<id> in the accordion header (with stopPropagation so it does not toggle the accordion) and add a "Definition" row to the info popover.
  • frontend/app/src/shared/api/graphql/generated/graphql-cache.d.ts — regenerated via gql.tada generate turbo to reflect the new query shape.

No backend changes. The CoreArtifactValidator.definition relationship is already defined in the schema (backend/infrahub/core/schema/definitions/core/propose_change_validator.py) and populated at validator-creation time (backend/infrahub/proposed_change/tasks.py).

Test plan

  • Open a Proposed Change that ran at least one Artifact Validator.
  • In the "Checks" tab, confirm the corresponding accordion shows the "open in new" icon next to the validator name.
  • Click the icon — verify it navigates to the CoreArtifactDefinition detail page and does NOT expand/collapse the accordion.
  • Open the validator info popover (ⓘ) — confirm a "Definition" row is present and links to the same definition.
  • Confirm non-Artifact validators (Data, Repository, Generator, Schema, User) still render normally with no link or extra popover row.

Summary by cubic

Add direct links from CoreArtifactValidator entries in the Proposed Change “Checks” tab to their CoreArtifactDefinition. Users can open the definition from the header icon or a “Definition” row in the details popover.

  • New Features

    • Extended GET_CORE_VALIDATORS to fetch definition.node { id, display_label } for CoreArtifactValidator.
    • Render a non-toggling “open in new” link in the accordion header and a “Definition” link in the popover; other validator types are unchanged.
  • Refactors

    • Adjusted import order and JSX formatting in validator.tsx to satisfy formatter rules; no behavior changes.

Written for commit 719218f. Summary will update on new commits.

Review in cubic

…efinition

In the Proposed Change "Checks" tab, each CoreArtifactValidator now
exposes a link to the CoreArtifactDefinition that produced it, both
as an icon in the accordion header and as a row in the details popover.

The relationship already exists in the backend schema and is populated
when the validator is created — only the frontend query and rendering
needed to surface it.
@iddocohen iddocohen requested a review from a team as a code owner June 5, 2026 05:31
@github-actions github-actions Bot added the group/frontend Issue related to the frontend (React) label Jun 5, 2026
….tsx

Move getObjectDetailsUrl into its own @/entities import group below the
@/shared imports, and collapse the Tooltip props onto a single line to
match Biome's formatter.

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would auto-approve. This PR adds a frontend-only navigation link from artifact validator checks to their originating artifact definitions, extending an existing GraphQL query with a pre-existing relationship and conditionally rendering a link and popover row; these changes are isolated to the UI, have no backend...

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. This change adds a navigation link from artifact validators to their definition, using a small GraphQL fragment and existing UI components, with no backend or core logic changes.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant