Skip to content

feat(ui): link the User ID, Created By and Deleted By cells on Deleted Keys - #40750

Open
ryan-crabbe-berri wants to merge 2 commits into
litellm_internal_stagingfrom
litellm_deleted_keys_entity_links
Open

feat(ui): link the User ID, Created By and Deleted By cells on Deleted Keys#40750
ryan-crabbe-berri wants to merge 2 commits into
litellm_internal_stagingfrom
litellm_deleted_keys_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:

  • Deleted Keys shows User ID, Created By, Deleted By as dead text
  • Auditing a deleted key means copying ids into another page

How it solves it:

  • Renders the three cells through the shared IdentityCell
  • Reuses userDetailHref, so the proxy admin placeholder stays unlinked

User Flow

Before: an admin auditing a deleted key cannot get from the row to the people on it

  1. They open http://localhost:4000/ui/logs and pick the Deleted Keys tab
  2. User ID, Created By and Deleted By all read as plain text
  3. They select an id, copy it, open http://localhost:4000/ui/users and paste it into the search box

After: the same admin clicks any of the three and lands on that user

  1. They open http://localhost:4000/ui/logs and pick the Deleted Keys tab
  2. Hovering User ID, Created By or Deleted By highlights the cell and shows a chevron
  3. Clicking it opens http://localhost:4000/ui/users?user=<user id> with that user selected
  4. Rows owned or deleted by the built in proxy admin still render default_user_id as plain text, because there is no user page for it

Relevant issues

Linear ticket

Pre-Submission checklist

  • 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)

Screenshots / Proof of Fix

Setup: proxy on :4021 and the dashboard dev server on :3021, both against the shared dev database. Created key zzqa-links-deleted-key owned by qa-links-user and deleted it with that user's key, so all three columns carry a real id. The After run was captured on a local branch that merges the five sibling entity-link PRs onto db3338b; they touch disjoint files, and this capture only exercises DeletedKeysTableColumns.tsx

Before (db3338b)

  1. Open http://localhost:3021/logs and click the Deleted Keys tab
  2. The top row reads qa-links-user in User ID, Created By and Deleted By, all plain text

deleted keys before

  1. Dumping that row's cells shows no links:
[{"column":"Team Alias","text":"-","href":null},
 {"column":"User Email","text":"-","href":null},
 {"column":"User ID","text":"qa-links-user","href":null},
 {"column":"Created By","text":"qa-links-user","href":null},
 {"column":"Deleted By","text":"qa-links-user","href":null}]

After (3ef7022)

  1. Open http://localhost:3021/logs and click the Deleted Keys tab
  2. Hovering the User ID cell highlights it and reveals the chevron

deleted keys after hover

  1. Dumping the same row now shows all three hrefs, with User Email and Team Alias untouched:
[{"column":"Team Alias","text":"-","href":null},
 {"column":"User Email","text":"-","href":null},
 {"column":"User ID","text":"qa-links-user","href":"/users?user=qa-links-user"},
 {"column":"Created By","text":"qa-links-user","href":"/users?user=qa-links-user"},
 {"column":"Deleted By","text":"qa-links-user","href":"/users?user=qa-links-user"}]
  1. Rows created or deleted by the built in admin keep default_user_id as plain text, visible in the same screenshot
  2. Clicking the User ID link lands on the user detail page:
deleted-keys-user -> http://localhost:3021/users/?user=qa-links-user

deleted keys landing

Type

🆕 New Feature

Caveats (if any)

Low

  • User Email and Team Alias stay plain text on purpose
    • The deleted key table has no column for either, so the API always sends null and both cells read "-"

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4

…d Keys

All three columns rendered as plain text, so auditing a deleted key meant
copying an id into the Users page search box. Route them through
IdentityCell with userDetailHref, which keeps the proxy admin placeholder
unlinked. User Email and Team Alias stay as they are: the deleted key table
has no column for either, so the API never populates them.

Claude-Session: https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes the User ID, Created By, and Deleted By values in the Deleted Keys table link to the corresponding user detail page

  • Reuses the shared IdentityCell interaction and userDetailHref route helper
  • Keeps missing values and the built-in default_user_id placeholder unlinked
  • Adds focused coverage for normal user links and sentinel behavior

Confidence Score: 5/5

The PR appears safe to merge, with the new links following existing dashboard routing and identity-cell contracts

No actionable failures remain; identifiers are encoded, deployment path prefixes are preserved, the proxy-admin sentinel stays unlinked, and the changed behavior has meaningful tests

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/DeletedKeysPage/DeletedKeysTable/DeletedKeysTableColumns.tsx Replaces three plain identity values with shared, mount-aware user links while preserving empty and proxy-admin fallback rendering
ui/litellm-dashboard/src/components/DeletedKeysPage/DeletedKeysTable/DeletedKeysTable.test.tsx Adds focused assertions for all three user-detail links and verifies that the proxy-admin sentinel remains plain text

Reviews (1): Last reviewed commit: "feat(ui): link the User ID, Created By a..." | Re-trigger Greptile

The page test renders the table, and the newly linked cells call useRouter,
which throws without an App Router mounted. Matches how the other 35 test
files in the suite stub next/navigation.

Claude-Session: https://claude.ai/code/session_01NfwfQhamRNnSqgXMUjf3h4
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