Skip to content

fix(patch): cherry-pick 45faf4d to release/v0.34.0-preview.0-pr-22148 [CONFLICTS]#22174

Merged
chrstnb merged 2 commits intorelease/v0.34.0-preview.0-pr-22148from
hotfix/v0.34.0-preview.0/0.34.0-preview.1/preview/cherry-pick-45faf4d/pr-22148
Mar 12, 2026
Merged

fix(patch): cherry-pick 45faf4d to release/v0.34.0-preview.0-pr-22148 [CONFLICTS]#22174
chrstnb merged 2 commits intorelease/v0.34.0-preview.0-pr-22148from
hotfix/v0.34.0-preview.0/0.34.0-preview.1/preview/cherry-pick-45faf4d/pr-22148

Conversation

@gemini-cli-robot
Copy link
Collaborator

This PR automatically cherry-picks commit 45faf4d to patch version v0.34.0-preview.0 in the preview release to create version 0.34.0-preview.1.

⚠️ Merge Conflicts Detected

This cherry-pick resulted in merge conflicts that need manual resolution.

🔧 Next Steps:

  1. Review the conflicts: Check out this branch and review the conflict markers
  2. Resolve conflicts: Edit the affected files to resolve the conflicts
  3. Test the changes: Ensure the patch works correctly after resolution
  4. Update this PR: Push your conflict resolution

📋 Files with conflicts:

The commit has been created with conflict markers for easier manual resolution.

🚨 Important:

  • Do not merge this PR until conflicts are resolved
  • The automated patch release will trigger once this PR is merged

# Conflicts:
#	packages/cli/src/config/extension-manager.test.ts
@gemini-code-assist
Copy link
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, a cherry-pick from a previous fix, addresses an issue where custom themes provided by extensions were not registered early enough during the application startup. The changes ensure that themes from active extensions are registered immediately upon loading, making them available for use, while also preventing redundant registrations. This PR currently has merge conflicts that require manual resolution.

Highlights

  • Updated theme registration logic: Themes are now registered during the loadExtensions phase for active extensions, ensuring they are available earlier in the application lifecycle.
  • Prevented duplicate theme registration: A check has been added to the startExtension method to ensure that themes are not re-registered if they already exist for a given extension.
  • Introduced hasExtensionThemes method: A new utility method was added to ThemeManager to efficiently check for the presence of themes from a specific extension.
  • Added comprehensive tests: New test cases were implemented to verify the correct behavior of early theme registration for active extensions and to confirm that themes from inactive extensions are not registered.
Changelog
  • packages/cli/src/config/extension-manager.test.ts
    • Imported themeManager and CustomTheme type.
    • Defined a testTheme constant for use in new tests.
    • Added themeManager.clearExtensionThemes() to afterEach hook for test isolation.
    • Introduced a new test suite for 'early theme registration' to verify themes are registered for active extensions and not for inactive ones.
  • packages/cli/src/config/extension-manager.ts
    • Modified startExtension to include a check !themeManager.hasExtensionThemes(extension.name) before registering themes, preventing duplicate registrations.
    • Implemented a loop within loadExtensions to proactively register themes for all active extensions at an earlier stage.
  • packages/cli/src/ui/themes/theme-manager.ts
    • Added a new public method hasExtensionThemes to check if themes for a given extension have already been registered.
Activity
  • This PR was automatically created as a cherry-pick of commit 45faf4d31b10792582cdce5ca693fc5a548d1edc to the release/v0.34.0-preview.0-pr-22148 branch.
  • Merge conflicts were detected during the cherry-pick process.
  • The PR description provides explicit instructions for resolving the conflicts, testing, and updating the PR.
  • The PR is currently awaiting manual conflict resolution before it can be merged.
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 cherry-picks a fix to register extension themes earlier in the application lifecycle, at load time rather than at start time. The changes to the extension manager and theme manager appear correct and are supported by new tests. However, there is a critical unresolved merge conflict in the test file packages/cli/src/config/extension-manager.test.ts that must be resolved before this PR can be merged.

Comment on lines +21 to +26
<<<<<<< HEAD
import { getRealPath } from '@google/gemini-cli-core';
import type { MergedSettings } from './settings.js';
=======
import { getRealPath, type CustomTheme } from '@google/gemini-cli-core';
>>>>>>> 45faf4d31 (fix: register themes on extension load not start (#22148))
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This file contains unresolved merge conflict markers. This will prevent the code from compiling and must be resolved. Both CustomTheme from the incoming change and MergedSettings from the base branch are used in this file, so the imports need to be combined.

import { getRealPath, type CustomTheme } from '@google/gemini-cli-core';
import type { MergedSettings } from './settings.js';

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 change to register extension themes earlier in the startup process. However, it has left unresolved merge conflict markers in packages/cli/src/config/extension-manager.test.ts. This is a critical issue that will prevent the code from compiling and must be fixed. The rest of the changes appear to be logically sound and include appropriate tests.

Comment on lines +21 to +26
<<<<<<< HEAD
import { getRealPath } from '@google/gemini-cli-core';
import type { MergedSettings } from './settings.js';
=======
import { getRealPath, type CustomTheme } from '@google/gemini-cli-core';
>>>>>>> 45faf4d31 (fix: register themes on extension load not start (#22148))
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This file contains unresolved merge conflict markers. This will cause the code to fail to compile and must be resolved before merging. Please remove the conflict markers and combine the imports as needed.

import { getRealPath, type CustomTheme } from '@google/gemini-cli-core';
import type { MergedSettings } from './settings.js';

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 12, 2026
@chrstnb chrstnb enabled auto-merge (squash) March 12, 2026 17:24
@github-actions
Copy link

Size Change: +603 B (0%)

Total Size: 26.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 26 MB +603 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@chrstnb chrstnb merged commit c56e58d into release/v0.34.0-preview.0-pr-22148 Mar 12, 2026
25 checks passed
@chrstnb chrstnb deleted the hotfix/v0.34.0-preview.0/0.34.0-preview.1/preview/cherry-pick-45faf4d/pr-22148 branch March 12, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants