Skip to content

ROX-33147: Add SearchFieldLabel as frontend counterpart to backend#19002

Merged
pedrottimark merged 1 commit intomasterfrom
ROX-33147-SearchFieldLabel
Feb 14, 2026
Merged

ROX-33147: Add SearchFieldLabel as frontend counterpart to backend#19002
pedrottimark merged 1 commit intomasterfrom
ROX-33147-SearchFieldLabel

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Feb 12, 2026

Description

Minority of leftovers after majority of search filter simplifications during previous release.

Although backend seems to use case insensitive match for search field label, define string enumeration type to prevent typos (pardon pun).

Residue

  1. Replace UPPERCASE with Title Case:
    • 'SEVERITY'
    • 'FIXABLE'
    • 'CLUSTER CVE FIXABLE'
    • 'SCANNABLE'

User-facing documentation

  • CHANGELOG.md update is not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • improved static type checking
  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint:fast-dev in ui/apps/platform folder.

@pedrottimark pedrottimark requested a review from a team as a code owner February 12, 2026 20:15
@pedrottimark pedrottimark requested review from bradr5 and dvail February 12, 2026 20:17
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.52%. Comparing base (6bea17e) to head (4c0cc83).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19002      +/-   ##
==========================================
- Coverage   49.52%   49.52%   -0.01%     
==========================================
  Files        2666     2666              
  Lines      201181   201181              
==========================================
- Hits        99633    99627       -6     
- Misses      94112    94116       +4     
- Partials     7436     7438       +2     
Flag Coverage Δ
go-unit-tests 49.52% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pedrottimark pedrottimark force-pushed the ROX-33147-SearchFieldLabel branch from 0a56997 to 4c0cc83 Compare February 13, 2026 19:56
Copy link
Contributor

@dvail dvail left a comment

Choose a reason for hiding this comment

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

Nice!

The pattern lately has been to declare all of these client side and then add additional metadata when setting up the search filters (inputType, filterChipLabel, etc.)

I know previously we would query the backend for a list of search fields. Do you think the ability to prevent the lists from getting out of sync would make it worthwhile to define inputType etc as part of an API and delegate a lot of the attribute setup to the backend? Or is the flexibility of keeping these client side worth the small chance that we miss something when adding new searches?

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 4c0cc83.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-108-g4c0cc836ae.

@pedrottimark
Copy link
Contributor Author

I know previously we would query the backend for a list of search fields.

The search field labels from request for Risk and global Search do not look like what I would expect as usable without an explicit search filter configuration as elsewhere.

TypeScript helps us to add in string enumeration when needed.

Human risk is add without double checking backend source of truth. I will add to office hours.

@pedrottimark pedrottimark merged commit 7d45b72 into master Feb 14, 2026
95 checks passed
@pedrottimark pedrottimark deleted the ROX-33147-SearchFieldLabel branch February 14, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants