Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 5, 2026

Summary

  • Add root vitest.config.ts with projects array (replaces deprecated workspace feature)
  • Add name property to each project's vitest.config.ts for filtering with --project
  • Update package.json test scripts to use vitest projects configuration
  • Add vitest to root devDependencies

This addresses the Vitest warning about having 5+ config files impacting performance by running all projects in a single Vitest process using the new test.projects configuration (introduced in Vitest 3.2 as replacement for workspace).

Test plan

  • Verified npm run test:unit runs all projects
  • Verified npm run test:packages runs only lib tests
  • Verified npm run test:server runs only server tests
  • Verified individual project filtering works (--project=model-resolver)
  • Verified CI workflows use npm scripts (no changes needed)

🤖 Generated with Claude Code

- Add root vitest.config.ts with projects array (replaces deprecated workspace)
- Add name property to each project's vitest.config.ts for filtering
- Update package.json test scripts to use vitest projects
- Add vitest to root devDependencies

This addresses the Vitest warning about multiple configs impacting
performance by running all projects in a single Vitest process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the project's testing infrastructure by adopting Vitest's projects configuration, replacing the older, deprecated workspace feature. This change streamlines test execution, allowing all tests to run within a single Vitest process for improved performance and better management of test suites across different modules. It also updates the primary package.json test commands to align with this new configuration, providing more granular control over which tests are run.

Highlights

  • Vitest Projects Adoption: The testing setup has been migrated from the deprecated Vitest workspace feature to the new projects configuration, centralizing test execution and improving performance.
  • Individual Project Naming: Each vitest.config.ts file for libraries and the server now includes a name property, enabling precise filtering and execution of tests for specific projects using the --project flag.
  • Updated Test Scripts: The package.json has been updated with new and modified test scripts that leverage the vitest run --project= command for more efficient and targeted test execution, including new test:unit and test:unit:watch commands.
  • Root Vitest Dependency: The vitest package has been added as a devDependency to the root package.json, supporting the new centralized configuration.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@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 is a great refactoring to adopt the modern projects feature in Vitest, which should improve performance as noted. The changes look correct and align with the goal of replacing the deprecated workspace functionality. I have a couple of suggestions to further improve the maintainability of the new test configuration, mainly around using glob patterns to avoid manually updating lists of projects in the future. Overall, a solid improvement.

package.json Outdated
"test:server:coverage": "npm run test:cov --workspace=apps/server",
"test:packages": "npm run test -w @automaker/types -w @automaker/utils -w @automaker/prompts -w @automaker/platform -w @automaker/model-resolver -w @automaker/dependency-resolver -w @automaker/git-utils --if-present",
"test:all": "npm run test:packages && npm run test:server",
"test:packages": "vitest run --project=utils --project=platform --project=prompts --project=model-resolver --project=dependency-resolver --project=git-utils",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This command is quite long and lists all package projects explicitly. This could become difficult to maintain as more packages are added. A more maintainable approach would be to create a separate configuration file for testing packages.

For example, you could create a vitest.packages.config.ts file in the root with this content:

// vitest.packages.config.ts
import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    projects: ['libs/*'],
  },
});

Then you could simplify the script to use this new config file.

Suggested change
"test:packages": "vitest run --project=utils --project=platform --project=prompts --project=model-resolver --project=dependency-resolver --project=git-utils",
"test:packages": "vitest run -c vitest.packages.config.ts",

Address PR review feedback:
- Use 'libs/*/vitest.config.ts' glob to auto-discover lib projects
- Simplify test:packages script to use --project='!server' exclusion
- New libs with vitest.config.ts will be automatically included

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex self-assigned this Jan 5, 2026
@Shironex Shironex added the Refactor A complete logic rewrite is requested or being performed for an issue. label Jan 5, 2026
@Shironex
Copy link
Collaborator Author

Shironex commented Jan 5, 2026

@gemini-code-assist re-review

Copy link
Contributor

@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 refactors the project's test setup to leverage Vitest's project configuration, moving from npm run test --workspace commands to vitest run --project commands. The changes include adding a name property to the vitest.config.ts files within various apps and libs directories, creating a new root vitest.config.ts to define test projects using glob patterns, and updating package.json scripts to reflect these changes, along with adding vitest as a dev dependency. Review comments noted that the libs/types package might no longer have its tests executed due to the new project discovery mechanism, as no vitest.config.ts was added for it, and suggested making the apps/server project path more explicit in the root vitest.config.ts for consistency.

Address PR review feedback for consistency - use full path
'apps/server/vitest.config.ts' instead of just 'apps/server'.

Note: libs/types has no tests (type definitions only), so it
doesn't need a vitest.config.ts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex merged commit d4649ec into v0.8.0rc Jan 5, 2026
6 checks passed
@Shironex Shironex deleted the refactor/improve-vitest-configuration branch January 5, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor A complete logic rewrite is requested or being performed for an issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants