Skip to content

Conversation

@IlinJoy
Copy link
Collaborator

@IlinJoy IlinJoy commented Sep 21, 2025

Type of PR 🍩

  • Feature
  • Bugfix
  • Hotfix
  • Refactoring
  • Documentation
  • Infrastructure

Changes Introduced πŸ₯―

  • Fixed: history body and routes generator

Self-Check βœ…

  • No console errors (except API requests)
  • 80%+ test coverage
  • Documentation updated (if relevant)
  • Package.json scripts updated (if relevant)

@gemini-code-assist
Copy link

Summary of Changes

Hello @IlinJoy, 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 addresses several issues related to the history feature and request processing. It improves the robustness of variable replacement within API requests by applying it to more parts of the request (headers, body, URL, method). Additionally, it refines how request details are stored in the history, ensuring that the saved data accurately reflects the processed request parameters. A minor fix for locale-aware route generation is also included.

Highlights

  • Enhanced Variable Replacement: Implemented variable replacement for request header keys, header values, request body, URL, and HTTP method before sending the request to the proxy. This ensures dynamic values are correctly resolved across various request components.
  • Accurate History Logging: Corrected the data saved to history to accurately reflect the request body (after variable replacement) and the normalized URL. The actual response body is now explicitly stored as proxyResponse.body in the response state, distinguishing it from the request body.
  • Flexible Route Generation: Modified the route generation utility to handle optional locale paths, preventing incorrect route formats when a locale is not present in the URL.
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

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

@netlify
Copy link

netlify bot commented Sep 21, 2025

βœ… Deploy Preview for vatruzhka ready!

Name Link
πŸ”¨ Latest commit d8cb8cd
πŸ” Latest deploy log https://app.netlify.com/projects/vatruzhka/deploys/68d0884f6dc8bc00083270bc
😎 Deploy Preview https://deploy-preview-36--vatruzhka.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

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 fixes issues related to history saving and route generation. The changes correctly apply variable substitution to request parts like URL, method, headers, and body before sending the request. It also ensures the correct data (like request body and normalized URL) is saved to the history. The route generation is made more robust to handle potentially empty locale values.

My main feedback is a suggestion to refactor a piece of logic in src/stores/rest-client/store.ts. While functionally correct, the current implementation for creating the history entry and setting the response state is a bit convoluted. A small refactoring could significantly improve the code's readability and maintainability.

@IlinJoy IlinJoy closed this Sep 21, 2025
@Sepulator Sepulator deleted the fix/history branch September 25, 2025 09:39
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.

3 participants