Skip to content

fix(policies): send the empty list when the picker is cleared - #21

Merged
pyramation merged 1 commit into
mainfrom
fix/policy-picker-clear-sends-empty-list
Aug 10, 2026
Merged

fix(policies): send the empty list when the picker is cleared#21
pyramation merged 1 commit into
mainfrom
fix/policy-picker-clear-sends-empty-list

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Clearing the capability/level picker used to drop the key from the payload (onChange(next.length > 0 ? next : undefined)), so the stored mask survived the save — a requirement could never be removed from the UI. The picker now passes the selection through as-is, so a cleared picker sends [].

Pairs with constructive-io/constructive-db#2994, where *_get_mask_by_names folds the empty list to the zero mask instead of returning NULL (which previously made [] throw INTERNAL_ERROR). Under the subset test a zero mask means "any member of the scope", which is exactly what an empty selection says.

Link to Devin session: https://app.devin.ai/sessions/8f89acc9280e4cef880921d966e0e8fc
Requested by: @pyramation

Clearing the capability or level picker used to drop the key entirely, so
the stored mask survived the save and the requirement could never be
removed from the UI. Now that the parser folds an empty list to the zero
mask, the picker passes the selection through as-is.
@pyramation pyramation self-assigned this Aug 10, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit 4411dcb into main Aug 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant