feat(alertRules): merge configured teams for echo without list permis… - #2351
Conversation
…sion Add mergeTeams util and FormNGDataProvider `configuredTeams` prop so the team selector can echo rule-detail-embedded teams when the user lacks the team-list API permission. Team-list data takes priority; dedupe by id.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified.
Pull request overview
Adds fallback team options so alert-rule forms display configured teams without team-list permission.
Changes:
- Added deduplicating
mergeTeamsutility. - Passed configured teams through the form provider.
- Added merge behavior tests.
File summaries
| File | Description |
|---|---|
src/pages/alertRules/FormNG/utils/mergeTeams.ts |
Merges team options with ID deduplication. |
src/pages/alertRules/FormNG/utils/mergeTeams.test.ts |
Tests fallback and precedence behavior. |
src/pages/alertRules/FormNG/index.tsx |
Supplies configured teams. |
src/pages/alertRules/FormNG/context.tsx |
Combines API and configured teams. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…sion
Add mergeTeams util and FormNGDataProvider
configuredTeamsprop so the team selector can echo rule-detail-embedded teams when the user lacks the team-list API permission. Team-list data takes priority; dedupe by id.