Skip to content

Maintenance#23

Merged
runephilosof-abtion merged 9 commits intomainfrom
maintenance
Feb 26, 2026
Merged

Maintenance#23
runephilosof-abtion merged 9 commits intomainfrom
maintenance

Conversation

@runephilosof-abtion
Copy link
Copy Markdown
Member

No description provided.

Synchronize .tool-versions and Dockerfile node versions to 18
Had to update react-scripts for node 18 support.
To match with LocalStrategy

It was already being called with the `username` argument
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @runephilosof-abtion, 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 primarily focuses on standardizing the project's Node.js ecosystem by migrating from Yarn to npm for dependency management and updating Node.js versions in Docker environments. It also includes an adjustment to the OpenAI chatbot's response generation to allow for more creative outputs, and minor but important updates to frontend authentication interfaces.

Highlights

  • Dependency Management Migration: The project has migrated its Node.js dependency management from Yarn to npm. This includes updating documentation, Dockerfiles, and removing yarn.lock files in favor of package-lock.json.
  • Node.js Version Update: The frontend Docker configurations have been updated to use Node.js version 18, standardizing the development and build environments.
  • OpenAI Chatbot Creativity Adjustment: The temperature parameter for OpenAI API calls within the chatbot service has been increased from 0.1 or 0 to 1, which will make the AI's responses more creative and less deterministic.
  • Frontend Authentication Service Refinements: Authentication service interfaces in the frontend have been updated to include a confirmPassword field for sign-up and to use username instead of email for login, along with a change from token to access in the SignUp interface.
  • Gitignore Cleanup: Project-wide .gitignore files have been updated to remove entries for Yarn-related debug logs, aligning with the migration to npm.

🧠 New Feature in Public Preview: You can now enable Memory 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.

Changelog
  • .gitignore
    • Removed entries for Yarn-related debug logs (pnpm-debug.log*, yarn-debug.log*, yarn-error.log*, lerna-debug.log*).
    • Ensured the file ends with a newline character.
  • CONTRIBUTING.md
    • Updated the Node.js requirement from 'Node v18 + Yarn' to 'Node v18'.
    • Replaced yarn install with npm install in setup instructions.
    • Replaced yarn run build with npm run build in application run instructions.
    • Replaced yarn start:dev and yarn crawler:worker with npm run start:dev and npm run crawler:worker respectively in development setup.
  • Dockerfile
    • Removed yarn.lock from the COPY command.
    • Replaced RUN yarn install with RUN npm install.
    • Replaced RUN yarn run build with RUN npm run build.
    • Replaced RUN rm -rf node_modules && yarn install --production with RUN rm -rf node_modules && npm install --production.
  • Dockerfile.dev
    • Removed yarn.lock from the COPY command.
    • Replaced RUN yarn install with RUN npm install.
    • Replaced CMD ["yarn", "run", "start:dev"] with CMD ["npm", "run", "start:dev"].
  • README.md
    • Updated the Node.js requirement from 'Node v18 + Yarn' to 'Node v18'.
    • Replaced yarn install with npm install in setup instructions.
    • Replaced yarn run build with npm run build in application run instructions.
  • docker-compose.yml
    • Changed the command for the 'web' service from yarn run start:dev to npm run start:dev.
    • Ensured the file ends with a newline character.
  • frontend/.gitignore
    • Removed entries for Yarn-related debug logs (yarn-debug.log*, yarn-error.log*).
  • frontend/Dockerfile
    • Updated the Node.js base image from node:14-alpine to node:18-alpine.
    • Ensured the file ends with a newline character.
  • frontend/Dockerfile.dev
    • Updated the Node.js base image from node:16-alpine to node:18-alpine.
  • frontend/package.json
    • Added a node engine constraint for version 18.
    • Added @types/react-router-dom to dependencies.
    • Updated react-scripts version from 4.0.3 to 5.0.1.
    • Removed @types/react-router-dom from devDependencies.
  • frontend/public/index.html
    • Updated development and production build instructions to consistently use npm start and npm run build.
  • frontend/src/components/ChatBot/ChatBot.tsx
    • Added type annotation customStyle: { backgroundColor: any; fontColor: any; } to getMessageStyle function parameter.
    • Added type annotation ChatBotProps to the functional component parameters.
    • Removed an unnecessary blank line.
  • frontend/src/services/authServices.ts
    • Added confirmPassword to the signUp payload interface.
    • Changed email to username in the logIn payload interface.
    • Ensured the file ends with a newline character.
  • frontend/src/types/types.ts
    • Changed the token property to access in the SignUp interface.
  • migrations/.gitignore
    • Removed entries for Yarn-related debug logs (pnpm-debug.log*, yarn-debug.log*, yarn-error.log*, lerna-debug.log*).
    • Ensured the file ends with a newline character.
  • migrations/package-lock.json
    • Added a new package-lock.json file for the migrations directory.
  • migrations/package.json
    • Ensured the file ends with a newline character.
  • migrations/yarn.lock
    • Removed the yarn.lock file.
  • package-lock.json
    • Added a new package-lock.json file for the backend.
  • package.json
    • Ensured the file ends with a newline character.
  • src/knowledgebase/chatbot/openaiChatbotService.ts
    • Increased the temperature parameter for getChatGptCompletion from 0.1 to 1.
    • Increased the temperature parameter for getChatGptCompletionStream from 0 to 1.
  • src/openai/openai.service.ts
    • Added a semicolon to the input variable assignment.
    • Increased the temperature parameter for OpenAI chat completions from 0 to 1.
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
Copy Markdown

@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 primarily handles the migration from Yarn to NPM, along with other maintenance tasks like dependency updates and code tweaks. While the migration from yarn to npm is a good step, I've found some critical issues with the newly added package-lock.json files being empty, which undermines the goal of reproducible builds. There are also several changes to the OpenAI temperature setting, increasing it to 1. This will make the chatbot's responses significantly more random and less deterministic, which is likely undesirable for a knowledge-based assistant. I've also included suggestions to improve the Dockerfiles and fix some inconsistencies.

Comment on lines +1 to +7
{
"name": "mongo_migrations",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This package-lock.json file is empty, but the corresponding package.json file lists migrate-mongo as a dependency. An empty lockfile will prevent reproducible builds and may cause issues in CI/CD pipelines. Please regenerate this file by running npm install inside the migrations directory.

Comment on lines +1 to +7
{
"name": "backend",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This package-lock.json file is empty, but the root package.json contains numerous dependencies. This is a critical issue as it prevents reproducible builds. Please regenerate this file by running npm install in the project's root directory.

{
messages: messages as any,
temperature: 0.1,
temperature: 1,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Increasing the temperature to 1 will make the chatbot's responses highly random and non-deterministic. For a knowledge-based chatbot that should provide factual and consistent answers, a lower temperature (close to 0) is generally recommended. Please consider if this change is intended, as it will significantly alter the chatbot's behavior.

Suggested change
temperature: 1,
temperature: 0.1,

{
messages: messages,
temperature: 0,
temperature: 1,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Similar to the non-streaming version, increasing the temperature to 1 for the streaming response will make the output less predictable. For consistent and factual answers from the knowledge base, a lower temperature is advisable.

Suggested change
temperature: 1,
temperature: 0,

model: data.model, // Or use another model
messages: [{ role: 'system', content: prompt }],
temperature: 0, // To make the response more deterministic
temperature: 1, // To make the response more deterministic
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Increasing the temperature to 1 for analyzeChatConversation will make the analysis of user input less deterministic. This can lead to unpredictable behavior in how the system categorizes user intent and triggers API calls. For a function that requires predictable classification, a temperature of 0 is strongly recommended.

Suggested change
temperature: 1, // To make the response more deterministic
temperature: 0, // To make the response more deterministic

Dockerfile.dev Outdated
COPY package*.json ./

RUN yarn install
RUN npm install
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For more reliable and potentially faster builds, it's recommended to use npm ci instead of npm install. npm ci installs dependencies from the package-lock.json file, ensuring reproducible builds even in development.

RUN npm ci

@@ -1,5 +1,5 @@
# Fetching the latest node image on apline linux
FROM node:14-alpine AS builder
FROM node:18-alpine AS builder
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There's an inconsistency in the Node.js versions used across the project. The backend Dockerfiles use node:20-alpine, while the frontend ones are being updated to node:18-alpine. It's best practice to use the same Node.js version across all services to ensure consistency and avoid potential compatibility issues. Consider aligning this with the backend's version.

FROM node:20-alpine AS builder

@@ -1,5 +1,5 @@
# Fetching the latest node image on apline linux
FROM node:16-alpine
FROM node:18-alpine
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There's an inconsistency in the Node.js versions used across the project. The backend Dockerfiles use node:20-alpine, while this file uses node:18-alpine. It's recommended to use a consistent Node.js version across all services. Consider aligning this with the backend's version.

FROM node:20-alpine

"@types/jest": "^25.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-router-dom": "^5.1.8",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The @types/react-router-dom package has been moved from devDependencies to dependencies. Type definition packages (@types/*) are only needed during development and compilation, not at runtime. They should be kept in devDependencies to avoid bloating the production bundle. Please move this back to devDependencies.

Comment on lines +1352 to +1353
To begin the development, run `npm start` or `npm run start`.
To create a production bundle, use `npm run build` or `npm run build`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The instructions for starting development and creating a production bundle have become redundant after replacing yarn commands. This could be confusing for developers. It should be simplified.

Suggested change
To begin the development, run `npm start` or `npm run start`.
To create a production bundle, use `npm run build` or `npm run build`.
To begin the development, run `npm start`.
To create a production bundle, use `npm run build`.

Because it is needed for the production build
```
TS7016: Could not find a declaration file for module 'react-router-dom'. '/app/node_modules/react-router-dom/index.js' implicitly has an 'any' type.
  Try `npm install @types/react-router-dom` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-router-dom';`
```
Because gpt-5.1-chat only supports 1
```
Error: 400 Unsupported value: 'temperature' does not support 0 with this
model. Only the default (1) value is supported.
```
@runephilosof-abtion
Copy link
Copy Markdown
Member Author

Had to merge at this point because the gpt-4o model stops working this weekend.

@runephilosof-abtion runephilosof-abtion merged commit 4d682b9 into main Feb 26, 2026
1 check passed
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