Skip to content

fix(wbfy): support Chakra CLI v2 code generation - #1286

Closed
exKAZUu wants to merge 1 commit into
mainfrom
fix/wbfy-chakra-v2
Closed

exKAZUu wants to merge 1 commit into
mainfrom
fix/wbfy-chakra-v2

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • generate a Chakra CLI v2 compatibility script for the canonical wb gen-code pipeline
  • install and trust @chakra-ui/styled-system so v2 token generation works with Bun's isolated linker

Verification

  • bun run verify-full
  • local bun start /Users/exkazuu/ghq/github.com/exKAZUu-Research/trace-dojo from packages/wbfy; install and Chakra token generation completed with the published @willbooster/wb

Generate the compatibility script and direct token-output dependency needed by
Chakra CLI v2 under Bun's isolated linker.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces support for Chakra CLI v2 within the wbfy package generator. It ensures that projects using older versions of the Chakra CLI can still leverage the canonical wb gen-code pipeline by mapping the v3-style commands to the appropriate v2 equivalents and managing the necessary dependencies for token generation.

Highlights

  • Chakra CLI v2 Compatibility: Added a compatibility script for Chakra CLI v2 to the wb gen-code pipeline, allowing it to work with the existing v3-based interface.
  • Dependency Management: Updated the package generator to automatically install and trust @chakra-ui/styled-system when Chakra CLI v2 is detected, ensuring compatibility with Bun's isolated linker.
New Features

🧠 You can now enable Memory (public preview) 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 the 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 counterproductive. 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.


Old CLI v2 finds its way, With new scripts to save the day. Tokens generated, types aligned, In Bun's linker, all is refined.

Footnotes

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

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

Copy link
Copy Markdown
Contributor

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 adds support for @chakra-ui/cli v2 by adapting scripts and dependencies. Specifically, it introduces a helper getLeadingDependencyMajor to determine the major version of a dependency, translates the canonical chakra script to use chakra-cli tokens for v2, and ensures @chakra-ui/styled-system is added to devDependencies and trustedDependencies when v2 is detected. Feedback suggests simplifying the getLeadingDependencyMajor helper function using a standard for...of loop to avoid unnecessary array allocation and improve readability.

Comment on lines +173 to 178
function getLeadingDependencyMajor(jsonObj: PackageJson, dependency: string): string | undefined {
const versionRange = dependencySectionKeys
.map((section) => jsonObj[section]?.[dependency])
.find((version): version is string => typeof version === 'string');
return /\d+/u.exec(versionRange ?? '')?.[0];
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The helper function getLeadingDependencyMajor can be simplified by using a standard for...of loop instead of mapping over all dependency sections and searching the resulting array. This avoids unnecessary array allocation and makes the code more readable and direct, adhering to the repository style guide's focus on simplicity.

function getLeadingDependencyMajor(jsonObj: PackageJson, dependency: string): string | undefined {
  for (const section of dependencySectionKeys) {
    const versionRange = jsonObj[section]?.[dependency];
    if (typeof versionRange === 'string') {
      return /\d+/u.exec(versionRange)?.[0];
    }
  }
}
References
  1. Simplify code as much as possible to eliminate redundancy. (link)

@exKAZUu exKAZUu closed this Sep 4, 2026
@exKAZUu
exKAZUu deleted the fix/wbfy-chakra-v2 branch September 4, 2026 09:22
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.

1 participant