Skip to content

fix(patch): cherry-pick 12a5490 to release/v0.26.0-preview.3-pr-17395 [CONFLICTS]#17424

Merged
Adib234 merged 4 commits into
release/v0.26.0-preview.3-pr-17395from
hotfix/v0.26.0-preview.3/0.26.0-preview.4/preview/cherry-pick-12a5490/pr-17395
Jan 25, 2026
Merged

fix(patch): cherry-pick 12a5490 to release/v0.26.0-preview.3-pr-17395 [CONFLICTS]#17424
Adib234 merged 4 commits into
release/v0.26.0-preview.3-pr-17395from
hotfix/v0.26.0-preview.3/0.26.0-preview.4/preview/cherry-pick-12a5490/pr-17395

Conversation

@gemini-cli-robot

Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 12a5490 to patch version v0.26.0-preview.3 in the preview release to create version 0.26.0-preview.4.

⚠️ 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/ui/AppContainer.tsx
#	packages/core/src/tools/mcp-client-manager.ts
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gemini-cli-robot, 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 integrates a new mechanism for handling user input during the initialization of Multi-Client Proxy (MCP) servers. It introduces a dedicated React hook to track MCP readiness and modifies the application's query submission flow to queue user prompts when MCP is not yet ready, improving the user experience by preventing blocked inputs and providing clear feedback. Slash commands, however, remain immediately executable.

Highlights

  • Prompt Queuing during MCP Initialization: The core change allows user prompts to be queued when the Multi-Client Proxy (MCP) servers are still initializing. Previously, non-slash commands would be blocked during this period. Now, users receive an informational message, and their prompts are held until MCP is ready.
  • New useMcpStatus Hook: A new React hook, useMcpStatus, has been introduced to centralize the management and exposure of MCP discovery state and server count. This hook subscribes to McpClientUpdate events to provide real-time readiness status.
  • Refactored Query Submission Logic: The AppContainer's handleFinalSubmit function has been updated to incorporate the isMcpReady status. Slash commands are processed immediately, while regular prompts are either submitted directly (if MCP is ready) or added to the message queue (if MCP is not yet ready).
  • Updated Message Queue Behavior: The useMessageQueue hook now considers the isMcpReady status before auto-submitting queued messages. Messages are only processed from the queue when the system is idle and MCP is fully initialized.
  • MCP Client Manager Enhancements: The McpClientManager now emits mcp-client-update events upon completion of discovery and handles cases where no servers are found by immediately marking discovery as completed. It also sets the discovery state to 'in progress' synchronously.
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.

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Jan 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request cherry-picks a commit to allow prompt queueing during MCP initialization. The changes refactor the MCP status handling into a new useMcpStatus hook and update useMessageQueue to hold prompts until MCP is ready. This is a good improvement. However, the cherry-pick has resulted in several merge conflicts that have been committed with conflict markers. These must be resolved before merging. I've left comments on the locations of the conflicts.

Comment thread packages/cli/src/ui/AppContainer.tsx Outdated
Comment on lines +105 to +110
<<<<<<< HEAD
import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js';
=======
import { useMcpStatus } from './hooks/useMcpStatus.js';
import { useApprovalModeIndicator } from './hooks/useApprovalModeIndicator.js';
>>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395))

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.

critical

There are unresolved merge conflict markers in this file. Please resolve them. It seems like you need to decide which imports to keep. useMcpStatus is needed for the new MCP readiness logic, and it seems like useAutoAcceptIndicator from HEAD and useApprovalModeIndicator from the cherry-picked commit might be related or one replaces the other. Please investigate and resolve.

Comment thread packages/cli/src/ui/AppContainer.tsx Outdated
Comment on lines +136 to +140
<<<<<<< HEAD
import { useInactivityTimer } from './hooks/useInactivityTimer.js';
=======
import { isSlashCommand } from './utils/commandUtils.js';
>>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395))

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.

critical

Another merge conflict is present here. useInactivityTimer and isSlashCommand both seem to be used in this file, so you likely need to include both imports after resolving the conflict.

Comment on lines +277 to +290
<<<<<<< HEAD
=======
if (Object.keys(servers).length === 0) {
this.discoveryState = MCPDiscoveryState.COMPLETED;
this.eventEmitter?.emit('mcp-client-update', this.clients);
return;
}

// Set state synchronously before any await yields control
if (!this.discoveryPromise) {
this.discoveryState = MCPDiscoveryState.IN_PROGRESS;
}

>>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395))

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.

critical

This file contains merge conflict markers that need to be resolved. The logic from the cherry-picked commit seems to handle cases where no MCP servers are configured and sets the discovery state synchronously, which appears to be important for the new prompt queueing feature. Please resolve the conflict, likely by keeping the new logic.

@github-actions

github-actions Bot commented Jan 24, 2026

Copy link
Copy Markdown

Size Change: +1.68 kB (+0.01%)

Total Size: 23.2 MB

Filename Size Change
./bundle/gemini.js 23.2 MB +1.68 kB (+0.01%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

return;
}

// Set state synchronously before any await yields control

@Adib234 Adib234 Jan 25, 2026

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.

Lines below seem to be a part of this PR #16299, I'll go ahead and remove it

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.

You are correct. This PR is a cherry-pick of changes that were originally introduced in #16299. The purpose of this cherry-pick is to apply those changes to the release/v0.26.0-preview.3-pr-17395 branch, which is a common practice for backporting fixes or features to release branches.

@Adib234 Adib234 merged commit cebe386 into release/v0.26.0-preview.3-pr-17395 Jan 25, 2026
24 checks passed
@Adib234 Adib234 deleted the hotfix/v0.26.0-preview.3/0.26.0-preview.4/preview/cherry-pick-12a5490/pr-17395 branch January 25, 2026 13:59
@sripasg sripasg added the size/l A large sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR 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.

4 participants