fix(groups): display group name in manage users drawer title#5161
fix(groups): display group name in manage users drawer title#5161Copilot wants to merge 4 commits into
Conversation
Co-authored-by: RomuDeuxfois <53513584+RomuDeuxfois@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5161 +/- ##
============================================
+ Coverage 57.07% 57.11% +0.03%
- Complexity 4676 4677 +1
============================================
Files 1014 1014
Lines 30103 30103
Branches 2192 2192
============================================
+ Hits 17182 17192 +10
+ Misses 11942 11933 -9
+ Partials 979 978 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Architecture Review — Frontend & SecurityGood fix, minimal and focused — exactly what we want. However, I spotted 2 issues that need to be addressed before merging: 🔴 Issue 1 — i18n key injection (security + broken translations)title={t(`Users of ${groupName}`)}
Recommended fix: // Option A — simple concatenation (safe, translatable)
title={`${t('Users of')} ${groupName}`}
// Option B — i18n interpolation (preferred if the i18n framework supports it)
title={t('Users of {{name}}', { name: groupName })}🟡 Issue 2 — No fallback if
|
| # | Severity | Issue | Fix |
|---|---|---|---|
| 1 | 🔴 Must fix | i18n key injection — breaks translations + XSS risk | Use string concatenation or i18n interpolation |
| 2 | 🟡 Should fix | No fallback for undefined group name | Add nullish coalescing with fallback label |
Both fixes are one-liners. Happy to approve once addressed 👍
RomuDeuxfois
left a comment
There was a problem hiding this comment.
Two issues to fix before merge — see detailed comment on the PR. The i18n key injection is a must-fix (broken translations + XSS risk), and the missing fallback for undefined group name is a should-fix.
There was a problem hiding this comment.
Pull request overview
This PR improves the admin “Manage users” drawer UX by including the current group’s name in the drawer title, so admins can immediately see which group they are editing.
Changes:
- Added a
groupNameprop toGroupManageUsersand used it in the drawer title. - Passed
group.group_namefromGroupPopoverintoGroupManageUsers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
openaev-front/src/admin/components/settings/groups/GroupPopover.jsx |
Passes the group’s name to the users management drawer. |
openaev-front/src/admin/components/settings/groups/GroupManageUsers.tsx |
Adds groupName prop and updates the drawer title to include it. |
You can also share your feedback on Copilot code review. Take the survey.
…roup name in drawer title Co-authored-by: RomuDeuxfois <53513584+RomuDeuxfois@users.noreply.github.com>
Fixed in 9edd3b1:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Thank you for your contribution. This PR is but one step away from being ready for merging: all commits must be PGP-signed. To get started, please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
|
@copilot apply changes based on the comments in this thread |
The changes from that review thread were already applied in commit |
groupNameprop toGroupManageUserscomponent interfaceUsers of {groupName}using i18n interpolation (not template literal key injection)t('this group')whengroupNameis undefinedgroup.group_nameasgroupNameprop inGroupPopover.jsxOriginal prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.