Skip to content

fix(FR-2914): scope deployment add-revision model folder picker to current project#7465

Draft
agatha197 wants to merge 1 commit into
mainfrom
fix/FR-2914-add-revision-model-folder-current-project
Draft

fix(FR-2914): scope deployment add-revision model folder picker to current project#7465
agatha197 wants to merge 1 commit into
mainfrom
fix/FR-2914-add-revision-model-folder-current-project

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented May 18, 2026

Resolves #7464 (FR-2914)

Summary

  • DeploymentAddRevisionModal 의 preset mode / advanced(custom) mode 양쪽 model folder picker 를 BAIProjectVfolderSelect (MODEL_STORE project 강제) 에서 BAIVFolderSelect (current project) 로 교체.
  • currentProjectId={useCurrentProjectValue().id}, filter='usage_mode == "model"', excludeDeleted, valuePropName="row_id" 로 호출 — row_id 를 쓰면 form value 가 기존 prefill (rev.modelMountConfig.vfolderId, dashed UUID) 와 submit (convertToUUID(values.modelFolderId)) 흐름과 그대로 호환됨.
  • Add-revision 흐름에서는 사용자의 현재 프로젝트 vfolder 를 골라야 하는 것이 자연스럽고, 다른 model deployment UI (ServiceLauncherPageContent, ModelCardDeployModal) 와도 일관됨.
  • Dead code 가 된 deployment.metadata.projectId 필드를 query 에서 제거.
  • (Drive-by) Pre-commit lint hook 통과를 위해 VFolderNodes.tsx 의 미사용 Alert import 제거 — --max-warnings=0 으로 동작하는 lint-staged 가 전체 ./src 를 검사하기 때문에 이 cleanup 없이 어떤 commit 도 land 불가.

Test plan

  • Deployment 상세 페이지에서 "Add Revision" 모달을 열고 Preset 탭에서 Model Folder 선택지가 현재 프로젝트의 vfolder 로 나타나는지 확인
  • 같은 모달의 Advanced (custom) 탭에서도 동일하게 현재 프로젝트의 vfolder 가 보이는지 확인
  • 두 모드 모두 vfolder 선택 → preset/custom 입력 후 add 정상 동작 확인
  • Advanced 탭에서 "Load current revision" 으로 기존 vfolder 가 모달 위에 prefill 되는지 확인

@github-actions github-actions Bot added the size:S 10~30 LoC label May 18, 2026
Copy link
Copy Markdown
Contributor Author

agatha197 commented May 18, 2026


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 May 18, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.51% 1785 / 27379
🔵 Statements 5.36% 1980 / 36910
🔵 Functions 5.25% 296 / 5634
🔵 Branches 3.74% 1293 / 34569
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/DeploymentAddRevisionModal.tsx 0% 0% 0% 0% 129-1623
react/src/components/VFolderNodes.tsx 0% 0% 0% 0% 51-691
Generated in workflow #833 for commit 44be402 by the Vitest Coverage Report Action

@agatha197 agatha197 force-pushed the fix/FR-2914-add-revision-model-folder-current-project branch from 6c9f7ff to bdb1ea9 Compare May 18, 2026 09:31
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:S 10~30 LoC labels May 18, 2026
@agatha197 agatha197 force-pushed the fix/FR-2914-add-revision-model-folder-current-project branch from bdb1ea9 to 806865e Compare May 18, 2026 09:36
@github-actions github-actions Bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

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

Status Category Percentage Covered / Total
🔵 Lines 8.03% 362 / 4506
🔵 Statements 7.17% 411 / 5728
🔵 Functions 8.93% 94 / 1052
🔵 Branches 6.36% 362 / 5690
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/backend.ai-ui/src/components/fragments/BAIVFolderSelect.tsx 0% 0% 0% 0% 52-375
Generated in workflow #833 for commit 44be402 by the Vitest Coverage Report Action

@agatha197 agatha197 force-pushed the fix/FR-2914-add-revision-model-folder-current-project branch from 806865e to 44be402 Compare May 18, 2026 10:12
@agatha197 agatha197 marked this pull request as ready for review May 18, 2026 10:12
Copilot AI review requested due to automatic review settings May 18, 2026 10:12
@agatha197 agatha197 marked this pull request as draft May 18, 2026 10:12
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 scopes the deployment add-revision model folder picker to the active project instead of the model-store project, aligning the flow with current-project deployment behavior.

Changes:

  • Replaces BAIProjectVfolderSelect with BAIVFolderSelect in both preset and custom add-revision modes.
  • Removes unused deployment metadata.projectId query field.
  • Allows BAIVFolderSelect consumers to override labelRender; removes an unused Alert import.

Reviewed changes

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

File Description
react/src/components/DeploymentAddRevisionModal.tsx Updates model folder selection to use current project vfolders and removes dead query field.
packages/backend.ai-ui/src/components/fragments/BAIVFolderSelect.tsx Adds support for caller-provided labelRender.
react/src/components/VFolderNodes.tsx Removes unused Alert import.
Comments suppressed due to low confidence (2)

react/src/components/DeploymentAddRevisionModal.tsx:1337

  • If currentProjectId is null/undefined, BAIVFolderSelect receives no scopeId and falls back to an unscoped vfolder_nodes query, which can list folders outside the active project. The previous picker was disabled until its project id existed; keep the same guard here (for example, disable or avoid rendering the select until currentProjectId is available) so the add-revision picker cannot briefly expose/select cross-project folders.
            <BAIVFolderSelect
              currentProjectId={currentProjectId ?? undefined}
              excludeDeleted
              filter='usage_mode == "model"'

react/src/components/DeploymentAddRevisionModal.tsx:1337

  • This replacement drops the previous status: READY constraint. With only excludeDeleted, folders in states such as PERFORMING, CLONING, or ERROR are still returned by vfolder_nodes, so the user can select a model folder that is not ready to be mounted for the revision. Keep the ready-status filter (for example, include status == "READY" with the usage-mode filter) to preserve the old behavior and match the launcher’s ready-only model folder picker.
              excludeDeleted
              filter='usage_mode == "model"'

Comment on lines +1277 to 1283
<BAIVFolderSelect
currentProjectId={currentProjectId ?? undefined}
excludeDeleted
filter='usage_mode == "model"'
valuePropName="row_id"
style={{ width: '100%' }}
/>
<BAIVFolderSelect
currentProjectId={currentProjectId ?? undefined}
excludeDeleted
filter='usage_mode == "model"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scope deployment add-revision model folder picker to current project

2 participants