Files
fleet/frontend/interfaces
Nico b4c32d279e Policies: Include/Exclude label targeting in Save policy modal (#33441) (#47213)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #46583 

Figma:
https://www.figma.com/design/0F1sw63SuYaKVWlcL7mnc6/-33441-Policies--Custom-targets-with-%22Include-any%22-and-%22Exclude-any%22?node-id=5303-5687&t=Fszpf83KhcZ7ViWh-0

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests

- [x] QA'd all new/changed functionality manually

Note: policy creation will fail if more than one inclusion/exclusion
option is provided. This will be addressed as part of
https://github.com/fleetdm/fleet/issues/46582 (we'll relax that check to
make sure we can accept a combination).



https://github.com/user-attachments/assets/9cfbcbca-54ce-4978-8248-7d550f18785b



https://github.com/user-attachments/assets/16138fb1-da7c-4838-8819-f370bf7072c1

Empty state:

<img width="850" height="628" alt="Screenshot 2026-06-10 at 11 30 45 AM"
src="https://github.com/user-attachments/assets/141c4d26-e464-4ae1-b6ed-94d24a640e1c"
/>



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Add optional "exclude all" label targeting for policies
(labels_exclude_all) and tab-based Include/Exclude targeting UI.

* **Improvements**
* In-modal navigation to add new labels; Custom targeting requires at
least one selected label to enable Save.
* Payloads now include include/exclude label fields when using Custom
targeting.

* **Tests**
  * Updated modal tests to cover exclude-tab label selection.

* **Style**
  * Improved empty-state border styling in label selector.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-11 10:00:30 -03:00
..
2026-06-03 14:58:17 -04:00
2026-06-03 14:58:17 -04:00