Repository navigation
refactor(ui): colocate tag-management and vector-stores views, keeping the shared selectors - #32719
Conversation
…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 SummaryThis PR colocates the management-view components for
Confidence Score: 5/5Pure 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 No files require special attention.
|
| 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
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@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
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:
http://localhost:4000/ui/tag-managementrenders the tag table (create tag modal opens), and in the Playground the tag selector still lists tagshttp://localhost:4000/ui/vector-storesrenders vector store management (create/test vector store still work), and the vector store selector still works in Organizations (create/edit org) and the PlaygroundLocal checks:
npx vitest runon the moved folders (83 tests) and on the retained selectors plus their consumers (Organizations, Playground; 41 tests) all pass,npm run buildcompiles every route, andmake pre-commitpasses.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/componentsdump 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 splitFor tag-management,
TagSelector(imported by the Playground) and itstypesstay in@/components/tag_management; the management view (index,tag_info,TagTable,CreateTagModal) moves intotag-management/_components. For vector-stores,VectorStoreSelector(imported by Organizations and the Playground) and itstypesstay in@/components/vector_store_management; the rest of the management UI moves intovector-stores/_componentsThe moved files' imports of the retained shared files are rewritten to absolute
@/componentspaths, escaping relative imports are absolutized, and moved test files have both theirfromimports and theirvi.mockpaths 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 changeScope note: the other group-1 candidates are deliberately left out.
agentsis a file-plus-folder combo (agents.tsxbeside anagents/folder) that needs different handling;guardrails(52 files) andpolicies(30) are the same split pattern but large; andmcp-serversis too interwoven with the Playground and the chat/LLM-call layer to split, so it stays shared