Skip to content

Conversation

fredzqm
Copy link
Contributor

@fredzqm fredzqm commented Oct 10, 2025

Description

  • Fixed the missing variable auto-fix logics.
    • Removed the modal. Execute the operation as it is, but always apply the suggested fixed in the variables panel.
  • Display variables and auth in the result panel along with result data.
  • Improved the re-run a previous query CUJ.
    • When users select an item in history panel, we update both params and result panel to show its value, so developers can easily re-execute the 3rd last query.
    • Removed the concept of lastExecutedOperation.
  • Renamed "configuration" panel to "params".

Scenarios Tested

https://screencast.googleplex.com/cast/NDYyMjE3NjYwMTc2NzkzNnw2YmY1OTg2YS1lNg

Sample Commands

google-labs-jules bot and others added 15 commits October 8, 2025 15:46
Instead of directly asking for an app description to generate a schema with Gemini, this change first asks the user to confirm if they want to use Gemini.

If the user confirms, it then prompts for the app description with a default value of "an app for ${setup.projectId}".
Copy link
Contributor

Summary of Changes

Hello @fredzqm, 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 focuses on enhancing the developer experience within the Firebase VS Code extension and CLI, particularly for Data Connect features. It introduces a user-friendly confirmation for Gemini-powered schema generation, improves the accuracy of default variable assignments for GraphQL mutations, and streamlines internal analytics. Additionally, it refines user prompts and GA4 tracking to provide a more intuitive and informative setup process.

Highlights

  • Gemini Integration Confirmation: Introduced a confirmation step in firebase init dataconnect before prompting for an app idea description, allowing users to opt-in to Gemini schema generation.
  • Improved Scalar Value Handling: Updated the getDefaultScalarValue function to return native types (boolean, number, array) instead of string representations for Boolean, Float, Int, and Vector types, and undefined for unknown types.
  • Streamlined Analytics Logging: Removed several analytics events related to GIF TOS modals, missing variables, and operation generation, reducing noise in tracking.
  • Refined Production Mutation Warning: Simplified the logic for handling production mutation warnings, making the code cleaner and removing specific analytics for acknowledged/rejected states.
  • Enhanced GA4 Tracking: Modified GA4 tracking for dataconnect_init to include a more granular blaze_provisioned_csql status, providing better insights into project setup.
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
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 introduces several changes to the VS Code extension, primarily around handling missing variables, authentication, and improving the firebase init dataconnect flow. My review focuses on some regressions in analytics tracking and a critical issue that would likely cause a build failure. I've also included a suggestion for improving a default value.

@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 13, 2025

/gemini review

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 introduces a significant and valuable refactoring of the GraphQL execution flow in the VS Code extension. The changes improve the user experience for handling variables and authentication, and the code structure is now more modular and maintainable. Key improvements include renaming "Configuration" to "Parameters", introducing an ExecutionParamsService to centralize parameter management, and enhancing the query re-run functionality.

My review focuses on a few areas for improvement:

  • React component lifecycle: There are critical issues in React components where event listeners are not correctly managed, which will lead to memory leaks and bugs.
  • Error handling: An edge case in JSON parsing for authentication claims is not handled, which could lead to unhandled exceptions.
  • Code duplication: There's an opportunity to reduce code duplication in the CodeLens provider.
  • UI regression: A small regression was found where error stack traces are no longer displayed in one of the views.

Overall, this is a solid pull request. Addressing these points will further improve the robustness and quality of the code.

fredzqm and others added 5 commits October 13, 2025 14:35
…arameters.entry.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 13, 2025

/gemini review

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 introduces a significant and valuable set of improvements to the Data Connect execution flow. The refactoring to centralize parameter handling into ExecutionParamsService, the removal of the disruptive modal for missing variables in favor of an auto-fix mechanism, and the enhanced results panel are all excellent changes that will improve the developer experience. The code is cleaner and the state management is simpler with the removal of lastExecutedOperation. I've found a couple of minor issues in the new logic, mainly related to analytics, error logging, and UI display, which I've detailed in my comments. Overall, this is a high-quality contribution.

@fredzqm fredzqm requested a review from hlshen October 13, 2025 22:13
@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 13, 2025

Hi, @hlshen

Sorry about the massive PR.

I went though the reworked the VS Code execution param and result penel with some incremental fixes (started from the bug missing variable logic).

Not in a rush, but can use your expertise to review it~ Thank you!

: new DataConnectError("Unknown error", error),
});
if (item.state === ExecutionState.ERRORED) {
await paramsService.applyDetectedFixes(ast);
Copy link
Contributor

Choose a reason for hiding this comment

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

Two biggest concerns with the auto generated fields + auto rerun:

  1. This is also applying to production. Can we add a confirmation for production mutations specifically?

  2. Users will encounter an error on a mutation w/ repeated ID the second time around. Not a huge concern, but users may now expect it to auto-magically work every time.

}
}

async applyDetectedFixes(ast: OperationDefinitionNode): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be great to unit test this file/function specifically, ensuring it doesn't overwrite user set varisbles.

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.

2 participants