Skip to content

show control relationship type with icon and tooltip in compliance posture view - #888

Open
refoo0 wants to merge 1 commit into
mainfrom
add-compliance-additional-frameworkss
Open

show control relationship type with icon and tooltip in compliance posture view#888
refoo0 wants to merge 1 commit into
mainfrom
add-compliance-additional-frameworkss

Conversation

@refoo0

@refoo0 refoo0 commented Aug 11, 2026

Copy link
Copy Markdown
Member

No description provided.

…sture view

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 16:09

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 UI support in the compliance posture detail view to display the relationship between mapped controls (e.g., equivalent/intersects/subset/superset) using an icon with a tooltip description, backed by an updated API DTO type.

Changes:

  • Extended CompliancePostureWithControlDTO.mappedControls[] to include a relationship discriminator.
  • Updated CompliancePostureDetailView to render mapped controls with relationship icons and tooltip descriptions.
  • Refactored mapped-control grouping to carry relationship metadata through to the UI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/types/api/api.ts Adds mappedControls[].relationship to the compliance posture DTO type.
src/components/compliance-posturers/CompliancePostureDetailView.tsx Renders mapped controls with relationship icons + tooltips and updates grouping logic accordingly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +177 to +180
<Badge
variant="secondary"
className="mr-2 mb-2 flex cursor-default items-center gap-1"
>
Comment on lines +135 to +151
function RelationshipIcon({
relationship,
}: {
relationship: ControlRelationship;
}) {
const className = "h-3 w-3";
switch (relationship) {
case "equivalent-to":
return <EqualIcon className={className} />;
case "intersects-with":
return <GitMergeIcon className={className} />;
case "subset-of":
return <ArrowDownToLineIcon className={className} />;
case "superset-of":
return <ArrowUpFromLineIcon className={className} />;
}
}
Comment on lines +121 to +125
type ControlRelationship =
| "equivalent-to"
| "intersects-with"
| "subset-of"
| "superset-of";
Comment on lines 1318 to +1322
(
vuln.mappedControls as {
relatedFramework: string;
relatedControlId: string;
relationship: ControlRelationship;
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.

2 participants