Skip to content

docs(ui): App Router migration plan; fix stale README routing claim - #30054

Closed
ryan-crabbe-berri wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_ui_app_router_migration_plan
Closed

ryan-crabbe-berri wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_ui_app_router_migration_plan

Conversation

@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Companion to #30045 (dead route stubs) and #30049 (single auth engine). Writes down the plan those PRs are executing.

Linear ticket

N/A

Pre-Submission checklist

  • I have added meaningful tests (N/A, docs only)
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review and received a Confidence Score of at least 4/5

Screenshots / Proof of Fix

Docs only; render the two files on this branch:
ui/litellm-dashboard/src/app/(dashboard)/MIGRATION.md and the updated README.md next to it.

Type

📖 Documentation

Changes

Adds (dashboard)/MIGRATION.md, the working plan for moving the dashboard off the legacy ?page= switch onto App Router path routes. It covers where routing actually stands today (MIGRATED_PAGES in src/utils/migratedPages.ts is the source of truth and only api-reference is migrated), the auth architecture after #30049 (AuthContext as the single engine, useAuthorized() as the only API pages should touch), the phased plan (single shell, then breaking the data coupling, then a mechanical per-page cutover recipe, then deleting the bridging machinery), and the known follow-ups.

Also fixes the README in the same directory, which stated that file-structure routing is in effect. That describes the target rather than the current state, and the gap is exactly how unreachable stub routes accumulated and had to be deleted twice (#28891, #30045). The README now says it describes the target architecture, links to MIGRATION.md, and tells contributors not to add page.tsx routes ahead of their cutover PR.

…README routing claim

Adds (dashboard)/MIGRATION.md: where routing actually stands (MIGRATED_PAGES
is the source of truth, one page migrated), the auth architecture after
#30049 (AuthContext engine, useAuthorized as the only API), the phased plan
(one shell, break the data coupling, per-page cutover recipe, endgame), and
the known follow-ups

The README previously stated that file-structure routing is in effect, which
is the target rather than the current state, and that gap is how unreachable
stub routes accumulated (#28891, #30045). It now says it describes the target,
points at MIGRATION.md, and tells contributors not to add page.tsx routes
ahead of their cutover PR
@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This is a docs-only PR that adds MIGRATION.md — a working plan for moving the dashboard from the legacy ?page= switch to Next.js App Router path routes — and corrects the README.md, which falsely claimed file-structure routing is already in effect.

  • MIGRATION.md documents the four-phase cutover plan (single auth engine → one shell → break data coupling → per-page cutover), the MIGRATED_PAGES source of truth, and the auth architecture consolidated in refactor(ui): single auth engine; useAuthorized becomes a policy layer over AuthContext #30049.
  • README.md is updated to describe the target state rather than the present state, with a pointer to MIGRATION.md and an explicit warning not to add page.tsx stubs ahead of a cutover PR.

Confidence Score: 4/5

Docs-only change with no runtime impact; safe to merge after confirming the MIGRATION.md placement is acceptable to the team.

Both files are documentation with no code changes. The README correction is accurate and unambiguous. MIGRATION.md is internally consistent and well-referenced. The only open question is whether a new .md file in the main repo conflicts with the team's policy of keeping documentation in the litellm-docs repo, and one sentence in MIGRATION.md will silently diverge from reality as pages are migrated.

MIGRATION.md — specifically the hardcoded 'only api_ref is migrated' claim and the documentation-placement question.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/app/(dashboard)/MIGRATION.md New developer-facing migration plan for App Router cutover; accurate and well-structured, but may conflict with the rule that documentation belongs in the litellm-docs repo.
ui/litellm-dashboard/src/app/(dashboard)/README.md Corrects a stale claim that file-structure routing is already in effect; adds pointer to MIGRATION.md and a clear contributor warning.

Reviews (1): Last reviewed commit: "docs(ui): write down the App Router migr..." | Re-trigger Greptile

@@ -0,0 +1,61 @@
# App Router migration plan

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Documentation placement — consider litellm-docs repo

A repo-level rule asks that documentation additions go into the litellm-docs repo rather than the main repo. MIGRATION.md is new prose documentation, so it technically falls under that rule. The counter-argument is that this is an internal contributor guide tightly coupled to specific source paths in this tree (e.g. src/utils/migratedPages.ts, e2e_tests/fixtures/migratedPages.ts), making it harder to keep in sync if hosted elsewhere. Worth a quick confirmation from the team that this placement is intentional before merging.

Rule Used: Prevent documentation from being added - needs to ... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

`MIGRATED_PAGES` in `src/utils/migratedPages.ts` is the single source of truth for which pages are cut over. Adding an entry there routes the sidebar and deep links to the new path and redirects the legacy `?page=` URL. Removing it rolls the page back. As of this writing only `api_ref` -> `/ui/api-reference` is migrated

The data-driven E2E smoke in `e2e_tests/tests/migration/` reads `e2e_tests/fixtures/migratedPages.ts`. Every migrated page gets an entry there so CI exercises it under both the default and server-root-path configurations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Point-in-time claim will go stale

The sentence "As of this writing only api_ref -> /ui/api-reference is migrated" is accurate today but will silently diverge from MIGRATED_PAGES as pages are cut over. Readers consulting the doc later will see the wrong count. Consider removing the specific claim and just pointing to MIGRATED_PAGES as the canonical source (which you already do a sentence earlier), or rephrasing to "the list grows; check MIGRATED_PAGES for the current set."

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ryan-crabbe-berri
ryan-crabbe-berri deleted the litellm_ui_app_router_migration_plan branch June 9, 2026 20:35
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.

1 participant