Repository navigation
refactor(ui): colocate cost-tracking and prompts components into _components/ - #32716
Conversation
…ponents/ Renames each segment's local components/ folder to _components/ (private to the route, matching Next's _ route-exclusion). Both folders are imported only by their own page.tsx via the folder index (verified zero external importers across src, tests, and e2e_tests), so each is a straight rename plus repointing that one index import; a folder rename keeps every file at the same depth, so all internal and relative imports are unaffected. Grandfathered lint suppressions under the two folders (31 entries: cost-tracking 15, prompts 16) are re-keyed to the new paths with counts unchanged. No behavior change.
Greptile SummaryThis PR renames the local
Confidence Score: 5/5Safe to merge — the change is a mechanical folder rename with no logic touched anywhere. Every source file is a pure rename with zero content change. The only edited source files are the two page.tsx entry points (one-line import fix each) and eslint-suppressions.json (path re-keying). A search of the entire codebase confirms no other file imports from the old components/ paths, so no dangling references were left behind. The committed tsconfig.tsbuildinfo contains stale path strings, but that file is machine-generated and self-heals on the next build. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/cost-tracking/page.tsx | Single import path updated from ./components to ./_components; correct and complete. |
| ui/litellm-dashboard/src/app/(dashboard)/prompts/page.tsx | Single import path updated from ./components to ./_components; correct and complete. |
| ui/litellm-dashboard/eslint-suppressions.json | All 31 affected path keys re-keyed from components/ to _components/ with suppression counts unchanged; exhaustive and correct. |
| ui/litellm-dashboard/tsconfig.tsbuildinfo | Auto-generated incremental build artifact; contains machine-local absolute paths (pre-existing). Old components/ path strings are still present in this snapshot, but TypeScript will reconcile them on the next build. |
Reviews (1): Last reviewed commit: "refactor(ui): colocate cost-tracking and..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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; the proof is that both pages still render. On a live proxy:
http://localhost:4000/ui/cost-trackingrenders cost tracking settings (the "How it works" code block and pricing calculator still work)http://localhost:4000/ui/promptsrenders the prompts panel (prompt editor / conversation panel still work)Local checks:
npx vitest runon the moved folders passes with 231 tests across 17 files,npm run buildcompiles every route, andmake pre-commitpasses.Type
🧹 Refactoring
Changes
Continues the colocation follow-up to the App Router migration. It renames the local
components/folders of cost-tracking and prompts to_components/, so each route's owned implementation is private to its segment (matching Next's_route-exclusion convention used by the already-colocated segments)Both folders are imported only by their own
page.tsxvia the folder index, verified to have zero external importers across src, tests, and e2e_tests. Because a rename keeps every file at the same depth in the tree, all internal and relative imports are unaffected; the only source change per segment is repointing that one index import from./componentsto./_components. Grandfathered lint suppressions under the two folders (31 entries total, all pre-existing) are re-keyed to the new paths with counts unchanged. No behavior changeThis combines what were two separate PRs (cost-tracking and prompts) into one, since both are the identical mechanical rename