Skip to content

refactor(ui): colocate tag-management and vector-stores views, keeping the shared selectors - #32719

Merged
ryan-crabbe-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_colocate_group1_splits
Jul 10, 2026
Merged

ryan-crabbe-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_colocate_group1_splits

Conversation

@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor

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
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • 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

Relocation with no behavior change; the proof is that the pages render and, crucially, that the shared selectors still work for their other consumers. On a live proxy:

  1. http://localhost:4000/ui/tag-management renders the tag table (create tag modal opens), and in the Playground the tag selector still lists tags
  2. http://localhost:4000/ui/vector-stores renders vector store management (create/test vector store still work), and the vector store selector still works in Organizations (create/edit org) and the Playground

Local checks: npx vitest run on the moved folders (83 tests) and on the retained selectors plus their consumers (Organizations, Playground; 41 tests) all pass, npm run build compiles every route, and make pre-commit passes.

Type

🧹 Refactoring

Changes

Two of the "group 1" colocation splits from the App Router follow-up. Unlike the earlier segments that moved wholesale, these two folders lived in the shared src/components dump but are only partly shared: the page's management view is segment-owned, while a selector widget is reused by other features. Moving the whole folder would either break those other consumers or bury a shared widget inside one route's private folder, so each is split

For tag-management, TagSelector (imported by the Playground) and its types stay in @/components/tag_management; the management view (index, tag_info, TagTable, CreateTagModal) moves into tag-management/_components. For vector-stores, VectorStoreSelector (imported by Organizations and the Playground) and its types stay in @/components/vector_store_management; the rest of the management UI moves into vector-stores/_components

The moved files' imports of the retained shared files are rewritten to absolute @/components paths, escaping relative imports are absolutized, and moved test files have both their from imports and their vi.mock paths rewritten so the mocks keep matching the source. Grandfathered lint suppressions for the moved files are re-keyed with counts unchanged. The selectors did not move, so their external consumers are untouched. No behavior change

Scope note: the other group-1 candidates are deliberately left out. agents is a file-plus-folder combo (agents.tsx beside an agents/ folder) that needs different handling; guardrails (52 files) and policies (30) are the same split pattern but large; and mcp-servers is too interwoven with the Playground and the chat/LLM-call layer to split, so it stays shared

…g the shared selectors

Two of the group-1 colocation splits. Each of these folders lived in the shared
src/components dump but is only partly shared: the page's management view is
segment-owned, while a selector widget is reused by other features. So this
splits them rather than moving wholesale.

tag-management: TagSelector (used by playground) and its types stay in
@/components/tag_management; the management view (index, tag_info, TagTable,
CreateTagModal) moves to tag-management/_components.

vector-stores: VectorStoreSelector (used by organizations and playground) and
its types stay in @/components/vector_store_management; the rest of the
management UI moves to vector-stores/_components.

The moved files' imports of the retained shared files are rewritten to absolute
@/components paths, escaping relative imports are absolutized, and moved test
files have both their `from` imports and `vi.mock` paths rewritten to match.
Grandfathered lint suppressions for moved files are re-keyed. The external
consumers of the selectors are untouched (the selectors did not move). No
behavior change.
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR colocates the management-view components for tag-management and vector-stores into their respective App Router route folders (_components), while leaving the shared selector widgets (TagSelector, VectorStoreSelector) and types modules in place under @/components so that their consumers (Playground, Organizations) remain untouched.

  • All relative imports in the moved files are rewritten to absolute @/components/… paths; page.tsx files switch to relative "./_components" imports per App Router convention.
  • ESLint suppression keys are re-keyed to the new paths with counts unchanged, and test vi.mock paths are updated to match the new source locations (preventing a module-resolution failure where the old bare-module paths no longer have an index.tsx).

Confidence Score: 5/5

Pure file relocation with import-path updates; no business logic was changed and all shared consumers remain on their original import paths.

Every changed file is either a renamed/moved source file with corrected import paths, an ESLint suppression re-key, or a test mock path update that aligns with the new module location. Shared selector and type files were left untouched in @/components, so Playground, Organizations, and the useTags hook continue to resolve correctly. No production logic was altered.

No files require special attention.

Important Files Changed

Filename Overview
ui/litellm-dashboard/eslint-suppressions.json Suppression keys correctly re-keyed from old src/components/tag_management/ and src/components/vector_store_management/ paths to the new route-private paths; counts unchanged.
ui/litellm-dashboard/src/app/(dashboard)/tag-management/_components/index.tsx Management view entry point moved here; relative imports rewritten to absolute @/components/... paths; types imported from the shared @/components/tag_management/types that stayed behind.
ui/litellm-dashboard/src/app/(dashboard)/vector-stores/_components/index.tsx Vector store management view entry point moved here; relative imports rewritten to absolute @/components/... paths; types imported from the retained shared @/components/vector_store_management/types.
ui/litellm-dashboard/tests/CreateKeyPage.expiredToken.test.tsx Mock paths updated from the old bare-module paths (whose index.tsx files were moved away) to the new _components locations; prevents a module-resolution failure in the test sandbox.
ui/litellm-dashboard/src/app/(dashboard)/tag-management/page.tsx Import updated from @/components/tag_management to relative ./_components; correct for App Router colocation.
ui/litellm-dashboard/src/app/(dashboard)/vector-stores/page.tsx Import updated from @/components/vector_store_management to relative ./_components; correct for App Router colocation.
ui/litellm-dashboard/src/app/(dashboard)/tag-management/_components/tag_info.tsx All relative imports correctly rewritten to absolute @/components/... paths; business logic unchanged.
ui/litellm-dashboard/src/app/(dashboard)/vector-stores/_components/VectorStoreForm.tsx Relative imports rewritten to absolute @/components/... paths; test mock updated to match so vi.mock("@/components/networking") aligns with the source import.
ui/litellm-dashboard/src/app/(dashboard)/vector-stores/_components/CreateVectorStore.tsx Relative imports rewritten to absolute paths; types imported from the retained @/components/vector_store_management/types; test mocks updated consistently.
ui/litellm-dashboard/src/app/(dashboard)/vector-stores/_components/VectorStoreTable.tsx Relative imports for provider_info_helpers and TableIconActionButton rewritten to absolute paths; test mocks updated to match.

Reviews (1): Last reviewed commit: "refactor(ui): colocate tag-management an..." | Re-trigger Greptile

@codspeed

codspeed Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_colocate_group1_splits (6a83311) with litellm_internal_staging (27cf064)

Open in CodSpeed

@ryan-crabbe-berri
ryan-crabbe-berri merged commit 3d5d5e1 into litellm_internal_staging Jul 10, 2026
77 checks passed
@ryan-crabbe-berri
ryan-crabbe-berri deleted the litellm_colocate_group1_splits branch July 10, 2026 05:19
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