refactor(ui): colocate caching, projects, and guardrails-monitor into _components/ - #32696
refactor(ui): colocate caching, projects, and guardrails-monitor into _components/#32696ryan-crabbe-berri wants to merge 1 commit into
Conversation
… _components/ Continues the colocation follow-up (after api-reference #32690 and the memory/budgets/access-groups batch #32694), applying the same convention to three more self-contained segments: rename each `<segment>/components/` to `_components/` and repoint the one `page.tsx` import. Each folder is imported only by its own page (verified zero external importers across src, tests, and e2e_tests, and no absolute self-imports inside the folder), so this is a pure relocation with no logic change. The `@/components` imports in these segments are all genuinely shared (networking, shared/*, common_components, llm_calls, molecules) and stay put; nothing is drained. Grandfathered lint suppressions under the three folders (14 entries total: caching 4, projects 4, guardrails-monitor 6) are re-keyed to the new paths with counts unchanged.
Greptile SummaryThis PR continues the Next.js App Router colocation convention by renaming
Confidence Score: 5/5Pure directory rename with no logic changes; old paths have no remaining references and the old directories are fully removed. Every changed file is either a straight file move (content identical to the source), a one-line import path update in a page entry point, or a suppression-key rename in eslint-suppressions.json. No component logic, no API calls, no test assertions, and no shared exports were modified. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/eslint-suppressions.json | 14 suppression keys re-keyed from components/ to _components/ for caching, guardrails-monitor, and projects; rule counts are unchanged |
| ui/litellm-dashboard/src/app/(dashboard)/caching/page.tsx | Import of CacheDashboard updated from ./components/ to ./_components/; no other changes |
| ui/litellm-dashboard/src/app/(dashboard)/projects/page.tsx | Import of ProjectsPage updated from ./components/ to ./_components/; no other changes |
| ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/page.tsx | Import of GuardrailsMonitorView updated from ./components/ to ./_components/; no other changes |
| ui/litellm-dashboard/src/app/(dashboard)/caching/_components/cache_dashboard.tsx | Moved verbatim from caching/components/; internal relative imports and @/components references are all intact |
| ui/litellm-dashboard/src/app/(dashboard)/projects/_components/ProjectsPage.tsx | Moved verbatim from projects/components/; no logic changes |
| ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsMonitorView.tsx | Moved verbatim from guardrails-monitor/components/; no logic changes |
Reviews (1): Last reviewed commit: "refactor(ui): colocate caching, projects..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Superseded by #32704, which combines all four colocation batches into one PR per request. Same commits, cherry-picked onto one branch; branch kept for now. |
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
Pure directory renames with no behavior change, so the proof is that each page still renders. On a live proxy, load each and screenshot:
http://localhost:4000/ui/cachingrenders the cache dashboard (cache settings tab still opens)http://localhost:4000/ui/projectsrenders the projects page (create/edit project modals still open)http://localhost:4000/ui/guardrails-monitorrenders the guardrails monitor viewLocal checks:
npx vitest runon the moved suites passes with 118 tests across 14 files,npm run buildcompiles every route, andmake pre-commitpasses.Type
🧹 Refactoring
Changes
Continues the colocation follow-up to the App Router migration, after the api-reference template (#32690) and the memory/budgets/access-groups batch (#32694). Same convention: a page's owned components live in
<segment>/_components/(private to the segment, matching Next's_route-exclusion)caching, projects, and guardrails-monitor were chosen because their local component folders are entirely self-contained. Each folder is imported only by its own
page.tsx(verified zero external importers across src, tests, and e2e_tests, and no absolute self-imports inside the folder, so internal relative imports move with it), which makes each a straightcomponents/to_components/rename plus repointing that one import. Every@/componentsimport in these segments is genuinely shared infrastructure (networking, shared/*, common_components, llm_calls, molecules), so nothing is drained out of@/components. No logic changesGrandfathered lint suppressions under the three folders (14 entries: caching 4, projects 4, guardrails-monitor 6) are re-keyed to the files' new paths with counts unchanged, since fixing those underlying violations is a separate effort out of scope for a file move