Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions react/src/hooks/useWebUIMenuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const VALID_MENU_KEYS = [
'summary', // alias to dashboard for backward compatibility
'session',
'job', // alias to session for backward compatibility
'serving',
'deployments',
'model-store',
'ai-agent',
'chat',
Expand All @@ -101,7 +101,7 @@ export const VALID_MENU_KEYS = [
'scheduler',
'resource-policy',
'reservoir',
'admin-serving',
'admin-deployments',
'admin-dashboard',
'admin-data',
'project-admin-users',
Expand All @@ -126,7 +126,7 @@ const ALL_ADMIN_PAGE_KEYS: ReadonlySet<string> = new Set([
'scheduler',
'resource-policy',
'reservoir',
'admin-serving',
'admin-deployments',
'admin-dashboard',
'admin-data',
'project-admin-users',
Expand All @@ -141,13 +141,13 @@ const ALL_ADMIN_PAGE_KEYS: ReadonlySet<string> = new Set([
]);

// Admin-category page keys reachable by a project admin (3-tier admin gating).
// Project admins see Sessions, Serving, Data (vfolders) and Members within the
// admin category. Other admin pages remain visible only to domain admins or
// Project admins see Sessions, Deployments, Data (vfolders) and Members within
// the admin category. Other admin pages remain visible only to domain admins or
// superadmins. Kept as a plain array so it can be exported and reused (e.g. for
// per-page route gating in follow-up PRs).
export const PROJECT_ADMIN_PAGE_KEYS = [
// 'admin-session',
// 'admin-serving',
// 'admin-deployments',
// 'admin-data',
'project-admin-users',
] as const;
Expand All @@ -158,7 +158,7 @@ const PROJECT_ADMIN_PAGE_KEY_SET: ReadonlySet<string> = new Set(

// Page keys that additionally require superadmin role
const SUPERADMIN_ONLY_PAGE_KEYS: ReadonlySet<string> = new Set([
'admin-serving',
'admin-deployments',
'admin-dashboard',
'admin-data',
'agent',
Expand Down Expand Up @@ -268,10 +268,10 @@ export const useWebUIMenuItems = (props?: UseWebUIMenuItemsProps) => {
'workload',
),
createMenuItem(
'/serving',
t('webui.menu.Serving'),
'/deployments',
t('webui.menu.Deployments'),
<BAIEndpointsIcon style={{ color: token.colorPrimary }} />,
'serving',
'deployments',
'service',
),
Comment on lines +271 to 276
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

This changes the main menu item route from /serving to /deployments and the key from serving to deployments, but the app routing and many in-app links still point to /serving (e.g. react/src/routes.tsx defines path: '/serving' and several components navigate to /serving/...). As-is, clicking this sidebar item will navigate to a route that doesn't exist. Either keep the path/key as /serving/serving and only change the displayed label to “Deployments”, or update routes.tsx and all /serving navigations (ideally with redirects for backward compatibility).

Copilot uses AI. Check for mistakes.
createMenuItem(
Expand Down Expand Up @@ -379,10 +379,12 @@ export const useWebUIMenuItems = (props?: UseWebUIMenuItemsProps) => {
},
isSuperAdmin && {
label: (
<WebUILink to="/admin-serving">{t('webui.menu.Serving')}</WebUILink>
<WebUILink to="/admin-deployments">
{t('webui.menu.Deployments')}
</WebUILink>
),
icon: <BAIEndpointsIcon style={{ color: token.colorInfo }} />,
key: 'admin-serving' as MenuKeys,
key: 'admin-deployments' as MenuKeys,
group: 'admin-operations' as AdminMenuGroupName,
},
Comment on lines 381 to 389
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The admin menu link/key was changed to /admin-deployments + admin-deployments, but routing still registers /admin-serving (see react/src/routes.tsx) and related pages/components still reference /admin-serving. This will make the admin menu item lead to a 404. Please update the router and all /admin-serving references (and consider a redirect), or keep the existing /admin-serving path/key and only rename the label.

Copilot uses AI. Check for mistakes.
{
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/StartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const StartPage: React.FC = () => {
enableModelFolders && {
id: 'modelService',
rowSpan: 3,
requiredMenuKey: 'serving',
requiredMenuKey: 'deployments',
columnSpan: 1,
columnOffset: { 6: 0, 4: 0 },
data: {
Expand Down
Loading