Skip to content

feat(ui): link the entity cells on the team detail page's keys table - #40647

Merged
ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_team_keys_table_entity_links
Sep 11, 2026
Merged

ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_team_keys_table_entity_links

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Team page keys table showed org and user as dead text
  • Same navigation gap the Virtual Keys page just closed
  • Created By popover was a verbatim copy of another file

How it solves it:

  • Organization ID, User Email, User ID and Created By are links
  • Sentinel ids stay plain text through the shared href helpers
  • The duplicated popover moved into the shared table cells kit
  • Its copy buttons now name the field they copy

User Flow

Before: an admin on a team's Virtual Keys tab cannot get from a key to the org or user behind it

  1. They open https://litellm-domain/ui/teams?team=fdf4b470-1fce-48e9-9e89-8160cae56f52 and pick the Virtual Keys tab
  2. Organization ID reads 006717aa-94a1-4ed4-a5fb-80a81c0d2e57 and User ID reads qa-team-owner, both plain text
  3. Clicking either does nothing, so they copy the id, open the Organizations or Internal Users page, and search for it by hand
  4. The same key row on https://litellm-domain/ui/api-keys is already clickable, so the two tables disagree

After: the same cells take them straight to the org and user pages

  1. They open https://litellm-domain/ui/teams?team=fdf4b470-1fce-48e9-9e89-8160cae56f52 and pick the Virtual Keys tab
  2. Hovering Organization ID underlines it and shows a chevron
  3. Clicking it lands on https://litellm-domain/ui/organizations?org=006717aa-94a1-4ed4-a5fb-80a81c0d2e57
  4. User Email, User ID and Created By all land on https://litellm-domain/ui/users?user=qa-team-owner
  5. A Created By of "Default Proxy Admin" stays plain text, since the built-in admin id has no user page

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Ran against a live proxy on port 4021 and the dashboard dev server on 3021. Setup was a real org, team and user in Postgres plus two keys on that team: zzqa-linked-key created by the team owner, and zzqa-sentinel-key created by the proxy admin, so both the real-user and the sentinel case show up in one table.

In both runs the steps are: open the team page, pick the Virtual Keys tab, search zzqa-, hover the Created By cell of zzqa-linked-key, then read every anchor the rows rendered.

Before (880ccc7)

  1. Open http://localhost:3021/teams/?team=fdf4b470-1fce-48e9-9e89-8160cae56f52, pick Virtual Keys, search zzqa-

    before

  2. Hover Created By on the zzqa-linked-key row. The popover opens but nothing is a link

    before hover

  3. Read the anchors in both rows, there are none:

    [[{"column":"Organization ID","text":"006717aa-94a1-4ed4-a5fb-80a81c0d2e57","href":null},
      {"column":"User Email","text":"qa-team-owner@example.com","href":null},
      {"column":"User ID","text":"qa-team-owner","href":null},
      {"column":"Created By","text":"Default Proxy Admin","href":null}],
     [{"column":"Organization ID","text":"006717aa-94a1-4ed4-a5fb-80a81c0d2e57","href":null},
      {"column":"User Email","text":"qa-team-owner@example.com","href":null},
      {"column":"User ID","text":"qa-team-owner","href":null},
      {"column":"Created By","text":"QA Team Owner","href":null}]]

After (06b259e)

  1. Open http://localhost:3021/teams/?team=fdf4b470-1fce-48e9-9e89-8160cae56f52, pick Virtual Keys, search zzqa-

    after

  2. Hover Created By on the zzqa-linked-key row. It now carries the chevron the Key column uses

    after hover

  3. Read the anchors in both rows. Every entity cell has one except the Created By that is the built-in admin:

    [[{"column":"Organization ID","text":"006717aa-94a1-4ed4-a5fb-80a81c0d2e57","href":"/organizations?org=006717aa-94a1-4ed4-a5fb-80a81c0d2e57"},
      {"column":"User Email","text":"qa-team-owner@example.com","href":"/users?user=qa-team-owner"},
      {"column":"User ID","text":"qa-team-owner","href":"/users?user=qa-team-owner"},
      {"column":"Created By","text":"Default Proxy Admin","href":null}],
     [{"column":"Organization ID","text":"006717aa-94a1-4ed4-a5fb-80a81c0d2e57","href":"/organizations?org=006717aa-94a1-4ed4-a5fb-80a81c0d2e57"},
      {"column":"User Email","text":"qa-team-owner@example.com","href":"/users?user=qa-team-owner"},
      {"column":"User ID","text":"qa-team-owner","href":"/users?user=qa-team-owner"},
      {"column":"Created By","text":"QA Team Owner","href":"/users?user=qa-team-owner"}]]
  4. Click Organization ID, which lands on http://localhost:3021/organizations/?org=006717aa-94a1-4ed4-a5fb-80a81c0d2e57

    org page

  5. Go back and click User ID, which lands on http://localhost:3021/users/?user=qa-team-owner. User Email and Created By on the same row go to the same place

    user page

