Skip to content

feat(ui): link the User ID and Team ID cells on the Memory page - #40752

Merged
ryan-crabbe-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_memory_table_entity_links
Sep 12, 2026
Merged

feat(ui): link the User ID and Team ID cells on the Memory page#40752
ryan-crabbe-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_memory_table_entity_links

Conversation

@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Memory page shows User ID and Team ID as dead pills
  • Tracing a memory row to its owner means copying an id

How it solves it:

  • IdCell grows an href prop that turns the pill into a client routed link
  • Memory columns pass userDetailHref and teamDetailHref, so sentinels stay unlinked

User Flow

Before: an admin reviewing stored memories cannot get from a row to the user or team it belongs to

  1. They open http://localhost:4000/ui/memory
  2. The User ID and Team ID cells show ids in blue pills, but nothing happens on click
  3. They select an id, copy it, open http://localhost:4000/ui/users or http://localhost:4000/ui/teams and paste it into the search box

After: the same admin clicks either pill and lands on it

  1. They open http://localhost:4000/ui/memory
  2. Hovering a User ID or Team ID pill shows the pointer cursor and its hover colour
  3. Clicking opens http://localhost:4000/ui/users?user=<user id> or http://localhost:4000/ui/teams?team=<team id>
  4. Rows owned by the built in proxy admin keep default_user_id as a plain pill, 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. Seeded memories zzqa:timezone and zzqa:prefers-concise for qa-links-user on team zzqa-links-team, alongside two older rows owned by the built in admin. 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 id_cell.tsx and MemoryTableColumns.tsx

Before (db3338b)

  1. Open http://localhost:3021/memory
  2. The User ID and Team ID pills are inert

memory before

  1. Dumping the zzqa:timezone row shows no links:
[{"column":"User ID","text":"qa-links-user","href":null},
 {"column":"Team ID","text":"8733da1f-bf59-4a89-9623-b41708d99144","href":null}]

After (32a6494)

  1. Open http://localhost:3021/memory
  2. Hovering the User ID pill shows its hover colour and the full id tooltip

memory after hover

  1. Dumping the same row now shows both hrefs:
[{"column":"User ID","text":"qa-links-user","href":"/users?user=qa-links-user"},
 {"column":"Team ID","text":"8733da1f-bf59-4a89-9623-b41708d99144","href":"/teams?team=8733da1f-bf59-4a89-9623-b41708d99144"}]
  1. The two older rows owned by the built in admin stay unlinked:
memory default_user_id rows: [{"name":"lit4741-decoy:prefs","userCellIsLink":false,"userCellText":"default_user_id"},
                              {"name":"lit4741-144523:profile","userCellIsLink":false,"userCellText":"default_user_id"}]
  1. Clicking each pill lands where it should:
memory-user -> http://localhost:3021/users/?user=qa-links-user
memory-team -> http://localhost:3021/teams/?team=8733da1f-bf59-4a89-9623-b41708d99144

memory user landing

memory team landing

Type

🆕 New Feature

Caveats (if any)

Low

  • IdCell gains an href prop that every other caller leaves unset, so nothing else changes
  • When both href and onClick are passed, href wins; no current caller passes both

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

Both columns rendered as dead pills, so tracing a memory row back to its
owner meant copying an id into another page's search box. IdCell grows an
href prop that turns the pill into a client-routed link, and the Memory
columns pass the shared entityLinks helpers so the proxy admin and
dashboard sentinels stay unlinked.

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 Memory page user and team identifiers navigable through the existing entity-detail URL conventions.

  • Extends IdCell with optional client-routed anchor rendering.
  • Links non-sentinel Memory user and team identifiers to their detail views.
  • Keeps empty, disabled, and built-in sentinel identifiers unlinked.
  • Adds focused component and table tests for navigation and sentinel handling.

Confidence Score: 5/5

The PR appears safe to merge, with entity URLs encoded correctly and both destination pages honoring the generated query parameters.

No actionable failure remains: the shared link handler preserves native new-tab interactions, entity helpers prevent unsafe schemes and sentinel links, and focused tests cover the newly exposed behavior.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsx Adds optional semantic-link rendering while retaining existing plain, clickable, copyable, and disabled cell behavior.
ui/litellm-dashboard/src/app/(dashboard)/memory/_components/MemoryTableColumns.tsx Generates encoded user and team detail links through existing helpers, which suppress known sentinel identifiers.
ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsx Verifies anchor output, client-side routing, and fallback to plain text without an href.
ui/litellm-dashboard/src/app/(dashboard)/memory/_components/MemoryTable.test.tsx Verifies Memory table detail links and confirms built-in user and team sentinels remain unlinked.

Reviews (1): Last reviewed commit: "feat(ui): link the User ID and Team ID c..." | Re-trigger Greptile

@ryan-crabbe-berri
ryan-crabbe-berri enabled auto-merge (squash) September 12, 2026 00:46
@ryan-crabbe-berri
ryan-crabbe-berri merged commit 1be9306 into litellm_internal_staging Sep 12, 2026
79 checks passed
@ryan-crabbe-berri
ryan-crabbe-berri deleted the litellm_memory_table_entity_links branch September 12, 2026 00:48
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