Skip to content

fix(cli)#21297: clear skills consent dialog before reload#26431

Merged
scidomino merged 2 commits intogoogle-gemini:mainfrom
manavmax:fix/21297-clear-skills-consent-dialog
May 4, 2026
Merged

fix(cli)#21297: clear skills consent dialog before reload#26431
scidomino merged 2 commits intogoogle-gemini:mainfrom
manavmax:fix/21297-clear-skills-consent-dialog

Conversation

@manavmax
Copy link
Copy Markdown
Contributor

@manavmax manavmax commented May 4, 2026

Summary

This PR fixes the interactive /skills link --scope workspace flow so the consent dialog is cleared before skills are reloaded. After confirming the prompt, the CLI returns to a usable input state immediately instead of leaving the Yes/No dialog stuck on screen.

Details

  • Updated requestConsentInteractive to support an optional cleanup callback before resolving the confirmation promise.
  • Cleared the active confirmation request before continuing with the workspace skills link flow.
  • Deferred promise resolution with setImmediate(...) so Ink can render the dialog dismissal before the follow-up reload work starts.
  • Updated the command UI typing so setConfirmationRequest can explicitly accept null.
  • Added tests covering the cleanup ordering and the /skills link command wiring.

Related Issues

Fixes #21297

How to Validate

  1. Run the targeted tests:
    npm test --workspace @google/gemini-cli -- consent.test.ts skillsCommand.test.ts
  2. Start Gemini CLI in interactive mode.
  3. Run:
    /skills link <path_to_skill> --scope workspace
  4. Confirm the consent prompt with Yes.
  5. Verify the success message appears and the consent dialog is removed immediately.
  6. Verify the input area is usable right away without needing /clear or a restart.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
  • MacOS
  • npm run
  • npx
  • Docker
  • Podman
  • Seatbelt
  • Windows
  • npm run
  • npx
  • Docker
  • Linux
  • npm run
  • npx
  • Docker

@manavmax manavmax requested a review from a team as a code owner May 4, 2026 11:47
@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 improves the user experience of the CLI's interactive workspace skills linking flow. By ensuring the consent dialog is properly cleared and the UI state is reset immediately after user confirmation, it prevents the dialog from remaining stuck on the screen and allows the user to continue interacting with the CLI without manual intervention.

Highlights

  • Consent Dialog Cleanup: Updated the interactive consent flow to explicitly clear the active confirmation request before proceeding with skill reloading.
  • UI Responsiveness: Implemented a deferred promise resolution using setImmediate to ensure the UI renders the dialog dismissal before starting subsequent tasks.
  • Type Safety: Updated the CommandContext interface to allow setConfirmationRequest to accept null, enabling proper cleanup of the UI state.
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-cli gemini-cli Bot added 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 May 4, 2026
Copy link
Copy Markdown
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 mechanism to clear active confirmation requests in the interactive consent flow. It updates the requestConsentInteractive and promptForConsentInteractive functions to accept an optional cleanup callback, which is now utilized in the skillsCommand to reset the UI state. Corresponding unit tests have been added to verify the clearing logic and the integration within the skills command. The CommandContext interface was also updated to allow setConfirmationRequest to accept null. I have no feedback to provide.

@scidomino scidomino enabled auto-merge May 4, 2026 17:35
@scidomino scidomino added this pull request to the merge queue May 4, 2026
Merged via the queue into google-gemini:main with commit 0da1a20 May 4, 2026
27 checks passed
TirthNaik-99 pushed a commit to TirthNaik-99/gemini-cli that referenced this pull request May 4, 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!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(command/skills): Interactive Consent Dialog Persists After Successful Workspace Skill Installation

2 participants