Conversation
Summary of ChangesHello, 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 enhances the local development experience by integrating a robust Vite proxy setup. It allows developers to seamlessly proxy API requests from their local frontend to a remote backend, which is particularly useful for environments where the frontend and backend are hosted separately. The core of this change lies in its intelligent handling of cookies, ensuring that authentication and session management work correctly across different domains during development, thereby streamlining the testing and debugging process. Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Pull request overview
Adds a Vite dev-server proxy to route /console/api and /api requests through the local dev server (including cookie rewriting) so developers can work against remote targets without CORS/cookie issues.
Changes:
- Load Vite env vars in
vite.config.tsand wireserver.proxyto a new proxy factory. - Add
web/plugins/vite/proxy.tsimplementing a cookie-aware proxy (Cookie + Set-Cookie rewriting). - Document new dev-only proxy target env vars in
web/.env.example.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
web/vite.config.ts |
Loads env via loadEnv and configures Vite server.proxy using createDevProxyConfig. |
web/plugins/vite/proxy.ts |
New proxy helper that rewrites cookie names/attributes when proxying /console/api and /api. |
web/.env.example |
Adds VITE_CONSOLE_API_PROXY_TARGET / VITE_PUBLIC_API_PROXY_TARGET example values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a robust Vite proxy configuration designed to streamline local development by correctly handling API requests and complex cookie management. The new proxy.ts file provides a well-thought-out solution for rewriting __Host- and __Secure- prefixed cookies, as well as adjusting SameSite, Domain, and Secure attributes, which are crucial for successful proxying to a secure backend. The integration into vite.config.ts and the addition of corresponding environment variables in .env.example are correctly implemented. Overall, the changes are logical, well-structured, and effectively address the technical challenges of proxying in a development environment.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @hyoban , are the "hono" and "@hono/node-server" used only in development? Shall we move them from "dependencies" to "devDependencies" instead ? |
Important
Fixes #<issue number>.Summary
fixes #33181
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods