-
Notifications
You must be signed in to change notification settings - Fork 31
feat(tooling): add devcontainer environment configuration #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for apiccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for liveccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @phroi, 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 significantly enhances the developer experience by introducing a standardized dev container configuration, which streamlines onboarding and ensures consistent tooling across contributors. Concurrently, it refines core utility functions in the @ckb-ccc/core
package, specifically improving hex string validation and number-to-hex conversion for better data integrity and canonical representation.
Highlights
- Dev Container Setup: Introduced a
devcontainer.json
to establish a reproducible development environment using a Microsoft TypeScript-Node image. - Performance Optimization: Configured persistent volumes for
node_modules
,dist
, and a sharedpnpm
cache to accelerate dependency installations and retain build artifacts across container restarts. - Automated Setup: Implemented
postCreateCommand
to installpnpm
globally andpostStartCommand
to install dependencies with a frozen lockfile, ensuring a consistent setup. - Standardized Tooling: Enforced recommended VS Code settings (e.g.,
editor.formatOnSave
, ESLint integration) and pre-installed essential extensions (e.g., ESLint, Prettier, Tailwind, GitHub integrations) within the dev container. - Hex Utility Enhancements: Added an
isHex
validation function and updatedhexFrom
to efficiently passthrough already normalized hex strings inpackages/core/src/hex/index.ts
. - Number to Hex Normalization: Modified
numToHex
inpackages/core/src/num/index.ts
to ensure canonical Hex output (prefixed0x
, even length, lowercase digits) and added validation for non-negative input values.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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
-
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. ↩
✅ Deploy Preview for docsccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 a development container configuration, which is a great step towards standardizing the development environment and simplifying onboarding for new contributors. The configuration is well-structured, with persisted volumes for performance and a good set of default extensions and settings.
My review includes a couple of suggestions for improvement: one to refine a command in the devcontainer.json
for better precision, and another to simplify a utility function in the core library using a regular expression.
I also noticed that this PR includes changes to the core library (hexFrom
and numToHex
functions) alongside the tooling changes for the devcontainer. While these changes seem correct and beneficial, it's generally a good practice to keep pull requests focused on a single logical change. This makes them easier to review and understand. In the future, it would be better to submit tooling changes and library changes in separate PRs. The PR description also only mentions the devcontainer changes, which can be a bit confusing.
✅ Deploy Preview for appccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e0a2450
to
39c15e1
Compare
@gemini-code-assist review |
There was a problem hiding this 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 a devcontainer configuration, which is a great step towards standardizing the development environment and improving the onboarding experience. The configuration is well-structured and includes useful settings and extensions. I've identified a couple of areas for improvement in .devcontainer/devcontainer.json
to enhance reproducibility and correctness, particularly around how pnpm is installed and how its cache is managed. My suggestions aim to make the devcontainer even more robust and reliable.
39c15e1
to
483ee5b
Compare
@gemini-code-assist review |
There was a problem hiding this 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 a devcontainer configuration to create a standardized and reproducible development environment. The configuration is well-structured, using a standard TypeScript-Node image, persisting node_modules
and the pnpm
cache with volumes, and pre-installing useful VS Code extensions. My review includes a critical suggestion to remove a dangerous file ownership command, along with recommendations to pin the base image version for better reproducibility and to align the implementation with the stated goal of persisting build artifacts.
483ee5b
to
d813828
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gemini-code-assist review
d813828
to
c144ae3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/gemini review
c144ae3
to
48cf9ac
Compare
I tried to follow our overlord indications, but as expected most of them were wrong and difficult to debug. I tried to simplify and document this @Hanssen0 feel free to review and give feedback! Love & Peace, Phroi %144 |
Summary:
Why:
Love & Peace, Phroi %50