Skip to content

feat(BA-5450): add project-scoped vfolder search across all layers#10595

Draft
fregataa wants to merge 5 commits intomainfrom
feat/BA-5450-vfolder-list-project-admin
Draft

feat(BA-5450): add project-scoped vfolder search across all layers#10595
fregataa wants to merge 5 commits intomainfrom
feat/BA-5450-vfolder-list-project-admin

Conversation

@fregataa
Copy link
Member

Summary

  • Add ProjectVFolderSearchScope for filtering vfolders by project with existence validation
  • Implement search_in_project across repository, service, and processor layers using execute_batch_querier
  • Wire up SearchVFoldersInProjectAction with RBAC scope validation for project admin page

Test plan

  • Verify ProjectVFolderSearchScope.to_condition() filters by VFolderRow.group
  • Verify search_in_project returns paginated VFolderSearchResult
  • Verify RBAC scope validation in processor

Resolves BA-5450

Copilot AI review requested due to automatic review settings March 26, 2026 14:52
@github-actions github-actions bot added size:L 100~500 LoC comp:manager Related to Manager component labels Mar 26, 2026
fregataa added a commit that referenced this pull request Mar 26, 2026
Copy link
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 project-scoped vfolder search capability end-to-end (action → processor → service → repository), using execute_batch_querier with a scope object that also validates project existence.

Changes:

  • Introduce ProjectVFolderSearchScope (project filter + existence check).
  • Add repository/service/processor plumbing for search_in_project returning a paginated VFolderSearchResult-style payload.
  • Add SearchVFoldersInProjectAction (+ result) and expose it through vfolder processors.

Reviewed changes

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

Show a summary per file
File Description
src/ai/backend/manager/services/vfolder/services/vfolder.py Adds search_in_project() service method wiring action → repository call.
src/ai/backend/manager/services/vfolder/processors/vfolder.py Registers a new processor for SearchVFoldersInProjectAction with RBAC scope validation.
src/ai/backend/manager/services/vfolder/actions/search_in_project.py Defines the new scope-based search action/result for project vfolders.
src/ai/backend/manager/services/vfolder/actions/init.py Re-exports the new action/result.
src/ai/backend/manager/repositories/vfolder/types.py Adds ProjectVFolderSearchScope with existence validation and group filter condition.
src/ai/backend/manager/repositories/vfolder/repository.py Implements search_in_project() using execute_batch_querier.
src/ai/backend/manager/data/vfolder/types.py Introduces VFolderSearchResult data structure (items + pagination metadata).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fregataa fregataa marked this pull request as draft March 26, 2026 15:52
fregataa added a commit that referenced this pull request Mar 27, 2026
@fregataa fregataa force-pushed the feat/BA-5450-vfolder-list-project-admin branch from c7d9b32 to 515f227 Compare March 27, 2026 01:50
fregataa and others added 5 commits March 27, 2026 13:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sult

ActionResult now extends VFolderScopeActionResult instead of
BaseActionResult, enabling ScopeActionProcessor in the processor
layer without cast workarounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace raw project_id field with ProjectVFolderSearchScope object
to align with BA-5458 pattern. Service passes action.scope directly
to repository instead of creating SearchScope internally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fregataa fregataa force-pushed the feat/BA-5450-vfolder-list-project-admin branch from b0f2f79 to 2dfd35a Compare March 27, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants