Skip to content

Adding windows support for studio:export#10075

Merged
joehan merged 11 commits into
mainfrom
jh-windows-fs
Mar 12, 2026
Merged

Adding windows support for studio:export#10075
joehan merged 11 commits into
mainfrom
jh-windows-fs

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Mar 11, 2026

Description

Windows support for studio:export. Tested on a personal Windows machine and confirmed that the export is successful + Antigravity starts up

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enables the Firebase Studio migration feature to run on Windows by removing platform-specific restrictions and implementing Windows-compatible logic for command execution and tool detection. The changes primarily focus on adapting the migration process to the Windows environment, ensuring a consistent user experience across platforms.

Highlights

  • Windows Support for Studio Migration: The studio:export command, which facilitates Firebase Studio migration, now officially supports Windows operating systems. Previously, an explicit error prevented its execution on Windows.
  • Antigravity CLI Detection on Windows: Enhanced the logic for detecting the Antigravity IDE CLI (agy.exe) on Windows. The system now checks common install locations, such as LOCALAPPDATA, in addition to the system PATH.
  • Windows Migration Test Coverage: Comprehensive test cases have been added and modified to ensure the migrate function behaves correctly on Windows, including successful migration flows and proper detection of the Antigravity CLI.

🧠 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
  • src/firebase_studio/migrate.spec.ts
    • Removed FirebaseError import, reflecting the removal of Windows-specific error handling.
    • Modified the Windows migration test to assert successful execution instead of an error, including extensive mocking for file system, network, and process operations.
    • Added new test cases to verify the detection of the antigravity command on Windows, both when it's in the system PATH and in common install locations.
  • src/firebase_studio/migrate.ts
    • Removed FirebaseError import, as the Windows platform restriction was lifted.
    • Implemented logic within getAgyCommand to check for agy.exe in the LOCALAPPDATA directory on Windows.
    • Updated the spawn options for askToOpenAntigravity to explicitly use shell: true on Windows, ensuring proper command execution.
    • Removed the FirebaseError check that previously prevented the migrate function from running on Windows.
  • src/mcp/tools/index.spec.ts
    • Increased the timeout for the 'should include login tool' test to 4000ms.
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
Copy Markdown
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 adds Windows support for the studio:export command. The changes correctly remove the platform block, add logic to find the agy executable on Windows, and use the shell: true option when spawning the process. The tests have been updated accordingly. My review includes a few suggestions in the test files to adhere to the repository's style guide by avoiding the use of any.

} as Response);

// Mock filesystem
sandbox.stub(fs, "readFile").callsFake(async (p: any) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The use of any for the parameter p violates the repository's style guide. Please use a more specific type. Since fs.readFile accepts a fs.PathLike argument, you can use that type here.

Suggested change
sandbox.stub(fs, "readFile").callsFake(async (p: any) => {
sandbox.stub(fs, "readFile").callsFake(async (p: fs.PathLike) => {
References
  1. The repository style guide prohibits using any as an escape hatch. It's recommended to use proper types or interfaces. (link)

sandbox.stub(fs, "mkdir").resolves();
sandbox.stub(fs, "unlink").resolves();
sandbox.stub(fs, "readdir").resolves([]);
sandbox.stub(fs, "access").callsFake(async (p: any) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the readFile stub, using any for the parameter p here violates the style guide. Please use a more specific type like fs.PathLike.

Suggested change
sandbox.stub(fs, "access").callsFake(async (p: any) => {
sandbox.stub(fs, "access").callsFake(async (p: fs.PathLike) => {
References
  1. The repository style guide prohibits using any as an escape hatch. It's recommended to use proper types or interfaces. (link)

Comment thread src/firebase_studio/migrate.spec.ts Outdated
unref: () => {
// No-op for testing
},
} as any);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The type assertion as any violates the repository's style guide, which advises against using any as an escape hatch. To align with best practices, you can use as unknown as import("child_process").ChildProcess for better type safety.

Suggested change
} as any);
} as unknown as import("child_process").ChildProcess);
References
  1. The repository style guide prohibits using any as an escape hatch. It's recommended to use proper types or interfaces. (link)


expect(loginTool).to.exist;
}).timeout(2000);
}).timeout(4000);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unrelated, but this was annoying me on CI

@joehan joehan marked this pull request as ready for review March 11, 2026 22:00
Comment thread src/firebase_studio/migrate.ts Outdated
exit: 1,
});
}
// No-op for platform support check now
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: can omit this comment

@joehan joehan enabled auto-merge (squash) March 12, 2026 16:23
@joehan joehan merged commit 1c13340 into main Mar 12, 2026
47 checks passed
@joehan joehan deleted the jh-windows-fs branch March 12, 2026 16:24
andrewbrook pushed a commit that referenced this pull request Mar 25, 2026
* Adding windows support

* PR fixes

* Format

* Format

* PR fix
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