litellm/ui/litellm-dashboard/src/components/team
ryan-crabbe-berri b39cac9382
feat(ui): add Expires to key Overview header; merge User into one field (#27696)
* fix(ui): resolve created_by to human-readable name for team keys

The team's Virtual Keys table rendered a raw UUID under Created By
for keys created on behalf of a real user, and the key details page
header showed "-" because it was reading the wrong field
(user_email/user_id instead of created_by_user).

- TeamVirtualKeysTable Created By column now prefers
  created_by_user.user_alias > user_email > UUID, with a Popover
  on hover that surfaces all three fields with copy icons
  (matches the existing AllKeys table pattern in VirtualKeysTable.tsx)
- key_info_view passes the resolved created_by_user value to the
  details-page header so it renders the readable name

Resolves LIT-2517

* fix(ui): add created_by to KeyResponse type

The backend returns created_by on every key row, but the frontend
type omitted it. The Created By cell already reads the field via
info.row.original, which trips the production typecheck.

* feat(ui): add Expires to key Overview header; merge User into one field

The key details page header omitted Expires (only Settings tab had it)
and showed User Email + User ID as two separate rows. This PR:

- adds Expires below Created At, reusing the Settings tab's
  formatTimestamp(...) ?? "Never" formatting so both views agree
- merges User Email / User ID into a single "User" field that
  displays alias / email / user_id (in that fallback order) with a
  Popover on hover exposing all three with copy icons — mirrors the
  Created By pattern in TeamVirtualKeysTable.tsx and VirtualKeysTable.tsx

Refs LIT-2517

* chore(ui): User field icon + alias-primary test

Address review feedback on #27696:
- Swap MailOutlined → UserOutlined on the merged User cell; the
  envelope icon implied "this is an email" but the cell can render
  alias / email / user_id depending on what's available.
- Add a test asserting userAlias displays as primary and overrides
  userEmail — closes the gap where a fallback-order regression
  would have silently passed.

* fix(ui): truncate long User values and reshuffle header layout

- Swap column groupings so Created By stays paired with Created At
  (matches the pre-merge layout); User and Expires now share col 1.
- Ellipsis-truncate the visible User cell at maxWidth 200 so a raw
  UUID fallback doesn't sprawl. Full identity still revealed via the
  hover Popover.
- Cap each Popover row at maxWidth 220 so a UUID truncates inside the
  panel too; antd's built-in ellipsis tooltip surfaces the full value.
2026-05-12 10:54:55 -07:00
..
available_teams.test.tsx adding test 2026-02-07 16:46:11 -08:00
available_teams.tsx modernize /team/available endpoint, migrate link to UI 2026-02-07 16:44:29 -08:00
EditLoggingSettings.tsx added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
EditMembership.test.tsx Fix select in edit membership 2025-12-04 21:59:43 -08:00
EditMembership.tsx feat(teams): per-member model scope + team default_team_member_models (#24950) 2026-04-06 13:48:43 -07:00
LoggingSettings.test.tsx added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
LoggingSettings.tsx removing unused imports 2025-10-10 10:24:57 -07:00
member_permissions.test.tsx [Feature] Allow team members to view entire team usage 2026-02-18 21:38:40 -08:00
member_permissions.tsx fix(ui): use icon prop on Save Changes button to fix duplicate loading spinner 2026-03-07 12:15:38 -08:00
MyUserTab.tsx fix(team): address review feedback on My User tab 2026-04-25 14:28:27 -07:00
permission_definitions.test.tsx added option to allow team user to see logs of team 2026-04-09 17:43:20 -07:00
permission_definitions.tsx added option to allow team user to see logs of team 2026-04-09 17:43:20 -07:00
tabVisibilityUtils.test.ts [Feat] Add "My User" tab to team info page 2026-04-25 13:42:51 -07:00
tabVisibilityUtils.ts [Feat] Add "My User" tab to team info page 2026-04-25 13:42:51 -07:00
TeamInfo.test.tsx Merge pull request #25398 from BerriAI/litellm_team_settings_router 2026-04-13 17:27:15 -07:00
TeamInfo.tsx [Fix] Team UI: handle legacy dict shape for metadata.guardrails (#27224) 2026-05-05 15:40:44 -07:00
TeamMemberTab.test.tsx fix(ui): fix failing ui_unit_tests (#21792) 2026-02-21 11:33:28 -08:00
TeamMemberTab.tsx Restore Current Cycle Spend column on team members tab 2026-04-22 17:33:41 -07:00
TeamVirtualKeysTable.test.tsx tests: update tests to not assert member count text because we removed that from this view 2026-03-07 16:56:15 -08:00
TeamVirtualKeysTable.tsx feat(ui): add Expires to key Overview header; merge User into one field (#27696) 2026-05-12 10:54:55 -07:00
useMyTeamMember.ts fix(team): address review feedback on My User tab 2026-04-25 14:28:27 -07:00