feat(frontend): link Artifact Validator checks to their CoreArtifactDefinition#9471
feat(frontend): link Artifact Validator checks to their CoreArtifactDefinition#9471iddocohen wants to merge 2 commits into
Conversation
…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.
….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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Summary
CoreArtifactValidatoraccordion now shows a small "open in new" icon link that navigates to the originatingCoreArtifactDefinition. The same link is also added as a "Definition" row in the validator details popover.objects/CoreArtifactDefinition.What changed
frontend/app/src/entities/diff/api/get-validators-from-api.ts— extended theGET_CORE_VALIDATORSquery with an inline fragment onCoreArtifactValidatorto fetchdefinition { node { id, display_label, __typename } }.frontend/app/src/entities/diff/ui/checks/validator.tsx— when the validator is aCoreArtifactValidator, render aLinktoCoreArtifactDefinition/<id>in the accordion header (withstopPropagationso 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 viagql.tada generate turboto reflect the new query shape.No backend changes. The
CoreArtifactValidator.definitionrelationship 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
CoreArtifactDefinitiondetail page and does NOT expand/collapse the accordion.Summary by cubic
Add direct links from
CoreArtifactValidatorentries in the Proposed Change “Checks” tab to theirCoreArtifactDefinition. Users can open the definition from the header icon or a “Definition” row in the details popover.New Features
GET_CORE_VALIDATORSto fetchdefinition.node { id, display_label }forCoreArtifactValidator.Refactors
validator.tsxto satisfy formatter rules; no behavior changes.Written for commit 719218f. Summary will update on new commits.