Skip to content

fix(1672): extracted cvss-badge and branch / artifact selection from public urls#641

Open
juliankepka wants to merge 7 commits intomainfrom
cvss-badge-fix
Open

fix(1672): extracted cvss-badge and branch / artifact selection from public urls#641
juliankepka wants to merge 7 commits intomainfrom
cvss-badge-fix

Conversation

@juliankepka
Copy link
Collaborator

@juliankepka juliankepka marked this pull request as ready for review February 23, 2026 10:20
Copilot AI review requested due to automatic review settings February 23, 2026 10:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request extracts the CVSS badge and branch/artifact selection functionality from the collapsible "Public URLs" section into a more visible, always-displayed position in the asset vulnerability management form. The refactoring improves user experience by making these important controls more accessible.

Changes:

  • Extracted CVSS badge display and artifact/branch selection into a new ArtifactInputCVSSBadge component
  • Improved input truncation and button layout in InputWithButton component with better flex properties
  • Updated package-lock.json with automatic dependency resolution changes

Reviewed changes

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

File Description
src/components/ui/input-with-button.tsx Enhanced input and button layout with better flex properties to prevent overflow issues
src/components/asset/asset-form/AssetFormVulnsManagement.tsx Refactored to extract CVSS badge and artifact selection into a separate component, moving it from collapsible section to always-visible area
package-lock.json Automatic dependency resolution updates marking/unmarking peer dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { ArtifactDTO, AssetVersionDTO } from "@/types/api/api";
import {
ClipboardDocumentIcon,
ClipboardDocumentCheckIcon,
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The imported ClipboardDocumentCheckIcon is not used in this file. Consider removing this unused import to keep the code clean.

Suggested change
ClipboardDocumentCheckIcon,

Copilot uses AI. Check for mistakes.
value={selectedVersionSlug}
onValueChange={setSelectedVersionSlug}
>
<SelectTrigger className="bg-muted/50 outline outline-1 outline-white-200 cursor-pointer">
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS class outline-white-200 is not a standard Tailwind CSS color. Tailwind CSS does not have a white-200 color in its default palette. This should likely be changed to a valid color like outline-border, outline-gray-200, or another existing Tailwind color. Using an invalid class name will result in no styling being applied.

Copilot uses AI. Check for mistakes.
onValueChange={setSelectedArtifact}
disabled={!selectedVersionSlug || !artifacts?.length}
>
<SelectTrigger className="bg-muted/50 outline outline-1 outline-white-200/30 cursor-pointer">
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS class outline-white-200/30 is not a standard Tailwind CSS color. Tailwind CSS does not have a white-200 color in its default palette. This should likely be changed to a valid color like outline-border/30, outline-gray-200/30, or another existing Tailwind color. Using an invalid class name will result in no styling being applied.

Copilot uses AI. Check for mistakes.
Comment on lines 525 to 528
<Alert variant="default">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>{purlValidation.warning}</AlertDescription>
</Alert>
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Alert component is rendered inside a flex-row container (line 472), which may cause layout issues. Alert components are typically block-level elements that expect to span the full width. This placement in a horizontal flex container alongside the Select inputs will likely result in unexpected visual behavior. Consider wrapping the Alert in a separate container or changing the parent to flex-col with the Alert rendered outside the row of Select inputs.

Suggested change
<Alert variant="default">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>{purlValidation.warning}</AlertDescription>
</Alert>
<div className="w-full">
<Alert variant="default">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>{purlValidation.warning}</AlertDescription>
</Alert>
</div>

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

juliankepka and others added 2 commits February 23, 2026 11:53
Signed-off-by: Julian Kepka <148074683+juliankepka@users.noreply.github.com>
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