From 52f09f4490f42a9c7d552069869ac4cdb9e3f935 Mon Sep 17 00:00:00 2001 From: crthpl Date: Mon, 13 Apr 2026 15:12:36 -0700 Subject: [PATCH 1/3] Show user email on admin page even while editing display name 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. --- frontend/src/routes/admin/+page.svelte | 72 +++++++++++++------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/frontend/src/routes/admin/+page.svelte b/frontend/src/routes/admin/+page.svelte index 3d7b8dcb..ee6424ed 100644 --- a/frontend/src/routes/admin/+page.svelte +++ b/frontend/src/routes/admin/+page.svelte @@ -397,42 +397,44 @@ {#each filteredUsers as user (user.id)}
-
- {#if editingUserId === user.id} - { - if (e.key === 'Enter') saveEditingName(); - if (e.key === 'Escape') editingUserId = null; - }} - /> - - - {:else} - {user.display_name} - - {#if user.email} - {user.email} +
+
+ {#if editingUserId === user.id} + { + if (e.key === 'Enter') saveEditingName(); + if (e.key === 'Escape') editingUserId = null; + }} + /> + + + {:else} + {user.display_name} + {/if} +
+ {#if user.email} + {user.email} {/if}
From d6dd57025611a9574feb485cb9fc28764413ad03 Mon Sep 17 00:00:00 2001 From: crthpl Date: Mon, 13 Apr 2026 15:31:59 -0700 Subject: [PATCH 2/3] Show user email in cohort member selection dropdown Display email alongside display name in both the user search dropdown and the selected user display on the cohort page. --- .../routes/admin/cohorts/[name]/+page.svelte | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/frontend/src/routes/admin/cohorts/[name]/+page.svelte b/frontend/src/routes/admin/cohorts/[name]/+page.svelte index 7273d5fc..5c800bd6 100644 --- a/frontend/src/routes/admin/cohorts/[name]/+page.svelte +++ b/frontend/src/routes/admin/cohorts/[name]/+page.svelte @@ -53,8 +53,8 @@ return globalUsers.filter((u) => !memberUserIds.has(u.id)); }); - let selectedUserName = $derived( - selectedUserId ? (globalUsers.find((u) => u.id === selectedUserId)?.display_name ?? '') : '' + let selectedUser = $derived( + selectedUserId ? globalUsers.find((u) => u.id === selectedUserId) : null ); function closePopoverAndFocusTrigger() { @@ -239,8 +239,17 @@ role="combobox" bind:ref={userTriggerRef} > - {selectedUserId ? selectedUserName : 'Search users...'} - +
+ {#if selectedUser} + {selectedUser.display_name} + {#if selectedUser.email} + {selectedUser.email} + {/if} + {:else} + Search users... + {/if} +
+ @@ -256,10 +265,15 @@ closePopoverAndFocusTrigger(); }} > - {user.display_name} +
+ {user.display_name} + {#if user.email} + {user.email} + {/if} +
From 4e0c41b395c3c173d6717037197881a07c319cb8 Mon Sep 17 00:00:00 2001 From: crthpl Date: Mon, 13 Apr 2026 15:50:14 -0700 Subject: [PATCH 3/3] Fix user selection dropdown hover when multiple users have same name 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. --- frontend/src/routes/admin/cohorts/[name]/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/admin/cohorts/[name]/+page.svelte b/frontend/src/routes/admin/cohorts/[name]/+page.svelte index 5c800bd6..5807715d 100644 --- a/frontend/src/routes/admin/cohorts/[name]/+page.svelte +++ b/frontend/src/routes/admin/cohorts/[name]/+page.svelte @@ -259,7 +259,7 @@ {#each availableUsers as user (user.id)} { selectedUserId = user.id; closePopoverAndFocusTrigger();