Skip to content

fix(FR-2820): add Active/Inactive tabs and consolidate controls in Project page#7372

Closed
ironAiken2 wants to merge 1 commit into
mainfrom
worktree-agent-a23fb8f8
Closed

fix(FR-2820): add Active/Inactive tabs and consolidate controls in Project page#7372
ironAiken2 wants to merge 1 commit into
mainfrom
worktree-agent-a23fb8f8

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented May 12, 2026

Resolves #7254(FR-2820)

Summary

  • 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.

Verification

  • Relay: PASS
  • Lint: PASS
  • Format: PASS
  • TypeScript: 296 errors (all pre-existing in unrelated files, same count as main)

Copilot AI review requested due to automatic review settings May 12, 2026 07:25
Copy link
Copy Markdown
Contributor 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.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 12, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 12, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)

Status Category Percentage Covered / Total
🔵 Lines 8.43% 361 / 4281
🔵 Statements 7.48% 410 / 5478
🔵 Functions 9.27% 94 / 1013
🔵 Branches 6.73% 362 / 5373
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx 0% 0% 0% 0% 25-387
Generated in workflow #563 for commit 17449a5 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.46% 1783 / 27597
🔵 Statements 5.31% 1978 / 37219
🔵 Functions 5.18% 296 / 5708
🔵 Branches 3.71% 1293 / 34767
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/pages/ProjectPage.tsx 0% 0% 0% 0% 45-283
Generated in workflow #563 for commit 17449a5 by the Vitest Coverage Report Action

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

This PR updates the Project page UX by introducing Active/Inactive tabs (implemented as a status query param + server-side is_active filter) and consolidates per-project actions into the name column using BAINameActionCell, including a new Restore action for inactive projects.

Changes:

  • Add Active/Inactive tabs on ProjectPage and enforce tab-dependent is_active filtering via mergeFilterValues().
  • Refactor BAIProjectTable actions into the name cell; add “Restore project” flow for inactive tab and a typed-confirm purge modal.
  • Update backend.ai-ui locale keys for the new/changed actions/messages.

Reviewed changes

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

Show a summary per file
File Description
react/src/pages/ProjectPage.tsx Adds Active/Inactive tabs via query params and applies tab-dependent is_active filter when querying projects.
packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx Consolidates action controls into BAINameActionCell, adds restore action and typed purge confirmation modal.
packages/backend.ai-ui/src/locale/en.json Adds/updates English strings for restore/edit actions and purge/restored messages.
packages/backend.ai-ui/src/locale/de.json Adds new project table strings (restore/edit/etc.) for German locale.
packages/backend.ai-ui/src/locale/el.json Adds new project table strings (restore/edit/etc.) for Greek locale.
packages/backend.ai-ui/src/locale/es.json Adds new project table strings (restore/edit/etc.) for Spanish locale.
packages/backend.ai-ui/src/locale/fi.json Adds new project table strings (restore/edit/etc.) for Finnish locale.
packages/backend.ai-ui/src/locale/fr.json Adds new project table strings (restore/edit/etc.) for French locale.
packages/backend.ai-ui/src/locale/id.json Adds new project table strings (restore/edit/etc.) for Indonesian locale.
packages/backend.ai-ui/src/locale/it.json Adds new project table strings (restore/edit/etc.) for Italian locale.
packages/backend.ai-ui/src/locale/ja.json Adds new project table strings (restore/edit/etc.) for Japanese locale.
packages/backend.ai-ui/src/locale/ko.json Adds new project table strings (restore/edit/etc.) for Korean locale.
packages/backend.ai-ui/src/locale/mn.json Adds new project table strings (restore/edit/etc.) for Mongolian locale.
packages/backend.ai-ui/src/locale/ms.json Adds new project table strings (restore/edit/etc.) for Malay locale.
packages/backend.ai-ui/src/locale/pl.json Adds new project table strings (restore/edit/etc.) for Polish locale.
packages/backend.ai-ui/src/locale/pt.json Adds new project table strings (restore/edit/etc.) for Portuguese locale.
packages/backend.ai-ui/src/locale/pt-BR.json Adds new project table strings (restore/edit/etc.) for Brazilian Portuguese locale.
packages/backend.ai-ui/src/locale/ru.json Adds new project table strings (restore/edit/etc.) for Russian locale.
packages/backend.ai-ui/src/locale/th.json Adds new project table strings (restore/edit/etc.) for Thai locale.
packages/backend.ai-ui/src/locale/tr.json Adds new project table strings (restore/edit/etc.) for Turkish locale.
packages/backend.ai-ui/src/locale/vi.json Adds new project table strings (restore/edit/etc.) for Vietnamese locale.
packages/backend.ai-ui/src/locale/zh-CN.json Adds new project table strings (restore/edit/etc.) for Simplified Chinese locale.
packages/backend.ai-ui/src/locale/zh-TW.json Adds new project table strings (restore/edit/etc.) for Traditional Chinese locale.

Comment thread packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx
Comment thread packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx
Comment thread packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx
Comment thread packages/backend.ai-ui/src/locale/zh-CN.json
Comment thread packages/backend.ai-ui/src/locale/zh-TW.json
Comment thread packages/backend.ai-ui/src/locale/fr.json
Comment thread packages/backend.ai-ui/src/locale/fi.json
Comment thread packages/backend.ai-ui/src/locale/es.json
Comment thread packages/backend.ai-ui/src/locale/el.json
Comment thread packages/backend.ai-ui/src/locale/de.json
…oject page

Resolves #7254(FR-2820)

## Summary
- 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.
@ironAiken2
Copy link
Copy Markdown
Contributor Author

Superseded by #7413 — rebased onto FR-2819/FR-2825 stack and converted active/inactive tabs to BAIRadioGroup segment.

@ironAiken2 ironAiken2 closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project page (/project) — add Active/Inactive tabs, restore action, and consolidate controls into NameCell

3 participants