feat(BA-5450): add project-scoped vfolder search across all layers#10595
Draft
feat(BA-5450): add project-scoped vfolder search across all layers#10595
Conversation
fregataa
added a commit
that referenced
this pull request
Mar 26, 2026
Contributor
There was a problem hiding this comment.
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_projectreturning a paginatedVFolderSearchResult-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
added a commit
that referenced
this pull request
Mar 27, 2026
c7d9b32 to
515f227
Compare
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>
b0f2f79 to
2dfd35a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProjectVFolderSearchScopefor filtering vfolders by project with existence validationsearch_in_projectacross repository, service, and processor layers usingexecute_batch_querierSearchVFoldersInProjectActionwith RBAC scope validation for project admin pageTest plan
ProjectVFolderSearchScope.to_condition()filters byVFolderRow.groupsearch_in_projectreturns paginatedVFolderSearchResultResolves BA-5450