Skip to content

Conversation

@Seayon
Copy link

@Seayon Seayon commented Aug 17, 2025

Summary

This PR standardizes the environment variable naming for the backend URL by replacing the inconsistent use of PYTHON_BACKEND_HOST with the documented SERVER_BASE_URL variable.

Problem

The codebase currently uses two different environment variable names for the same backend URL:

  • PYTHON_BACKEND_HOST - used only in

    const PYTHON_BACKEND_URL = process.env.PYTHON_BACKEND_HOST || 'http://localhost:8001';

  • SERVER_BASE_URL - used consistently throughout the rest of the codebase in multiple files.

This inconsistency creates confusion and potential configuration issues.

Solution

  • Updated src/app/api/wiki/projects/route.ts to use SERVER_BASE_URL instead of PYTHON_BACKEND_HOST
  • Both variables have the same default value (http://localhost:8001) and serve the same purpose
  • This change aligns with the documented environment variables in
    | `SERVER_BASE_URL` | Base URL for the API server (default: http://localhost:8001) | No |

Testing

  • Verified that the application still connects to the backend correctly
  • Confirmed that all existing functionality works as expected
  • No breaking changes introduced

Impact

  • Breaking Changes: None (both variables point to the same default URL)
  • Configuration: Users should use SERVER_BASE_URL in their environment configuration
  • Documentation: Aligns with existing documentation standards

This change improves code consistency and reduces potential confusion for developers and users configuring the application.

Replace PYTHON_BACKEND_HOST with SERVER_BASE_URL for consistency
- Update src/app/api/wiki/projects/route.ts to use SERVER_BASE_URL
- Ensures consistent naming across the entire codebase
- Aligns with documented environment variables in README.md
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 @Seayon, 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 aims to improve code consistency by standardizing the environment variable used for the backend URL. It replaces an inconsistent PYTHON_BACKEND_HOST with the already documented SERVER_BASE_URL, ensuring all parts of the application refer to the backend URL using a single, consistent variable name.

Highlights

  • Environment Variable Standardization: The PYTHON_BACKEND_HOST environment variable has been replaced with SERVER_BASE_URL in src/app/api/wiki/projects/route.ts to ensure consistent backend URL configuration across the codebase.
  • Improved Code Consistency: This change aligns the application's environment variable usage with existing documentation and practices, reducing potential confusion and configuration issues for developers.
  • No Functional Impact: Despite the change in variable name, the application's functionality remains unchanged, as both variables previously pointed to the same default backend URL (http://localhost:8001).
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
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 successfully standardizes the environment variable for the backend URL to SERVER_BASE_URL, which improves consistency across the codebase. My review includes a suggestion to improve the readability of the new constant name in src/app/api/wiki/projects/route.ts.

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