fix(groups): display user full name in role edit user dropdown#39942
fix(groups): display user full name in role edit user dropdown#39942Abdulrehman-PIAIC80387 wants to merge 3 commits into
Conversation
Code Review Agent Run #5452b2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct: fetchUserOptions now uses full names for options, but existing selected users in RoleListEditModal still display usernames, causing inconsistency. To resolve, I've implemented the suggested shared helper in utils.ts. superset-frontend/src/features/groups/utils.ts |
|
Good catch — extracted a shared |
Code Review Agent Run #3a0490Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
6650389 to
d96dbae
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes user dropdowns in role/group edit modals to display full names instead of raw usernames (which are GUIDs for OAuth users).
Changes:
- Adds shared
getUserDisplayLabelhelper ingroups/utils.tsthat prefersfirst_name + last_name, falling back tousername. - Uses the helper in
GroupListModalfor already-selected users. - Uses the helper in
RoleListEditModalfor both initial user options and form initial values.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| superset-frontend/src/features/groups/utils.ts | Adds getUserDisplayLabel helper and uses it in fetchUserOptions. |
| superset-frontend/src/features/groups/GroupListModal.tsx | Uses helper to label existing group users. |
| superset-frontend/src/features/roles/RoleListEditModal.tsx | Uses helper for role user labels in both effect and initial form values. |
Code Review Agent Run #6030d5Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…cted users for consistency
85186d6 to
4422e55
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #39942 +/- ##
==========================================
- Coverage 64.17% 64.16% -0.01%
==========================================
Files 2590 2590
Lines 138087 138091 +4
Branches 32039 32042 +3
==========================================
- Hits 88615 88611 -4
- Misses 47947 47955 +8
Partials 1525 1525
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code Review Agent Run #e52af9Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
User dropdowns under role/group editing showed raw
user.usernameas the label. For OAuth-authenticated users (Google, etc.),usernameis the provider's GUID, which makes the role/group user pickers unusable when looking up users by name.Fix: introduced a shared
getUserDisplayLabel(user)helper that prefersfirst_name + last_nameand falls back tousernamefor backward compatibility. Applied it across all 4 spots that were rendering user options:superset-frontend/src/features/groups/utils.ts—fetchUserOptions(search results)superset-frontend/src/features/groups/GroupListModal.tsx— already-selected users when editing a groupsuperset-frontend/src/features/roles/RoleListEditModal.tsx— initial user options on the Users tabsuperset-frontend/src/features/roles/RoleListEditModal.tsx— role users in the form's initial valuesThis avoids the inconsistency where the search dropdown could show a friendly name while the existing selection chip still showed the raw GUID.
Fixes #39907
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
John Doeeverywhere. Users withoutfirst_name/last_namestill fall back to their username.ADDITIONAL INFORMATION