Skip to content

refactor(@angular/cli): add type safety fallbacks and deduplicate search roots for MCP projects tool#32882

Closed
clydin wants to merge 1 commit intoangular:mainfrom
clydin:fix/mcp-projects-validation-and-opt
Closed

refactor(@angular/cli): add type safety fallbacks and deduplicate search roots for MCP projects tool#32882
clydin wants to merge 1 commit intoangular:mainfrom
clydin:fix/mcp-projects-validation-and-opt

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Mar 27, 2026

Added runtime type checks for projectType and prefix to prevent unhandled schema exceptions. Implemented deduplicateSearchRoots to filter out child directories from overlapping search trees, optimizing filesystem scans. Aggregated validation errors and reported them in the tool output for better visibility.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Mar 27, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces validation for project configuration elements (projectType, prefix, and builder) within the Angular MCP tool. It adds a validationErrors field to the output schema to report malformed or invalid schema elements. Additionally, a new utility function deduplicateSearchRoots was implemented to prevent redundant processing of overlapping search paths. Feedback was provided to refine the projectType validation check to ensure all non-undefined values are correctly validated, maintaining consistency with other property checks.

@clydin clydin force-pushed the fix/mcp-projects-validation-and-opt branch 3 times, most recently from 76c30b8 to e00d403 Compare March 27, 2026 18:12
…rch roots for MCP projects tool

Added runtime type checks for `projectType` and `prefix` to prevent unhandled schema exceptions.
Implemented `deduplicateSearchRoots` to filter out child directories from overlapping search trees, optimizing filesystem scans.
Aggregated validation errors and reported them in the tool output for better visibility.
@clydin clydin force-pushed the fix/mcp-projects-validation-and-opt branch from e00d403 to ebbb01d Compare March 27, 2026 18:33
@clydin clydin closed this Mar 27, 2026
@clydin clydin deleted the fix/mcp-projects-validation-and-opt branch March 27, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: @angular/cli target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant