Feature engineering improvements #376

Merged
LukeGus merged 20 commits from feature-engineering-improvements into dev-1.8.0 2025-10-08 01:06:01 +00:00
LukeGus commented 2025-10-08 00:50:25 +00:00 (Migrated from github.com)
No description provided.
gemini-code-assist[bot] commented 2025-10-08 00:51:14 +00:00 (Migrated from github.com)

Summary of Changes

Hello @LukeGus, 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 project's development workflow and code maintainability by integrating and configuring various code quality tools. It establishes clear standards for commit messages, code formatting, and editor settings. Concurrently, the PR refactors error handling patterns across the application, simplifying catch blocks and removing redundant code, which contributes to a more streamlined and robust codebase. The changes also include an adjustment to the target Node.js version and updates to development dependencies.

Highlights

  • Code Quality Tooling Setup: Introduced new configuration files for commit linting (.commitlintrc.json, .husky/commit-msg), code style (.editorconfig, .prettierrc, .prettierignore), and Git hooks (.husky/pre-commit, lint-staged) to enforce consistent code standards and commit message conventions. VS Code recommendations were also added for relevant extensions.
  • Node.js Version Downgrade: The recommended Node.js version in .nvmrc has been updated from 22 to 20.
  • Simplified Error Handling: Numerous catch (error) blocks across backend and UI files have been simplified to catch or catch (e) with explicit comments to ignore errors, aiming for cleaner and more focused error management in specific contexts.
  • Code Cleanup and Refactoring: Removed unused imports (e.g., AuthManager, NextFunction, jwt, UserCrypto, nanoid, crypto) and variables, and refined OIDC token verification logic. Several API routes in src/backend/ssh/file-manager.ts and src/backend/database/routes/credentials.ts were updated to remove hostId and userId from request body destructuring, implying these are now derived from authentication or session.
  • Prettier Configuration Update: The .prettierrc file now includes explicit rules for semi, singleQuote, tabWidth, trailingComma, printWidth, arrowParens, and endOfLine, and .prettierignore has been expanded to cover more build artifacts and dependency files.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/pr-check.yml
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.


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

## Summary of Changes Hello @LukeGus, I'm Gemini Code Assist[^1]! 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 project's development workflow and code maintainability by integrating and configuring various code quality tools. It establishes clear standards for commit messages, code formatting, and editor settings. Concurrently, the PR refactors error handling patterns across the application, simplifying `catch` blocks and removing redundant code, which contributes to a more streamlined and robust codebase. The changes also include an adjustment to the target Node.js version and updates to development dependencies. ### Highlights * **Code Quality Tooling Setup**: Introduced new configuration files for commit linting (`.commitlintrc.json`, `.husky/commit-msg`), code style (`.editorconfig`, `.prettierrc`, `.prettierignore`), and Git hooks (`.husky/pre-commit`, `lint-staged`) to enforce consistent code standards and commit message conventions. VS Code recommendations were also added for relevant extensions. * **Node.js Version Downgrade**: The recommended Node.js version in `.nvmrc` has been updated from `22` to `20`. * **Simplified Error Handling**: Numerous `catch (error)` blocks across backend and UI files have been simplified to `catch` or `catch (e)` with explicit comments to ignore errors, aiming for cleaner and more focused error management in specific contexts. * **Code Cleanup and Refactoring**: Removed unused imports (e.g., `AuthManager`, `NextFunction`, `jwt`, `UserCrypto`, `nanoid`, `crypto`) and variables, and refined OIDC token verification logic. Several API routes in `src/backend/ssh/file-manager.ts` and `src/backend/database/routes/credentials.ts` were updated to remove `hostId` and `userId` from request body destructuring, implying these are now derived from authentication or session. * **Prettier Configuration Update**: The `.prettierrc` file now includes explicit rules for `semi`, `singleQuote`, `tabWidth`, `trailingComma`, `printWidth`, `arrowParens`, and `endOfLine`, and `.prettierignore` has been expanded to cover more build artifacts and dependency files. <details> <summary><b>Ignored Files</b></summary> * **Ignored by pattern:** `.github/workflows/**` (1) * .github/workflows/pr-check.yml </details> <details> <summary><b>Using Gemini Code Assist</b></summary> <br> The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips. <b>Invoking Gemini</b> 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. <b>Customization</b> 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](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). <b>Limitations & Feedback</b> Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: 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](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG). <b>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](https://cloud.google.com/products/gemini/code-assist).</b> </details> [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
gemini-code-assist[bot] (Migrated from github.com) reviewed 2025-10-08 00:53:08 +00:00
gemini-code-assist[bot] (Migrated from github.com) left a comment

Code Review

This pull request introduces a lot of great improvements for developer experience and code quality, such as adding linting, formatting, and commit hooks. The code cleanups by removing unused variables and improving error handling are also very welcome. I've found one area for improvement in the lint-staged configuration.

## Code Review This pull request introduces a lot of great improvements for developer experience and code quality, such as adding linting, formatting, and commit hooks. The code cleanups by removing unused variables and improving error handling are also very welcome. I've found one area for improvement in the `lint-staged` configuration.
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-08 00:53:08 +00:00

medium

The lint-staged configuration is a great addition for maintaining code style. To further improve code quality and catch potential issues early, it's highly recommended to also run ESLint as part of the pre-commit hook.

This ensures that files are not only formatted but also adhere to the project's linting rules before being committed.

    "*.{js,jsx,ts,tsx}": [
      "eslint --fix",
      "prettier --write"
    ],
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) The `lint-staged` configuration is a great addition for maintaining code style. To further improve code quality and catch potential issues early, it's highly recommended to also run ESLint as part of the pre-commit hook. This ensures that files are not only formatted but also adhere to the project's linting rules before being committed. ```json "*.{js,jsx,ts,tsx}": [ "eslint --fix", "prettier --write" ], ```
Sign in to join this conversation.