ROX-33539: Hide Attempted tab in Node violations by sachaudh · Pull Request #19444 · stackrox/stackrox

@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
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

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>

dvail

@sachaudh

Instead of using a useEffect to reactively reset the tab when switching
to Node view, constrain the valid values passed to useURLStringUnion so
the hook's built-in validation handles the fallback. This avoids an
extra render cycle and expresses the constraint at initialization.

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>