Skip to content

ROX-33539: Hide Attempted tab in Node violations#19444

Open
sachaudh wants to merge 4 commits intomasterfrom
ROX-33539-hide-attempted-tab-node-view
Open

ROX-33539: Hide Attempted tab in Node violations#19444
sachaudh wants to merge 4 commits intomasterfrom
ROX-33539-hide-attempted-tab-node-view

Conversation

@sachaudh
Copy link
Contributor

@sachaudh sachaudh commented Mar 16, 2026

Description

Jira: ROX-33539

Node policies have no admission controller evaluation, so attempted alerts are never generated for nodes. The "Attempted" tab on the Violations page is irrelevant in Node view.

  • Hide the Attempted tab when Node workflow view is selected
  • Add useEffect to reset tab to Active if user is on Attempted tab when switching to Node view (also handles direct URL navigation)
  • Use the exported nodeWorkflowView constant for type-safe comparison

User-facing documentation

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

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  • ESLint passes on the modified file
  • Existing Violations unit tests pass
  • Verified conditional rendering logic and useEffect edge case handling through code review

Screenshots

Screen.Recording.2026-03-16.at.11.28.17.AM.mov

@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 16, 2026

Images are ready for the commit at 79c60ca.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-342-g79c60ca9e6.

@sachaudh sachaudh changed the title ROX-33539: hide Attempted tab in Node violations ROX-33539: Hide Attempted tab in Node violations Mar 16, 2026
@sachaudh sachaudh marked this pull request as ready for review March 16, 2026 18:47
@sachaudh sachaudh requested a review from a team as a code owner March 16, 2026 18:47
Node policies have no admission controller evaluation, so attempted
alerts are never generated for nodes. The Attempted tab is now hidden
when the Node workflow view is selected, and automatically resets to
the Active tab if navigated to via URL.

Fixes: ROX-33539

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
Replace imported nodeWorkflowView constant with inline string literal
to simplify the Node violations Attempted tab filtering logic.

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@sachaudh sachaudh force-pushed the ROX-33539-hide-attempted-tab-node-view branch from 5fe5037 to d679b83 Compare March 16, 2026 19:21
Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.55%. Comparing base (7593465) to head (79c60ca).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19444      +/-   ##
==========================================
- Coverage   49.56%   49.55%   -0.01%     
==========================================
  Files        2711     2711              
  Lines      204849   204849              
==========================================
- Hits       101528   101517      -11     
- Misses      95741    95748       +7     
- Partials     7580     7584       +4     
Flag Coverage Δ
go-unit-tests 49.55% <ø> (-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants