Open Manage automations modal for policies without automations + inherited policies - #46271
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## policy-automations-continuous-retries #46271 +/- ##
========================================================================
Coverage ? 66.78%
========================================================================
Files ? 2762
Lines ? 219981
Branches ? 11018
========================================================================
Hits ? 146918
Misses ? 59794
Partials ? 13269
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
|
||
| // NOTE: backend uses webhook_settings to store automated policy ids for both | ||
| // webhooks and integrations. | ||
| const getWebhookOrTicketPolicyIds = ( |
There was a problem hiding this comment.
There was a problem hiding this comment.
Technically yes because we can derive both the state and the IDs in one go. (I simplified this in one of the follow-up PRs so that we return an object with both values.)
See getWebhookOrTicketInfo here: https://github.com/fleetdm/fleet/pull/46326/changes#diff-b779b6619418992f803e16110ef8fcb475a40a9f153c71e7dccefa68b0a465caR16
|
@juan-fdz-hawa In the latest commit, 289363e, I added a small fix for a specific edge case: if a global policy had "Send webhook" configured, it would not be rendered in the Automations cell on the fleet/team view. Now it's properly displayed. Screen.Recording.2026-05-29.at.11.34.08.AM.mov |
…rited policies
- Make the empty ("---") automations cell open the modal (with pencil
affordance) for users who can edit; read-only users keep the plain cell.
- Treat an inherited policy (team_id === null) as global even when viewed
from within a fleet's list, routing the modal to the global config.
The empty, single, and multiple automation cells all wrapped their content in the same role="button" + pencil affordance. Pull that into one local component; call sites now pass only the aria-label, optional class, and the content shown left of the pencil.
…s for inherited policies
289363e to
09c4700
Compare
7d925d8
into
policy-automations-continuous-retries
Related issue: #45148 and #45145
Summary
Stacked on top of the Manage automations modal PR (#46254). Two follow-up tweaks:
team_id === nulleven when viewed from within a specific fleet. It's now treated as global (only the webhook/ticket row, no continuous-retry option) and the modal is routed to the global config for its automations, instead of inferring "global" from the selected-team view.Testing
Screen.Recording.2026-05-27.at.3.00.11.PM.mov
Screen.Recording.2026-05-27.at.3.00.42.PM.mov