Skip to content

fix(cli): reset slash-command conflict dedupe after each flush#28486

Open
kunalrawat425 wants to merge 1 commit into
google-gemini:mainfrom
kunalrawat425:fix/24333-slash-command-conflict-reset
Open

fix(cli): reset slash-command conflict dedupe after each flush#28486
kunalrawat425 wants to merge 1 commit into
google-gemini:mainfrom
kunalrawat425:fix/24333-slash-command-conflict-reset

Conversation

@kunalrawat425

Copy link
Copy Markdown

Summary

  • SlashCommandConflictHandler.notifiedConflicts was an unbounded Set that grew for the entire process lifetime.
  • Once a conflict key was recorded, it was never removed, so a conflict that disappeared and later reappeared would silently be suppressed forever.
  • Fix: clear notifiedConflicts inside flush() after each debounce window. Deduplication still works within a single burst of events, but the slate is wiped after flushing so reintroduced conflicts trigger fresh notifications.

Changes

File What changed
packages/cli/src/services/SlashCommandConflictHandler.ts this.notifiedConflicts.clear() added at top of flush()
packages/cli/src/services/SlashCommandConflictHandler.test.ts Replaced old dedup test with two tests: one for intra-window dedup and one regression test for reintroduced conflicts

Test plan

  • npx vitest run packages/cli/src/services/SlashCommandConflictHandler.test.ts — all 8 tests pass
  • New test should re-notify when a previously-resolved conflict reappears (issue #24333) confirms the fix

Fixes #24333

The notifiedConflicts Set grew unbounded over the process lifetime,
preventing users from being re-notified when a conflict that was
previously resolved reappears (e.g. after an extension reload).

Clear the set in flush() so the dedupe only suppresses duplicates
within a single debounce window. A new regression test verifies
that a reintroduced conflict triggers a fresh notification.

Fixes google-gemini#24333

Signed-off-by: Kunal Rawat <kunalrawat425@gmail.com>
@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 addresses an issue where slash-command conflicts were being permanently suppressed after their initial notification. By clearing the deduplication state after each flush, the system now correctly allows for fresh notifications if a conflict is resolved and subsequently reintroduced.

Highlights

  • Conflict Deduplication Fix: Modified the SlashCommandConflictHandler to clear the notifiedConflicts set after each flush, ensuring that conflicts are re-evaluated after the debounce window.
  • Regression Testing: Updated the test suite to include a specific regression test for re-notifying users when a previously resolved conflict reappears.
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 the 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 counterproductive. 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.

@github-actions github-actions Bot added the size/s A small PR label Jul 22, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/S

  • Lines changed: 26
  • Additions: +24
  • Deletions: -2
  • Files changed: 2

@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 addresses issue #24333 by clearing the notifiedConflicts deduplication set after each flush in SlashCommandConflictHandler. This ensures that if a conflict disappears and subsequently reappears, a fresh notification is triggered. Corresponding unit tests have been updated and added to verify this behavior. No review comments were provided, so there is no feedback to address.

@gemini-cli gemini-cli Bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release. size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): reset slash-command conflict dedupe when conflicts reappear

1 participant