Skip to content

Conversation

phroi
Copy link
Contributor

@phroi phroi commented Sep 13, 2025

Summary:

  • Adds a devcontainer.json to provide a reproducible development environment using the Microsoft TypeScript-Node devcontainer image.
  • Persists a shared pnpm cache to speed installs.
  • Sets up pnpm in the container (postCreateCommand) and installs dependencies on start with a frozen lockfile.
  • Runs the container as the non-root "node" user and installs recommended VS Code settings and extensions (ESLint, Prettier, Tailwind, GitHub integrations, etc.).

Why:

  • Speeds onboarding, reduces "works on my machine" issues, and standardizes editor tooling across contributors.

Love & Peace, Phroi %50

Copy link

changeset-bot bot commented Sep 13, 2025

⚠️ No Changeset found

Latest commit: 48cf9ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for apiccc ready!

Name Link
🔨 Latest commit 48cf9ac
🔍 Latest deploy log https://app.netlify.com/projects/apiccc/deploys/68c57b19039b470007e8ae10
😎 Deploy Preview https://deploy-preview-312--apiccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 88 (🟢 up 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 94 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for liveccc ready!

Name Link
🔨 Latest commit 48cf9ac
🔍 Latest deploy log https://app.netlify.com/projects/liveccc/deploys/68c57b193135a1000716f3de
😎 Deploy Preview https://deploy-preview-312--liveccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 15 (🔴 down 26 from production)
Accessibility: 88 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

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 shared pnpm cache to accelerate dependency installations and retain build artifacts across container restarts.
  • Automated Setup: Implemented postCreateCommand to install pnpm globally and postStartCommand 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 updated hexFrom to efficiently passthrough already normalized hex strings in packages/core/src/hex/index.ts.
  • Number to Hex Normalization: Modified numToHex in packages/core/src/num/index.ts to ensure canonical Hex output (prefixed 0x, 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

  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

netlify bot commented Sep 13, 2025

Deploy Preview for docsccc ready!

Name Link
🔨 Latest commit 48cf9ac
🔍 Latest deploy log https://app.netlify.com/projects/docsccc/deploys/68c57b1930c19e0008449ef6
😎 Deploy Preview https://deploy-preview-312--docsccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🟢 up 25 from production)
Accessibility: 88 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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 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.

Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for appccc ready!

Name Link
🔨 Latest commit 48cf9ac
🔍 Latest deploy log https://app.netlify.com/projects/appccc/deploys/68c57b19fa504b00086cd6bc
😎 Deploy Preview https://deploy-preview-312--appccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 61 (🟢 up 16 from production)
Accessibility: 89 (🟢 up 1 from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@phroi phroi force-pushed the feat/add-devcontainer branch from e0a2450 to 39c15e1 Compare September 13, 2025 10:00
@phroi
Copy link
Contributor Author

phroi commented Sep 13, 2025

@gemini-code-assist 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 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.

@phroi phroi force-pushed the feat/add-devcontainer branch from 39c15e1 to 483ee5b Compare September 13, 2025 11:00
@phroi
Copy link
Contributor Author

phroi commented Sep 13, 2025

@gemini-code-assist 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 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.

@phroi phroi force-pushed the feat/add-devcontainer branch from 483ee5b to d813828 Compare September 13, 2025 11:21
Copy link
Contributor Author

@phroi phroi left a comment

Choose a reason for hiding this comment

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

@phroi phroi force-pushed the feat/add-devcontainer branch from d813828 to c144ae3 Compare September 13, 2025 14:01
Copy link
Contributor Author

@phroi phroi left a comment

Choose a reason for hiding this comment

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

/gemini review

@phroi phroi force-pushed the feat/add-devcontainer branch from c144ae3 to 48cf9ac Compare September 13, 2025 14:09
@phroi
Copy link
Contributor Author

phroi commented Sep 13, 2025

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 devcontainer.json as much as possible, so that adoption is easier.

@Hanssen0 feel free to review and give feedback!

Love & Peace, Phroi %144

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