Skip to content

Fix user selection dropdown hover when multiple users have same name#388

Merged
crthpl merged 3 commits intomainfrom
worktree-vectorized-scribbling-stallman
Apr 13, 2026
Merged

Fix user selection dropdown hover when multiple users have same name#388
crthpl merged 3 commits intomainfrom
worktree-vectorized-scribbling-stallman

Conversation

@crthpl
Copy link
Copy Markdown
Contributor

@crthpl crthpl commented Apr 13, 2026

Summary

Fix an issue where hovering over users in the cohort member selection dropdown would highlight multiple items if they shared the same display name.

Root Cause

The Command.Item was using value={user.display_name} which caused conflicts when multiple users had identical names—the dropdown library would match and highlight all items with the same value.

Solution

Use the unique user ID as the value instead, ensuring each dropdown item is independently identifiable.

Test plan

  • Go to /admin/cohorts/[name]
  • Create or find two users with the same display name
  • Click "Add Existing User" dropdown
  • Hover over each user separately—verify only the hovered one highlights

crthpl added 3 commits April 13, 2026 15:12
Previously, the email was hidden when the user's display name was being edited.
Restructured the layout to always display email below the display name/edit controls.
Display email alongside display name in both the user search dropdown
and the selected user display on the cohort page.
Use user ID as the Command.Item value instead of display_name to ensure
each item is uniquely identifiable, preventing both items from being
highlighted when they share the same name.
@crthpl crthpl requested a review from a team as a code owner April 13, 2026 22:52
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
platform Ready Ready Preview, Comment Apr 13, 2026 10:52pm

Request Review

@crthpl crthpl merged commit 85f2c5f into main Apr 13, 2026
5 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.

1 participant