Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @skosijer, 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 introduces a comprehensive user telemetry system with an explicit opt-in flow, allowing the application to collect anonymous usage data to improve its features and stability. It integrates client-side and server-side tracking for various user interactions and application events, ensuring user privacy through a dedicated consent mechanism. Additionally, it updates the default LLM model used by the application.
Highlights
- Telemetry System Implementation: A new, comprehensive telemetry system has been implemented to track various user interactions (e.g., chat prompts, retries, reverts, app deployments) and application errors, providing valuable insights into product usage and stability.
- User Opt-in Flow: A dedicated consent screen is introduced at the application's entry point, requiring users to explicitly opt-in or opt-out of telemetry data collection. This enhances user privacy and control over their data.
- Client-side and Server-side Integration: Telemetry tracking is now integrated across both the client (for general usage metrics like page views and clicks) and server (for specific backend events like chat prompts and deployments), ensuring a holistic view of application usage.
- Database Schema Update: The user profile in the database has been extended with a
telemetryEnabledflag, allowing the system to persistently store and respect individual user consent preferences. - LLM Model Update: The default Large Language Model (LLM) used by the application has been updated from
claude-3-5-sonnet-latesttoclaude-4-sonnet-20250514.
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 or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive user telemetry system with an opt-in flow. The changes are extensive, touching many parts of the application from the backend APIs to the frontend components. Key additions include a new telemetry consent page, client-side telemetry initialization, and tracking for various user actions like chat prompts, retries, forks, and app deployments.
The code is generally well-structured and the new features seem to be implemented correctly. I have a few suggestions to improve security, correctness, and maintainability, primarily concerning a hardcoded API key, a potential redirect loop, and some code simplifications for better consistency.
| NEXT_PUBLIC_LOG_LEVEL=debug | ||
| NEXT_PUBLIC_TUNNEL_FORWARDING_URL= | ||
| BASE_URL=http://localhost:3000 | ||
| NEXT_PUBLIC_POSTHOG_KEY=phc_C1L7Idffoa2oRT54XZDGh4GSdOPFgzliJiusFnVV8Wz |
There was a problem hiding this comment.
It appears a public PostHog key has been committed. While this is a public key, it's best practice to avoid committing any credentials, even if they are for example files. This helps prevent accidental usage of a development/testing key in production or other environments.
Please replace this with a placeholder value.
NEXT_PUBLIC_POSTHOG_KEY=<YOUR_POSTHOG_PUBLIC_KEY>
There was a problem hiding this comment.
It is a public key for tracking telemetry, it's also present on the client when the app gets deployed, so it's fine.
6a82309 to
432c139
Compare
Tracking the following events:

Also tracking the app usage such as page view, clicks, session time etc.
The whole tracking is behind an opt in screen that gets shown to each user individually:

Explore the events here:
https://us.posthog.com/project/86753/activity/explore