Skip to content

Conversation

@7HR4IZ3
Copy link

@7HR4IZ3 7HR4IZ3 commented Dec 28, 2025

Signed-off-by: 7HR4IZ3 [email protected]

@gemini-code-assist
Copy link

Summary of Changes

Hello @7HR4IZ3, 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 a major overhaul of the project's build infrastructure by transitioning from Webpack to Esbuild. The primary goal is to enhance build performance and developer experience. Additionally, the plugin loading system has been made more resilient by incorporating timeout mechanisms and better handling of failed plugin loads, ensuring a more stable application startup.

Highlights

  • Build System Migration: The project's build system has been migrated from Webpack to Esbuild, aiming for significantly faster build times. This involves adding new dependencies and a dedicated Esbuild utility script.
  • Plugin Loading Enhancements: The plugin loading mechanism has been improved to include timeout handling and the ability to mark and manage 'broken' plugins, preventing repeated failed load attempts and offering a way to clear these marks.
  • Dependency Updates: Several development dependencies have been updated, including nanoid, postcss, picocolors, and source-map-js, along with the addition of browserslist-to-esbuild and meow.
  • Build Script Refactoring: A new esbuild.js utility script has been introduced to orchestrate the build process, handling JavaScript, CSS (SASS/PostCSS), and asset bundling, replacing the previous Webpack configuration.
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

@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 successfully replaces Webpack with esbuild, which should significantly improve build times. The introduction of a dedicated esbuild configuration script is well-structured. Additionally, the changes to the plugin loading mechanism, such as adding timeouts and tracking broken plugins, are excellent improvements for the application's robustness. I have a couple of suggestions regarding the new build configuration and the plugin loading logic to enhance stability and prevent potential issues.

Comment on lines +432 to +436
[onPluginsLoadCompleteCallback]() {
for (const key in this.#pluginWatchers) {
this.#pluginWatchers[key].reject();
}
}

Choose a reason for hiding this comment

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

medium

This method correctly rejects promises for plugins that didn't load. However, there are a couple of improvements that could be made:

  1. It's good practice to reject promises with an Error object to provide more context for debugging.
  2. The #pluginWatchers object is not cleared after rejecting the promises. This could lead to a memory leak, as watchers for failed plugins will persist.

I suggest modifying this method to include an error message and to clear the watchers.

	[onPluginsLoadCompleteCallback]() {
		for (const pluginId in this.#pluginWatchers) {
			this.#pluginWatchers[pluginId].reject(
				new Error(`Plugin '${pluginId}' failed to load.`),
			);
		}
		this.#pluginWatchers = {};
	}

Comment on lines +103 to +111
build.onResolve({ filter: /^crypto$/ }, () => ({
path: "crypto",
namespace: emptyNamespace,
}));

build.onLoad({ filter: /.*/, namespace: emptyNamespace }, () => ({
contents: "export default {};",
loader: "js",
}));

Choose a reason for hiding this comment

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

medium

Stubbing the Node.js crypto module is a common practice for browser bundles, but it can lead to runtime errors if any dependency strictly requires it. While this project uses crypto-js, could you please confirm that no functionality is broken by providing an empty module for crypto? It might be safer to use a browser-compatible polyfill if any part of the application or its dependencies relies on the Node.js crypto API.

@UnschooledGamer
Copy link
Member

UnschooledGamer commented Dec 28, 2025

The Plugin Callbacks code Need to be excluded from this PR.

CC: @Acode-Foundation/acode

@7HR4IZ3
Copy link
Author

7HR4IZ3 commented Dec 28, 2025

My bad, i'll recreate this

@7HR4IZ3 7HR4IZ3 closed this Dec 28, 2025
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.

2 participants