fix: sbom Search by name instead of full search [Backport release/0.5.z]#1137
Merged
Merged
Conversation
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> (cherry picked from commit 2e45be3)
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBackport change that makes SBOM search operate specifically on the SBOM name field instead of using a generic text filter, updating the search parameters, filter keys, and related UI wiring accordingly. Sequence diagram for updated SBOM name-based search flowsequenceDiagram
actor User
participant SearchMenu
participant sbomTableControls
participant useAllEntities
participant useFetchSBOMs
User->>SearchMenu: type searchValue
SearchMenu->>sbomTableControls: filterState.setFilterValues(name=[searchValue])
SearchMenu->>useAllEntities: useAllEntities(filterText, disableSearch)
useAllEntities->>useFetchSBOMs: useFetchSBOMs(null, sbomParams, [], disableSearch)
note over useFetchSBOMs: sbomParams.filters[0].field = name
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider avoiding the repeated hard-coded "name" filter key and instead introduce or reuse a shared constant (similar to the previous
FILTER_TEXT_CATEGORY_KEY) so future changes to the key remain centralized. - After switching from the generic text filter to a
namefilter, it may be clearer to update the filter’stitle/placeholderTextto reflect that it specifically targets SBOM names rather than generic text.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider avoiding the repeated hard-coded "name" filter key and instead introduce or reuse a shared constant (similar to the previous `FILTER_TEXT_CATEGORY_KEY`) so future changes to the key remain centralized.
- After switching from the generic text filter to a `name` filter, it may be clearer to update the filter’s `title`/`placeholderText` to reflect that it specifically targets SBOM names rather than generic text.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/0.5.z #1137 +/- ##
=================================================
+ Coverage 51.10% 51.13% +0.02%
=================================================
Files 256 256
Lines 5522 5521 -1
Branches 1672 1671 -1
=================================================
+ Hits 2822 2823 +1
+ Misses 2432 2430 -2
Partials 268 268
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Backport of #1134 to
release/0.5.z.Summary by Sourcery
Adjust SBOM search and filtering to operate on the SBOM name field instead of a generic text filter key.
Bug Fixes:
Enhancements: