Repository navigation
feat(ui): link the entity cells on the team detail page's keys table - #40647
ryan-crabbe-berri merged 2 commits into
Conversation
Greptile SummaryAdds organization, owner, and creator links to the team’s Virtual Keys table and shares the Created By popover with the main Virtual Keys page
No new actionable issues were found in the changes since the previous review Confidence Score: 5/5The 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
|
| 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
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
31bc836 to
06b259e
Compare
|
@greptileai re review |
|
bugbot run |
There was a problem hiding this comment.
✅ 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.
TLDR
Problem this solves:
How it solves it:
User Flow
Before: an admin on a team's Virtual Keys tab cannot get from a key to the org or user behind it
006717aa-94a1-4ed4-a5fb-80a81c0d2e57and User ID readsqa-team-owner, both plain textAfter: the same cells take them straight to the org and user pages
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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@greptileaito 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-keycreated by the team owner, andzzqa-sentinel-keycreated 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 ofzzqa-linked-key, then read every anchor the rows rendered.Before (880ccc7)
Open http://localhost:3021/teams/?team=fdf4b470-1fce-48e9-9e89-8160cae56f52, pick Virtual Keys, search
zzqa-Hover Created By on the
zzqa-linked-keyrow. The popover opens but nothing is a linkRead 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)
Open http://localhost:3021/teams/?team=fdf4b470-1fce-48e9-9e89-8160cae56f52, pick Virtual Keys, search
zzqa-Hover Created By on the
zzqa-linked-keyrow. It now carries the chevron the Key column usesRead 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"}]]Click Organization ID, which lands on
http://localhost:3021/organizations/?org=006717aa-94a1-4ed4-a5fb-80a81c0d2e57Go 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 placeType
🆕 New Feature
🧹 Refactoring
Caveats
Low
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
IdentityCelland sharedorgDetailHref/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 withENTITY_CELL_TITLE_CLASSES). Popover copy actions useIdCell’s new optionalcopyLabelso buttons read “Copy User Email” (etc.) instead of a generic “Copy ID”. Tests cover the new links onTeamVirtualKeysTableand the customizable copy label.Reviewed by Cursor Bugbot for commit 06b259e. Bugbot is set up for automated code reviews on this repo. Configure here.