Skip to content

feat(FR-2577): add project admin deployments page#6698

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-14-feat_fr-2577_add_project_admin_deployments_page
Apr 30, 2026
Merged

feat(FR-2577): add project admin deployments page#6698
graphite-app[bot] merged 1 commit intomainfrom
04-14-feat_fr-2577_add_project_admin_deployments_page

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Apr 14, 2026

resolves #6697 (FR-2577)

Summary

Adds a dedicated Project Admin → Deployments page so project admins can list and delete model deployments scoped to their current project.

  • New page react/src/pages/ProjectAdminDeploymentsPage.tsx mirroring ProjectAdminUsersPage (status radio, URL-driven filter/sort, fetch-key refresh).
  • New reusable fragment component packages/backend.ai-ui/src/components/fragments/BAIModelDeploymentNodes.tsx with BAITable, column hide/show, and delete wired through BAINameActionCell.
  • Menu entry under Admin Settings → Operations → Deployments for project admins (react/src/hooks/useWebUIMenuItems.tsx) plus a new /project-admin-deployments route (react/src/routes.tsx).
  • English i18n keys added in resources/i18n/en.json and packages/backend.ai-ui/src/locale/en.json. Other locales will be handled by the i18n pass.
  • Uses the v2 projectDeployments query and the shared deleteModelDeployment mutation. No legacy endpoint_* APIs; no update/scale mutations.

Review fixes applied (from code-reviewer + lead-frontend-reviewer + pr-reviewer)

  • HIGH: Restored column sorting — dropped nested-array dataIndex on name, createdAt, updatedAt so Antd falls back to column.key and the emitted order strings match availableDeploymentSorterValues.
  • HIGH: Added updater: (store) => store.delete(record.id) to the delete mutation so deleted nodes are evicted from the Relay store immediately.
  • MEDIUM: Removed the stale okButtonProps.loading: isInflightDelete capture in modal.confirm; Antd now manages the OK button loading via the onOk promise.
  • MEDIUM: Added an allow-list parser for the URL filter query param (name, tags, endpointUrl only) so users can no longer smuggle status or AND/OR/NOT via the URL.
  • Nits: removed unused createdUserId scalar; replaced || null cast with explicit nullish check.

Test plan

  • bash scripts/verify.sh ends with === ALL PASS ===
  • Logged in as project-admin-for-default@lablup.com on the FR-2209 test server; menu item "Deployments" appears under Admin Settings → Operations
  • /project-admin-deployments route renders the table, status radio, property filter, and column settings toggle
  • With non-empty data, verify sort by name/createdAt/updatedAt produces correct orderBy in network requests
  • With non-empty data, verify delete mutation removes the row and decrements the count
  • Non-project-admin users do not see the menu entry (backend auth still enforces scope if URL is accessed directly)

Known follow-ups

  • Filter property labels in BAIGraphQLPropertyFilter use comp:BAIModelDeploymentNodes.* keys; in the current app the comp namespace is not registered at the main i18n instance and the key is shown verbatim. Consider moving the labels to a registered namespace or adding the comp namespace to the main app.
  • defaultHidden columns appear to render in the screenshot despite the flag — investigate whether the page needs a tableId / explicit columnOverrides to persist the intended default visibility.
  • Replicas column currently shows only desiredReplicaCount; currentReplicaCount requires an N+1 subquery and was intentionally deferred.

Screenshots

Project Admin Deployments (empty state, default columns)

Signed in as project-admin-for-default@lablup.com; the new "Deployments" entry appears under Admin Settings → Operations, next to Users.

list

Context after login (sider menu)

sider

Copilot AI review requested due to automatic review settings April 14, 2026 12:45
@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:XL 500~ LoC labels Apr 14, 2026
Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Coverage report for ./packages/backend.ai-ui

St.
Category Percentage Covered / Total
🟢 Statements 81.87% 429/524
🟡 Branches 70.43% 362/514
🟡 Functions 76.86% 93/121
🟢 Lines 83.19% 391/470

Test suite run success

319 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 786086e

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.65% (+0% 🔼)
1859/21499
🔴 Branches 7.84% 1187/15145
🔴 Functions
5.11% (+0.02% 🔼)
297/5807
🔴 Lines
8.39% (+0% 🔼)
1750/20867

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 786086e

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Project Admin Deployments” admin page to list and manage model deployments scoped to the current project, wiring it into routing, navigation, and shared UI fragments.

Changes:

  • Adds ProjectAdminDeploymentsPage and registers it in the main route table.
  • Adds a new project-admin menu entry (project-admin-deployments) and navigation link.
  • Introduces BAIModelDeploymentNodes fragment/table component (with delete action) and new i18n keys for the page and component.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/i18n/en.json Adds webui.menu.ProjectDeployments label for the new page/menu item (English only).
react/src/routes.tsx Registers /project-admin-deployments route and lazy-loads the new page.
react/src/pages/ProjectAdminDeploymentsPage.tsx Implements the project-scoped deployments list page with filtering/sorting/pagination.
react/src/hooks/useWebUIMenuItems.tsx Adds the new project-admin menu key and menu item link.
packages/backend.ai-ui/src/locale/en.json Adds comp:BAIModelDeploymentNodes.* English strings used by the new fragment component.
packages/backend.ai-ui/src/components/fragments/index.ts Re-exports BAIModelDeploymentNodes and sorter values from the fragments barrel.
packages/backend.ai-ui/src/components/fragments/BAIModelDeploymentNodes.tsx New shared fragment/table for deployments with delete mutation and table columns.

