🐛 Fix OPAPolicies broken mode badge when status has no mode#13587
Conversation
Guard against rendering a mode badge when policy status has neither modes nor mode property, preventing broken/empty badge display. Fixes #13584 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
TypeScript error: incompatible types in ternary expression. status.modes is Array<'warn'|'enforce'|'dryrun'> but status.mode includes 'deny', causing type mismatch when creating [status.mode]. Solution: Use IIFE with explicit return type to satisfy TypeScript's type inference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
sec-check ✅ LGTM No security concerns. Simple null-safety fix that prevents |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Fixes #13584
Guards against rendering a mode badge when policy status has neither modes nor mode property.