Type

🆕 New Feature

🧹 Refactoring

Caveats

Low

  • User ID now shows the admin badge, was plain text
  • Resting cells look the same, the affordance is on hover
  • Org links can 403 for viewers without org access, as they already do elsewhere

https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4


Note

Low Risk
Dashboard-only navigation and component extraction with tests; no auth or API behavior changes beyond richer links in one table.

Overview
The team detail Virtual Keys table now matches the main API keys table: Organization ID, User Email, User ID, and Created By navigate to org/user detail pages via IdentityCell and shared orgDetailHref / userDetailHref, while the built-in proxy admin sentinel stays non-linkable (DefaultProxyAdminTag / no href).

Created By and the Virtual Keys page no longer duplicate hover-popover markup—logic moves into shared UserPopoverCell (exported with ENTITY_CELL_TITLE_CLASSES). Popover copy actions use IdCell’s new optional copyLabel so buttons read “Copy User Email” (etc.) instead of a generic “Copy ID”. Tests cover the new links on TeamVirtualKeysTable and the customizable copy label.

Reviewed by Cursor Bugbot for commit 06b259e. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds organization, owner, and creator links to the team’s Virtual Keys table and shares the Created By popover with the main Virtual Keys page

  • Preserves plain-text rendering for sentinel identities
  • Gives copy buttons field-specific accessible names while retaining the existing default for other IdCell callers
  • Adds assertions covering sentinel ownership links and custom copy labels

No new actionable issues were found in the changes since the previous review

Confidence Score: 5/5

The PR appears safe to merge, with no outstanding findings or new actionable regressions

Field-specific copy labels fix the accessibility finding, and the sentinel test now checks both ownership cells. The organization-link finding was withdrawn after the existing unconditional-link convention was clarified. No previous findings remain outstanding

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.tsx Uses shared entity-link helpers and the extracted creator popover
ui/litellm-dashboard/src/components/VirtualKeysPage/keyTableColumns.tsx Reuses the shared UserPopoverCell instead of its local implementation
ui/litellm-dashboard/src/components/shared/table_cells/UserPopoverCell.tsx Supplies distinct copy labels for user alias, email, and ID
ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsx Adds an optional copyLabel prop with a backward-compatible default
ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsx Checks the custom accessible name and the value copied
ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.test.tsx Covers entity destinations and unlinked sentinel ownership cells using a role-based row selector

Reviews (2): Last reviewed commit: "fix(ui): name the popover copy buttons a..." | Re-trigger Greptile

Base automatically changed from litellm_key_table_entity_links to litellm_internal_staging September 11, 2026 01:27
@ryan-crabbe-berri
ryan-crabbe-berri requested a review from a team September 11, 2026 01:27
The team detail page's Virtual Keys table showed Organization ID, User
Email, User ID and Created By as dead text, so getting from a key to the
org or user behind it meant copying an id and searching for it.

Those four cells now render as links, reusing the sentinel-aware href
helpers, so default_user_id and the litellm-dashboard team stay plain
text instead of pointing at pages that do not exist.

The Created By cell was a verbatim copy of the Virtual Keys page's user
popover, so that moved into the shared table_cells kit and both tables
now use the one implementation.

Claude-Session: https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4
The shared user popover copied alias, email and ID through three copy
buttons that all announced themselves as "Copy ID", so a screen reader
could not tell them apart. IdCell now takes the label, defaulting to the
old text everywhere else.

Also drops the closest("tr") the new link tests used, which put the
testing-library/no-node-access budget over its ceiling, and asserts the
sentinel row leaves User Email and the admin badge unlinked too.

Claude-Session: https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4
@ryan-crabbe-berri
ryan-crabbe-berri force-pushed the litellm_team_keys_table_entity_links branch from 31bc836 to 06b259e Compare September 11, 2026 01:40
@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor Author

@greptileai re review

@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 06b259e. Configure here.

@ryan-crabbe-berri
ryan-crabbe-berri merged commit dca71e2 into litellm_internal_staging Sep 11, 2026
87 checks passed
@ryan-crabbe-berri
ryan-crabbe-berri deleted the litellm_team_keys_table_entity_links branch September 11, 2026 02:09
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.

2 participants