Comment thread resources/i18n/en.json
Comment thread packages/backend.ai-ui/src/locale/en.json
Comment thread packages/backend.ai-ui/src/components/fragments/BAIModelDeploymentNodes.tsx Outdated
@yomybaby yomybaby force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch from 3052608 to ba9ecb6 Compare April 14, 2026 12:59
yomybaby added a commit that referenced this pull request Apr 14, 2026
yomybaby added a commit that referenced this pull request Apr 14, 2026
@yomybaby yomybaby force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch from ba9ecb6 to f78ddc5 Compare April 14, 2026 13:27
@github-actions github-actions Bot added claude-batch Issues created by Claude batch workflow project-admin labels Apr 14, 2026
@yomybaby yomybaby force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch 3 times, most recently from 966cf10 to a64b7b0 Compare April 23, 2026 08:56
@yomybaby yomybaby force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch 2 times, most recently from f2d8203 to 542ec67 Compare April 30, 2026 05:53
@yomybaby yomybaby requested a review from ironAiken2 April 30, 2026 05:54
@yomybaby yomybaby force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch from 542ec67 to 4272a61 Compare April 30, 2026 06:46
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 30, 2026

Merge activity

resolves #6697 (FR-2577)

## Summary

Adds a dedicated **Project Admin → Deployments** page so project admins can list and delete model deployments scoped to their current project.

- New page `react/src/pages/ProjectAdminDeploymentsPage.tsx` mirroring `ProjectAdminUsersPage` (status radio, URL-driven filter/sort, fetch-key refresh).
- New reusable fragment component `packages/backend.ai-ui/src/components/fragments/BAIModelDeploymentNodes.tsx` with `BAITable`, column hide/show, and delete wired through `BAINameActionCell`.
- Menu entry under **Admin Settings → Operations → Deployments** for project admins (`react/src/hooks/useWebUIMenuItems.tsx`) plus a new `/project-admin-deployments` route (`react/src/routes.tsx`).
- English i18n keys added in `resources/i18n/en.json` and `packages/backend.ai-ui/src/locale/en.json`. Other locales will be handled by the i18n pass.
- Uses the v2 `projectDeployments` query and the shared `deleteModelDeployment` mutation. No legacy `endpoint_*` APIs; no update/scale mutations.

## Review fixes applied (from code-reviewer + lead-frontend-reviewer + pr-reviewer)

- **HIGH**: Restored column sorting — dropped nested-array `dataIndex` on `name`, `createdAt`, `updatedAt` so Antd falls back to `column.key` and the emitted order strings match `availableDeploymentSorterValues`.
- **HIGH**: Added `updater: (store) => store.delete(record.id)` to the delete mutation so deleted nodes are evicted from the Relay store immediately.
- **MEDIUM**: Removed the stale `okButtonProps.loading: isInflightDelete` capture in `modal.confirm`; Antd now manages the OK button loading via the `onOk` promise.
- **MEDIUM**: Added an allow-list parser for the URL `filter` query param (`name`, `tags`, `endpointUrl` only) so users can no longer smuggle `status` or `AND/OR/NOT` via the URL.
- Nits: removed unused `createdUserId` scalar; replaced `|| null` cast with explicit nullish check.

## Test plan

- [x] `bash scripts/verify.sh` ends with `=== ALL PASS ===`
- [x] Logged in as `project-admin-for-default@lablup.com` on the FR-2209 test server; menu item "Deployments" appears under Admin Settings → Operations
- [x] `/project-admin-deployments` route renders the table, status radio, property filter, and column settings toggle
- [ ] With non-empty data, verify sort by name/createdAt/updatedAt produces correct `orderBy` in network requests
- [ ] With non-empty data, verify delete mutation removes the row and decrements the count
- [ ] Non-project-admin users do not see the menu entry (backend auth still enforces scope if URL is accessed directly)

## Known follow-ups

- Filter property labels in `BAIGraphQLPropertyFilter` use `comp:BAIModelDeploymentNodes.*` keys; in the current app the `comp` namespace is not registered at the main i18n instance and the key is shown verbatim. Consider moving the labels to a registered namespace or adding the `comp` namespace to the main app.
- `defaultHidden` columns appear to render in the screenshot despite the flag — investigate whether the page needs a `tableId` / explicit `columnOverrides` to persist the intended default visibility.
- Replicas column currently shows only `desiredReplicaCount`; `currentReplicaCount` requires an N+1 subquery and was intentionally deferred.

## Screenshots

### Project Admin Deployments (empty state, default columns)
Signed in as `project-admin-for-default@lablup.com`; the new "Deployments" entry appears under **Admin Settings → Operations**, next to Users.

![list](https://raw.githubusercontent.com/lablup/backend.ai-webui/assets/images/screenshots/pr-6698/20260414-130801-project-admin-deployments-list.png)

### Context after login (sider menu)
![sider](https://raw.githubusercontent.com/lablup/backend.ai-webui/assets/images/screenshots/pr-6698/20260414-130806-project-admin-deployments-sider.png)
@graphite-app graphite-app Bot force-pushed the 04-14-feat_fr-2577_add_project_admin_deployments_page branch from 4272a61 to 786086e Compare April 30, 2026 06:51
@graphite-app graphite-app Bot merged commit 786086e into main Apr 30, 2026
10 checks passed
@graphite-app graphite-app Bot deleted the 04-14-feat_fr-2577_add_project_admin_deployments_page branch April 30, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. claude-batch Issues created by Claude batch workflow project-admin size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Project Admin Deployments page using projectDeployments

2 participants