Skip to content

Fix duplicate Danger Zone header on user edit page - #10563

Merged
mpmadhavig merged 2 commits into
wso2:masterfrom
mpmadhavig:dev-fix
Jul 22, 2026
Merged

Fix duplicate Danger Zone header on user edit page#10563
mpmadhavig merged 2 commits into
wso2:masterfrom
mpmadhavig:dev-fix

Conversation

@mpmadhavig

@mpmadhavig mpmadhavig commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fix a UI regression on the user edit page where the "Danger Zone" section header renders twice.

What changed

  • features/admin.users.v1/components/user-profile.tsxresolveDangerActions(): collapsed the outer DangerZoneGroup (introduced when the user impersonation action was moved under the danger zone) back to a React.Fragment, so only the inner DangerZoneGroup prints the "Danger Zone" h5. Per-action <Show> gates inside each DangerZone continue to enforce granular users.scopes.update / users.scopes.delete checks — no permission behavior is lost.

Related Issues

Test plan

  • With granular console permissions enabled and a user that has both users.scopes.update and users.scopes.delete: the user edit page's Danger Zone renders exactly one "Danger Zone" header.
  • Reset password, Lock user, and Delete user actions still render and behave correctly.
  • For a user managed by a parent org, only the impersonation action renders — no orphan "Danger Zone" header.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Danger Zone Header Fix

Layer / File(s) Summary
Remove duplicate danger-zone header
features/admin.users.v1/components/user-profile.tsx, .changeset/fix-duplicate-danger-zone-header.md
The outer DangerZoneGroup and its header are replaced with a fragment while existing actions remain, and patch releases are recorded for the affected packages.

Suggested reviewers: donomalvindula

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 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.
Changeset Required ✅ Passed PR includes a new .changeset markdown file, and it patches @wso2is/console and @wso2is/admin.users.v1 as required.
Title check ✅ Passed The title clearly matches the main change: fixing the duplicate Danger Zone header on the user edit page.
Description check ✅ Passed It covers Purpose, What changed, Related Issues, and Test plan, but leaves the checklist, security checks, and developer checklist unfilled.
✨ 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.

@mpmadhavig

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-07-22 at 16 43 38

@mpmadhavig
mpmadhavig merged commit f9ec70f into wso2:master Jul 22, 2026
7 checks passed
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.91%. Comparing base (e1a3de7) to head (44ee922).
⚠️ Report is 118 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10563   +/-   ##
=======================================
  Coverage   72.91%   72.91%           
=======================================
  Files         470      470           
  Lines       71383    71383           
  Branches      240      240           
=======================================
  Hits        52047    52047           
  Misses      19225    19225           
  Partials      111      111           

see 4 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.

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