fix: quickfixes only shown when needed and bulk updates are possible … - #868
Open
juliankepka wants to merge 1 commit into
Open
fix: quickfixes only shown when needed and bulk updates are possible …#868juliankepka wants to merge 1 commit into
juliankepka wants to merge 1 commit into
Conversation
…in dep risk table
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the dependency risk table UX by (1) only rendering “Quick Fix” UI when a fix is actually available and (2) adding selection controls to enable bulk actions on vulnerabilities/paths.
Changes:
- Add reusable
SelectionCheckboxand introduce “select all vulnerabilities of this package” behavior (excluding fixed vulns). - Switch Quickfix rendering guard to
isQuickfixAvailable(...)and simplify the Quickfix content now that it only renders when actionable.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/components/risk-handling/RiskHandlingRow.tsx | Adds selection checkboxes (including package-level select-all) and reuses the new checkbox component across rows. |
| src/components/Quickfix.tsx | Ensures Quickfix is only shown when a real upgrade is available and streamlines the displayed messaging/command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+65
to
+89
| <div | ||
| className={classNames( | ||
| "relative flex size-4 shrink-0 items-center justify-center", | ||
| className, | ||
| )} | ||
| > | ||
| <Checkbox | ||
| checked={checked} | ||
| onCheckedChange={onToggle} | ||
| disabled={disabled} | ||
| aria-label={ariaLabel} | ||
| /> | ||
| <span | ||
| aria-hidden | ||
| className={classNames( | ||
| "absolute -inset-2", | ||
| disabled ? "cursor-not-allowed" : "cursor-pointer", | ||
| )} | ||
| onClick={(e) => { | ||
| e.stopPropagation(); | ||
| if (disabled) return; | ||
| onToggle(); | ||
| }} | ||
| /> | ||
| </div> |
Comment on lines
+328
to
+333
| <TooltipContent> | ||
| Select {packageSelectableIds.length === 1 ? "" : "all"}{" "} | ||
| {packageSelectableIds.length} vulnerabilit | ||
| {packageSelectableIds.length === 1 ? "y" : "ies"} of this | ||
| package | ||
| </TooltipContent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…in dep risk table
