fix(cli): reset slash-command conflict dedupe after each flush#28486
fix(cli): reset slash-command conflict dedupe after each flush#28486kunalrawat425 wants to merge 1 commit into
Conversation
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>
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
|
📊 PR Size: size/S
|
There was a problem hiding this comment.
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.
Summary
SlashCommandConflictHandler.notifiedConflictswas an unboundedSetthat grew for the entire process lifetime.notifiedConflictsinsideflush()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
packages/cli/src/services/SlashCommandConflictHandler.tsthis.notifiedConflicts.clear()added at top offlush()packages/cli/src/services/SlashCommandConflictHandler.test.tsTest plan
npx vitest run packages/cli/src/services/SlashCommandConflictHandler.test.ts— all 8 tests passshould re-notify when a previously-resolved conflict reappears (issue #24333)confirms the fixFixes #24333