Skip to content

fix(patch): cherry-pick 44cdb3e to release/v0.36.0-preview.6-pr-24235 to patch version v0.36.0-preview.6 and create version 0.36.0-preview.7#24265

Closed
gemini-cli-robot wants to merge 1 commit into
release/v0.36.0-preview.6-pr-24235from
hotfix/v0.36.0-preview.6/0.36.0-preview.7/preview/cherry-pick-44cdb3e/pr-24235
Closed

fix(patch): cherry-pick 44cdb3e to release/v0.36.0-preview.6-pr-24235 to patch version v0.36.0-preview.6 and create version 0.36.0-preview.7#24265
gemini-cli-robot wants to merge 1 commit into
release/v0.36.0-preview.6-pr-24235from
hotfix/v0.36.0-preview.6/0.36.0-preview.7/preview/cherry-pick-44cdb3e/pr-24235

Conversation

@gemini-cli-robot

Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 44cdb3e to patch version v0.36.0-preview.6 in the preview release to create version 0.36.0-preview.7.

@gemini-cli-robot gemini-cli-robot requested a review from a team as a code owner March 30, 2026 20:18
@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 30, 2026
@github-actions

Copy link
Copy Markdown

Size Change: -1.56 kB (-0.01%)

Total Size: 26.2 MB

Filename Size Change
./bundle/chunk-EJHGQUBP.js 0 B -3.64 MB (removed) 🏆
./bundle/chunk-PCLUEDZA.js 0 B -14.6 MB (removed) 🏆
./bundle/core-4I3PPUVK.js 0 B -43.5 kB (removed) 🏆
./bundle/devtoolsService-OOY2TN4O.js 0 B -27.7 kB (removed) 🏆
./bundle/interactiveCli-N75COCWN.js 0 B -1.62 MB (removed) 🏆
./bundle/oauth2-provider-453O5YEK.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-J2LSNKC6.js 3.65 MB +3.65 MB (new file) 🆕
./bundle/chunk-U7UERFSO.js 14.6 MB +14.6 MB (new file) 🆕
./bundle/core-LCOIC566.js 43.5 kB +43.5 kB (new file) 🆕
./bundle/devtoolsService-HN6TCJEA.js 27.7 kB +27.7 kB (new file) 🆕
./bundle/interactiveCli-ATAR5NMB.js 1.62 MB +1.62 MB (new file) 🆕
./bundle/oauth2-provider-K3YDJ3RU.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-PXG3YTLU.js 1.96 MB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/gemini.js 522 kB +54 B (+0.01%)
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-JXHCZBWK.js 922 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./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
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B

compressed-size-action

@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 refactors the console message handling system to use a global store instead of component-local state. This change ensures that console messages and error counts are maintained independently of the UI component lifecycle, improving data consistency and simplifying state management across the application.

Highlights

  • Global Console Store Implementation: Migrated console message management from local component state to a global store using useSyncExternalStore, ensuring message history persists even when UI components are unmounted.
  • Refactored Hook API: Simplified useConsoleMessages to return the message array directly and updated useErrorCount to utilize the new global store architecture.
  • Test Infrastructure Improvements: Introduced initializeConsoleStore to ensure clean state isolation between tests and updated test suites to use vi.runAllTimers() for more reliable asynchronous testing.
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.

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-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 refactors the console message management from a component-local state to a global store using useSyncExternalStore. This change ensures that message history and error counts are preserved even when UI components are unmounted. Key additions include an initializeConsoleStore function for setup and a batching mechanism to handle high-frequency log updates. Review feedback suggests addressing a potential ReferenceError caused by the Temporal Dead Zone in the global store initialization and ensuring that clearing the error count also accounts for pending messages in the processing queue.

Comment on lines +35 to 51
export function initializeConsoleStore() {
if (timeoutId) {
clearTimeout(timeoutId);
timeoutId = null;
}
messageQueue = [];
globalConsoleMessages = [];
globalErrorCount = 0;
notifyListeners();

// Safely detach first to ensure idempotency and prevent listener leaks
coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
coreEvents.off(CoreEvent.Output, handleOutput);

coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
coreEvents.on(CoreEvent.Output, handleOutput);
}

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.

high

The initializeConsoleStore function references handleConsoleLog and handleOutput, which are defined later in the file using const. While this is safe when called from other modules (like gemini.tsx) after this module has finished evaluating, it could trigger a ReferenceError due to the Temporal Dead Zone if it were ever called during module initialization. For better robustness and to follow standard hoisting expectations, consider using function declarations for the event handlers or moving their definitions above initializeConsoleStore.

Comment on lines 176 to 179
const clearErrorCount = useCallback(() => {
startTransition(() => {
dispatch('CLEAR');
});
globalErrorCount = 0;
notifyListeners();
}, []);

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.

high

The clearErrorCount function resets the globalErrorCount but does not clear the messageQueue. If there are pending error messages in the queue when clearErrorCount is called, they will be processed in the next processQueue execution and immediately increment the count again. Consider clearing the messageQueue or filtering out errors from it when resetting the count to ensure a consistent user experience.

@gemini-cli

gemini-cli Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

This item has been automatically marked as stale due to 60 days of inactivity. It will be closed in 14 days if no further activity occurs. Thank you!

@gemini-cli gemini-cli Bot added the Stale label May 30, 2026
@sripasg sripasg added the size/l A large sized PR label Jun 2, 2026
@galdawave galdawave closed this Jun 3, 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 Stale 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