Skip to content

fix(frontend): hide internal groups from add-to-group selectors#9394

Open
polmichel wants to merge 7 commits into
stablefrom
ai-bug-pipeline-4872-internal-groups-dropdown
Open

fix(frontend): hide internal groups from add-to-group selectors#9394
polmichel wants to merge 7 commits into
stablefrom
ai-bug-pipeline-4872-internal-groups-dropdown

Conversation

@polmichel
Copy link
Copy Markdown
Contributor

@polmichel polmichel commented May 29, 2026

Why

The single-object Manage Groups picker and the bulk Add to groups table-toolbar action both list every CoreGroup regardless of group_type, so internal groups (group_type="internal") leak into selectors where they aren't meaningfully assignable.

Closes IFC-906

What changed

  • AddGroupForm (single-object Manage Groups picker) filters its options by group_type__values=["default"].
  • ToolbarAddToGroupsAction (bulk Add to groups) passes the same filter via a new groupsQueryFilter prop on BulkMutateGroups.
  • Generic filterQuery prop added to DynamicRelationshipFieldProps, threaded through RelationshipManyFieldRelationshipManyInputRelationshipComboboxList so any field can pass GraphQL-arg filters.

How to test

  1. Log into the UI as admin.
  2. Open any object's detail page, click Manage Groups — only groups with group_type="default" should appear.
image Click on "Groups" then the "+" button image
  1. Open a list view (e.g. Users), check one or more rows, then click Add to groups in the toolbar — same expectation.
image

Checklist

  • Tests added/updated
  • Changelog entry added
  • I have reviewed AI generated content

🤖 Generated with Claude Code


Summary by cubic

Hide internal groups in the Manage Groups and Add to groups selectors so only user-assignable groups (group_type="default") appear. Closes IFC-906.

  • Bug Fixes
    • AddGroupForm: pass filterQuery={{ group_type__values: ["default"] }} to the groups picker.
    • ToolbarAddToGroupsAction: pass the same filter via new groupsQueryFilter on BulkMutateGroups.
    • Thread filterQuery through DynamicRelationshipFieldPropsRelationshipManyFieldRelationshipManyInputRelationshipComboboxList.

Written for commit 1194bfb. Summary will update on new commits.

Review in cubic

polmichel and others added 5 commits May 29, 2026 20:28
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pass group_type__values=["default"] filter to BulkMutateGroups so the
dropdown only surfaces user-assignable groups, mirroring the existing
read-side filter on group_type=internal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Thread an optional filterQuery prop through DynamicRelationshipFieldProps,
RelationshipManyField, and RelationshipManyInput so it reaches the existing
filterQuery handling in RelationshipComboboxList. AddGroupForm now passes
group_type__values=["default"] when configuring the member_of_groups picker,
matching the read-side filter that already excludes internal groups from the
profiles/groups card.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the group/frontend Issue related to the frontend (React) label May 29, 2026
The filter excludes groups with group_type='internal', regardless of kind —
the prior wording listed specific kinds and implied a kind-based blocklist.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. This PR adds a filterQuery prop to hide internal groups in group selectors, with tests verifying the behavior, and the changes are isolated to frontend UI components without affecting core business logic, database, or security-critical paths.

Re-trigger cubic

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would auto-approve. The change is a well-scoped UI filtering fix that adds a filterQuery prop to hide internal groups from group selectors, includes comprehensive tests and a changelog entry, and does not affect any critical business logic or data integrity.

Re-trigger cubic

@polmichel polmichel marked this pull request as ready for review May 29, 2026 18:35
@polmichel polmichel requested a review from a team as a code owner May 29, 2026 18:35
@polmichel polmichel marked this pull request as draft May 29, 2026 18:35
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would auto-approve. This PR adds a simple filter to hide internal groups from group selectors, with test coverage and no changes to business logic, database, or critical paths, making it low-risk.

Re-trigger cubic

@polmichel polmichel marked this pull request as ready for review May 29, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant