feat(FR-2664): add /deployments + /admin-deployments routes with legacy fallbacks#6907
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.59% (-0.01% 🔻) |
1758/20465 |
| 🔴 | Branches | 7.89% | 1131/14338 |
| 🔴 | Functions | 5.15% (+0.01% 🔼) |
286/5557 |
| 🔴 | Lines | 8.31% (-0.01% 🔻) |
1650/19860 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / AdminDeploymentListPage.tsx |
0% | 100% | 0% | 0% |
| 🔴 | ... / DeploymentLauncherPage.tsx |
0% | 100% | 0% | 0% |
| 🔴 | ... / DeploymentDetailPage.tsx |
0% | 100% | 0% | 0% |
| 🔴 | ... / DeploymentListPage.tsx |
0% | 100% | 0% | 0% |
Test suite run success
856 tests passing in 39 suites.
Report generated by 🧪jest coverage report action from c0a7db6
There was a problem hiding this comment.
Pull request overview
Introduces new “Deployments” route namespaces (/deployments, /admin-deployments) and adds redirect-based legacy fallbacks from existing Serving-related routes (/serving, /admin-serving, and some /service/* paths) as part of the FR-2664 migration foundation.
Changes:
- Add
/deploymentsroute tree (list/new/detail/edit) and redirect legacy/serving/*traffic to it. - Add
/admin-deploymentsroute and redirect legacy/admin-serving/*traffic to it. - Add placeholder stub pages for the new Deployment routes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/routes.tsx | Wires new /deployments and /admin-deployments routes and adds redirect fallbacks from legacy Serving routes. |
| react/src/pages/DeploymentListPage.tsx | Adds stub placeholder page for deployments list. |
| react/src/pages/DeploymentLauncherPage.tsx | Adds stub placeholder page for deployments create/edit. |
| react/src/pages/DeploymentDetailPage.tsx | Adds stub placeholder page for deployment details. |
| react/src/pages/AdminDeploymentListPage.tsx | Adds stub placeholder page for admin deployments list. |
| // FR-2664 — New admin deployment list route. Replaces the legacy | ||
| // /admin-serving route (see fallback redirect below). | ||
| path: '/admin-deployments', | ||
| handle: { labelKey: 'webui.menu.Serving' }, | ||
| Component: () => { | ||
| const { t } = useTranslation(); | ||
| return ( | ||
| <BAIErrorBoundary> | ||
| <Suspense | ||
| fallback={<BAICard title={t('webui.menu.Serving')} loading />} | ||
| > | ||
| <AdminDeploymentListPage /> | ||
| </Suspense> | ||
| </BAIErrorBoundary> | ||
| ); | ||
| }, | ||
| }, | ||
| { | ||
| // FR-2664 — Legacy /admin-serving fallback. Transient redirect; remove | ||
| // once all internal links + external references have been migrated. | ||
| path: '/admin-serving', | ||
| handle: { labelKey: 'webui.menu.Serving' }, | ||
| children: [ | ||
| { | ||
| index: true, | ||
| Component: () => { | ||
| const { t } = useTranslation(); | ||
| const location = useLocation(); | ||
| return ( | ||
| <BAIErrorBoundary> | ||
| <Suspense | ||
| fallback={<BAICard title={t('webui.menu.Serving')} loading />} | ||
| > | ||
| <AdminServingPage /> | ||
| </Suspense> | ||
| </BAIErrorBoundary> | ||
| <WebUINavigate | ||
| to={'/admin-deployments' + location.search} | ||
| replace | ||
| /> | ||
| ); | ||
| }, | ||
| }, | ||
| { | ||
| // /admin-deployments has no nested detail route — the deployment | ||
| // detail page is shared at /deployments/:deploymentId regardless | ||
| // of the viewer's role. | ||
| path: ':serviceId', | ||
| element: ( | ||
| <Suspense fallback={<Skeleton active />}> | ||
| <EndpointDetailPage /> | ||
| </Suspense> | ||
| ), | ||
| handle: { labelKey: 'modelService.RoutingInfo' }, | ||
| Component: () => { | ||
| const { serviceId } = useParams<{ serviceId: string }>(); | ||
| const location = useLocation(); | ||
| return ( | ||
| <WebUINavigate | ||
| to={`/deployments/${serviceId}${location.search}`} | ||
| replace | ||
| /> | ||
| ); | ||
| }, | ||
| }, | ||
| ], | ||
| }, |
There was a problem hiding this comment.
/admin-serving is changed into a redirect to /admin-deployments, but /admin-deployments currently renders a stub placeholder. This removes the existing admin Serving page behavior (including the tabbed model-store management UI) and will break current admin workflows. Until the admin deployment list is implemented, consider keeping /admin-serving rendering AdminServingPage (or have /admin-deployments temporarily alias to it) rather than redirecting to an unimplemented page.
|
|
||
| // TODO(needs-backend): FR-2671 — Deployment list page (user view). | ||
| // This is a placeholder stub introduced by FR-2664 so that the new | ||
| // /deployments route can be wired before the real page lands in Phase 3. | ||
| const DeploymentListPage: React.FC = () => { | ||
| 'use memo'; | ||
| return <div>TODO: DeploymentListPage — FR-2671</div>; |
There was a problem hiding this comment.
This placeholder page renders a hard-coded "TODO" string directly to users. In this codebase, user-facing strings are typically localized via useTranslation(); shipping visible TODO content is likely unintended. Consider gating the route behind a feature flag, rendering an existing "not available"/404 view, or at least using a localized placeholder message.
| // TODO(needs-backend): FR-2671 — Deployment list page (user view). | |
| // This is a placeholder stub introduced by FR-2664 so that the new | |
| // /deployments route can be wired before the real page lands in Phase 3. | |
| const DeploymentListPage: React.FC = () => { | |
| 'use memo'; | |
| return <div>TODO: DeploymentListPage — FR-2671</div>; | |
| import { useTranslation } from 'react-i18next'; | |
| // TODO(needs-backend): FR-2671 — Deployment list page (user view). | |
| // This is a placeholder stub introduced by FR-2664 so that the new | |
| // /deployments route can be wired before the real page lands in Phase 3. | |
| const DeploymentListPage: React.FC = () => { | |
| 'use memo'; | |
| const { t } = useTranslation(); | |
| return <div>{t('deploymentListPage.placeholder', 'Deployment list is not available yet.')}</div>; |
| // TODO(needs-backend): FR-2675 — Deployment launcher page (create + edit). | ||
| // This is a placeholder stub introduced by FR-2664 so that the new | ||
| // /deployments/new and /deployments/:deploymentId/edit routes can be | ||
| // wired before the real page lands in Phase 3. | ||
| const DeploymentLauncherPage: React.FC = () => { | ||
| 'use memo'; | ||
| return <div>TODO: DeploymentLauncherPage — FR-2675</div>; | ||
| }; |
There was a problem hiding this comment.
This placeholder page renders a hard-coded "TODO" string directly to users. In this codebase, user-facing strings are typically localized via useTranslation(); shipping visible TODO content is likely unintended. Consider gating the route behind a feature flag, rendering an existing "not available"/404 view, or at least using a localized placeholder message.
| // TODO(needs-backend): FR-2681 — Deployment detail page. | ||
| // This is a placeholder stub introduced by FR-2664 so that the new | ||
| // /deployments/:deploymentId route can be wired before the real page | ||
| // lands in Phase 4. | ||
| const DeploymentDetailPage: React.FC = () => { | ||
| 'use memo'; | ||
| return <div>TODO: DeploymentDetailPage — FR-2681</div>; | ||
| }; |
There was a problem hiding this comment.
This placeholder page renders a hard-coded "TODO" string directly to users. In this codebase, user-facing strings are typically localized via useTranslation(); shipping visible TODO content is likely unintended. Consider gating the route behind a feature flag, rendering an existing "not available"/404 view, or at least using a localized placeholder message.
| // TODO(needs-backend): FR-2672 — Admin deployment list page. | ||
| // This is a placeholder stub introduced by FR-2664 so that the new | ||
| // /admin-deployments route can be wired before the real page lands in | ||
| // Phase 5. | ||
| const AdminDeploymentListPage: React.FC = () => { | ||
| 'use memo'; | ||
| return <div>TODO: AdminDeploymentListPage — FR-2672</div>; | ||
| }; |
There was a problem hiding this comment.
This placeholder page renders a hard-coded "TODO" string directly to users. In this codebase, user-facing strings are typically localized via useTranslation(); shipping visible TODO content is likely unintended. Consider gating the route behind a feature flag, rendering an existing "not available"/404 view, or at least using a localized placeholder message.
| @@ -262,19 +273,79 @@ export const mainLayoutChildRoutes: RouteObject[] = [ | |||
| <Suspense | |||
| fallback={<BAICard title={t('webui.menu.Serving')} loading />} | |||
| > | |||
| <ServingPage /> | |||
| <DeploymentListPage /> | |||
| </Suspense> | |||
| ); | |||
| }, | |||
There was a problem hiding this comment.
The new routing makes /serving a redirect to /deployments, but /deployments currently renders stub placeholder pages. This effectively removes the existing Serving UI (ServingPage + EndpointDetailPage) and will regress production functionality for users navigating via the menu or existing deep links. Consider keeping the legacy pages mounted (e.g., have /deployments temporarily render the existing ServingPage and detail page) or keep /serving as the primary route until the Deployment pages are implemented, instead of redirecting users to stubs.
b121d02 to
c0a7db6
Compare
|
Consolidated into grouped PR stack (Foundation/Components/Launcher/List/Detail). Closing this individual PR. |

Resolves FR-2664 (parent story: FR-2657; epic: FR-1368)
Summary
Phase 1 / Foundation step for migrating the Endpoint UI to the new Deployment UI. This PR wires the new route surface and legacy fallbacks so subsequent phases (FR-2671 list, FR-2675 launcher, FR-2681 detail, FR-2672 admin list) can land against a stable URL contract.
New routes
/deployments->DeploymentListPage(user view)/deployments/new->DeploymentLauncherPage(create)/deployments/:deploymentId->DeploymentDetailPage/deployments/:deploymentId/edit->DeploymentLauncherPage(edit)/admin-deployments->AdminDeploymentListPageAll four pages are stub placeholders rendering
TODO: ...PageName — FR-XXXXso the routes are mergeable before the real implementations land. Each stub carries aTODO(needs-backend)marker (well, needs-page) referencing the phase ticket.Legacy fallbacks (transient redirects)
/serving/deployments/serving/:serviceId/deployments/:serviceId/admin-serving/admin-deployments/admin-serving/:serviceId/deployments/:serviceId(shared detail page)/service/:endpointId/deployments/:endpointId/service/:endpointId/edit/deployments/:endpointId/editQuery strings are preserved through the redirects via
useLocation().search. These fallbacks are documented in the code as transient and scheduled for removal once internal links and external references have migrated./service/startand/service/update/:endpointIdare intentionally left untouched — those are live launcher paths still in use until the Deployment Launcher (FR-2675) lands.Misc
ServingPage,EndpointDetailPage,AdminServingPageimports fromroutes.tsx. The underlying page files are kept on disk for the Phase 3/4/5 implementations to reference.Verification
Checklist
TODO(needs-backend)style markers placed on stub pages with phase ticket refs