fix(FR-2820): add Active/Inactive tabs and consolidate controls in Project page#7413
fix(FR-2820): add Active/Inactive tabs and consolidate controls in Project page#7413ironAiken2 wants to merge 11 commits into
Conversation
|
|
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 backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
861fd44 to
706db66
Compare
624b2cd to
1a0fd87
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the Project management UI to split project listing by Active/Inactive status and consolidate per-row project actions into the shared table name/action-cell pattern.
Changes:
- Adds an Active/Inactive status segment and status-based GraphQL filter to
ProjectPage. - Reworks
BAIProjectTablerow actions usingBAINameActionCell, including deactivate/activate and purge flows. - Updates backend.ai-ui locale files for the new project table action/status messages.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
react/src/pages/ProjectPage.tsx |
Adds status query state, status filter merging, and the Active/Inactive segment. |
packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx |
Consolidates row controls into BAINameActionCell and adds activate/deactivate/purge mutations. |
packages/backend.ai-ui/src/locale/de.json |
Updates German project table action translations. |
packages/backend.ai-ui/src/locale/el.json |
Updates Greek project table action translations. |
packages/backend.ai-ui/src/locale/en.json |
Updates English project table action translations and purge success copy. |
packages/backend.ai-ui/src/locale/es.json |
Updates Spanish project table action translations. |
packages/backend.ai-ui/src/locale/fi.json |
Updates Finnish project table action translations. |
packages/backend.ai-ui/src/locale/fr.json |
Updates French project table action translations. |
packages/backend.ai-ui/src/locale/id.json |
Updates Indonesian project table action translations. |
packages/backend.ai-ui/src/locale/it.json |
Updates Italian project table action translations. |
packages/backend.ai-ui/src/locale/ja.json |
Updates Japanese project table action translations. |
packages/backend.ai-ui/src/locale/ko.json |
Updates Korean project table action translations. |
packages/backend.ai-ui/src/locale/mn.json |
Updates Mongolian project table action translations. |
packages/backend.ai-ui/src/locale/ms.json |
Updates Malay project table action translations. |
packages/backend.ai-ui/src/locale/pl.json |
Updates Polish project table action translations. |
packages/backend.ai-ui/src/locale/pt-BR.json |
Updates Brazilian Portuguese project table action translations. |
packages/backend.ai-ui/src/locale/pt.json |
Updates Portuguese project table action translations. |
packages/backend.ai-ui/src/locale/ru.json |
Updates Russian project table action translations. |
packages/backend.ai-ui/src/locale/th.json |
Updates Thai project table action translations. |
packages/backend.ai-ui/src/locale/tr.json |
Updates Turkish project table action translations. |
packages/backend.ai-ui/src/locale/vi.json |
Updates Vietnamese project table action translations. |
packages/backend.ai-ui/src/locale/zh-CN.json |
Updates Simplified Chinese project table action translations. |
packages/backend.ai-ui/src/locale/zh-TW.json |
Updates Traditional Chinese project table action translations. |
1a0fd87 to
f38d7f8
Compare
15b90a6 to
c2cb05f
Compare
e9f4db3 to
3c8a4b2
Compare
f38d7f8 to
1584638
Compare
…oject page Resolves #7254(FR-2820) - Add Active/Inactive tab split to the Project page BAICard, replacing the single "Project" tab. The active tab drives an `is_active` filter merged into the GraphQL query, and the redundant `is_active` BAIPropertyFilter entry is removed. - Consolidate per-row actions (edit, deactivate/restore, purge) from the standalone `controls` column into the `name` column using `BAINameActionCell`, matching the convention on other listing pages. - Add a Restore action (via Popconfirm, since restore is reversible) that calls `modify_group` with `is_active: true` for inactive projects. - Switch the purge confirmation from `modal.confirm` to `BAIConfirmModalWithInput` with the project name as the typed confirmation string, per the destructive-confirmation rule. - Remove the `is_active` and `Controls` columns from the table since tabs and BAINameActionCell handle those respectively. - Add i18n keys for Restore, RestoreProject, EditProject, etc. across all 21 locale files.
…istency with user/credential/role pages
…er tab state The deactivate/activate action choice was driven by the isActiveTab prop, which flips immediately on segment change while the GraphQL response is still loading (useDeferredValue). The result: old rows briefly show actions that don't match their actual state. UserManagement decides per-record (record.status === 'active'), so its rows stay consistent during transitions. Apply the same approach here using record.is_active, and remove the now-redundant isActiveTab prop.
1584638 to
1902adc
Compare
3c8a4b2 to
640331d
Compare
640331d to
301ac07
Compare
agatha197
left a comment
There was a problem hiding this comment.
I don't think sending all click props is good way. How about refering react/src/pages/VFolderNodeListPage.tsx?
…nameColumnActionProps Consolidate onClickProjectEditButton / onClickDeactivateProject / onClickRestoreProject / onClickPurgeProject into a single nameColumnActionProps prop (object or (value, record, index) => props), mirroring the BAIModelDeploymentNodes pattern. The name column now only renders the title; ProjectPage composes the per-row action list (edit / deactivate / activate / purge) as a closure so all mutation and side-effect logic stays in the app layer instead of crossing the backend.ai-ui library boundary via individual callbacks. - BAIProjectTable: drop 4 callback props, add nameColumnActionProps and exported BAIProjectTableNameColumnActionProps type - ProjectPage: build the action list inline, reusing existing comp:BAIProjectTable.* i18n keys (no i18n changes) - stories: keep local QueryResolver callback API, adapt internally Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The action logic was moved from the backend.ai-ui BAIProjectTable component into the WebUI ProjectPage. The action labels still used `comp:BAIProjectTable.*` keys, but that namespace belongs to the backend.ai-ui library's i18n bundle and does not resolve from the app's i18next instance — so the UI rendered raw keys (BAIProjectTable.EditProject / .Deactivate / .DeactivateProject). - ProjectPage: switch the 6 action labels from `comp:BAIProjectTable.*` to `project.*` (EditProject, Deactivate, DeactivateProject, Activate, ActivateProject; Purge already existed in project.*). - resources/i18n (21 langs): add the 5 new project.* keys, migrating the existing human-reviewed translations 1:1 from the backend.ai-ui locale. - packages/backend.ai-ui/src/locale (21 langs): delete the 14 comp:BAIProjectTable keys orphaned by the refactor (Activate, ActivateProject, AreYouSureToPurgeProject, Deactivate, DeactivateProject, EditProject, FailedToActivateProject, FailedToDeactivateProject, FailedToPurgeProject, ProjectActivated, ProjectDeactivated, ProjectPurged, Purge, PurgeProject). The 14 keys still used by the table columns are kept. Verified via /fw:i18n: all 21 languages contain the 5 migrated keys with consistent translations; no orphaned key remains in any backend.ai-ui locale; all 42 locale files pass JSON validation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
| <BAIProjectTable | ||
| projectFragment={projectNodes} | ||
| onClickProjectEditButton={onClickProjectEditButton} | ||
| nameColumnActionProps={(_value, record) => { |
There was a problem hiding this comment.
Let's use customizeColumns like other components.

Resolves #7372 (FR-2820)
Summary
Project page consolidates Active / Inactive listing into a single page with a segment toggle (matching the User page UX), and surfaces the per-row Edit / Deactivate / Restore / Purge actions through
BAINameActionCell.Changes
react/src/pages/ProjectPage.tsxBAICardheader-tab split (active/inactive).BAIRadioGroup(optionType="button") as the status segment, mirroringUserManagement.tsx.BAIFlexcolumn — no surrounding card wrapper (the page is standalone, with no sibling tabs).packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsxPopconfirm+ ad-hoc icon button row withBAINameActionCellactions (Edit / Deactivate / Restore / Purge).isActiveTabprop to switch row actions:Edit,Deactivate(popconfirm),Purge(typed-input modal).Edit,Restore(popconfirm),Purge(typed-input modal).popConfirmwithdescription = record.name— title states the action, body shows only the target name (FR-2825 copy convention).BAIDeleteConfirmModalwithrequireConfirmInput(FR-2819 convention) — replaces the previousBAIConfirmModalWithInput.i18n
comp:BAIProjectTablekeys:Restore,RestoreProject,ProjectRestored,FailedToRestoreProject,EditProject(22 locales).comp:BAIProjectTable.AreYouSureToRestoreProject(21 locales) — the simplified popconfirm body shows justrecord.name.Test plan
프로젝트 비활성화and body is the project name; OK flips the project to inactive.프로젝트 복원and body is the project name; OK flips the project back to active.BAIDeleteConfirmModalrequires typing the project name before OK enables; success removes the project and refreshes.bash scripts/verify.sh— Relay / Lint / Format / TypeScript pass for the modified files.🤖 Generated with Claude Code