Skip to content

Improve the group assigning section - #10569

Merged
DilshanSenarath merged 2 commits into
wso2:masterfrom
DilshanSenarath:improve-group-section
Jul 23, 2026
Merged

Improve the group assigning section#10569
DilshanSenarath merged 2 commits into
wso2:masterfrom
DilshanSenarath:improve-group-section

Conversation

@DilshanSenarath

Copy link
Copy Markdown
Contributor

Issues fixed

1. Stale search filter persisted across modal reopens.
searchQuery was not reset when the group modal was opened or closed, so a displayName co <value> filter set in one session leaked into the next open — the user saw a filtered list without any query in the search box. handleOpenAddNewGroupModal and handleCloseAddNewGroupModal now reset searchQuery to null.

2. Debounced search callback could fire after the modal unmounted.
handleUnselectedListSearch is a debounce(..., 1000) — if the user typed and then closed the modal within the debounce window, the pending call still ran and updated searchQuery on an unmounted component. A cleanup useEffect now cancels the debounced function on unmount.

Related Issue

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@DilshanSenarath, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 36211161-ce22-4c6c-b663-8c53506932f9

📥 Commits

Reviewing files that changed from the base of the PR and between 48423fa and 887ca67.

📒 Files selected for processing (1)
  • .changeset/spicy-coats-hunt.md
📝 Walkthrough

Walkthrough

Changes

Group editor behavior

Layer / File(s) Summary
Modal and search state cleanup
features/admin.users.v1/components/user-groups-edit.tsx
The add-group modal close handler clears the search query and select-all state, while unmount cleanup cancels the debounced search handler. The copyright year is updated through 2026.

Suggested reviewers: mpmadhavig


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Changeset Required ❌ Error The PR changes only features/admin.users.v1/components/user-groups-edit.tsx; no new .changeset/*.md file is in the changed-file list. Add a new .changeset/*.md file to the PR with the affected package(s) and appropriate version bump; .changeset/README.md does not count.
Description check ⚠️ Warning The description covers the fixes and issue link, but it omits required template sections like Purpose, Related PRs, and checklist items. Fill in the template sections: Purpose, Related Issues/PRs, checklist, security checks, and developer checklist, even if some items are N/A.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title refers to the affected group assigning section and is sufficiently related to the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ create changeset

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from mpmadhavig July 23, 2026 12:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@features/admin.users.v1/components/user-groups-edit.tsx`:
- Around line 229-232: Update handleCloseAddNewGroupModal to cancel the pending
debounced handleUnselectedListSearch invocation before resetting searchQuery and
closing the modal. If the modal-opening flow also resets state, apply the same
cancellation there to prevent stale searches from running after reopening.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: e5697da5-29b5-4117-94f2-7cdf3447e389

📥 Commits

Reviewing files that changed from the base of the PR and between e3f4506 and 48423fa.

📒 Files selected for processing (1)
  • features/admin.users.v1/components/user-groups-edit.tsx

Comment thread features/admin.users.v1/components/user-groups-edit.tsx
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.91%. Comparing base (a4dc83f) to head (887ca67).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10569   +/-   ##
=======================================
  Coverage   72.91%   72.91%           
=======================================
  Files         470      470           
  Lines       71389    71389           
  Branches      448      448           
=======================================
  Hits        52053    52053           
+ Misses      19043    19040    -3     
- Partials      293      296    +3     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DilshanSenarath DilshanSenarath changed the title improve the group assigning section Improve the group assigning section Jul 23, 2026
@DilshanSenarath
DilshanSenarath merged commit acb3dc8 into wso2:master Jul 23, 2026
15 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.

2 participants