Skip to content

Conversation

@ycdzj
Copy link
Contributor

@ycdzj ycdzj commented Oct 16, 2025

  • refactor(resources): add getAllSubResourcesByUser
  • refactor(resources): rm getSubResourcesByParents

Copilot AI review requested due to automatic review settings October 16, 2025 11:00
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

This PR refactors the namespace resources functionality by introducing a new method getAllSubResourcesByUser and removing the getSubResourcesByParents method. The changes improve performance and maintainability by consolidating resource retrieval logic and implementing batch permission checking.

  • Adds getAllSubResourcesByUser method to retrieve all sub-resources for a user with proper permission filtering
  • Removes the getSubResourcesByParents method and replaces its usage
  • Refactors getAllSubResources to use an iterative approach with cycle detection instead of recursion

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/wizard/stream.service.ts Updates method call to use new getAllSubResourcesByUser method
src/shared-resources/shared-resources.service.ts Adjusts parameter format for getAllSubResources call
src/resources/resources.service.ts Refactors getAllSubResources to iterative approach with cycle detection and adds documentation
src/namespace-resources/namespace-resources.service.ts Replaces getSubResourcesByParents with getAllSubResourcesByUser and optimizes permission checking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ycdzj ycdzj merged commit 27de25d into main Oct 17, 2025
4 checks passed
@ycdzj ycdzj deleted the refactor/namespaces branch October 17, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants