Conversation
When the Theme Dialog is open and the user highlights a theme (which previews it immediately) then exits via double Ctrl+C or Ctrl+D without pressing Enter, the preview theme remains applied to the goodbye banner and the post-exit terminal state. useThemeCommand.closeThemeDialog already re-applies the saved theme on close (packages/cli/src/ui/hooks/useThemeCommand.ts:80-84), so the fix is to invoke it from the quit action handler in AppContainer before setting quitting messages. Also add it to the surrounding useMemo dependency array. Fixes google-gemini#22541
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 a UI bug where the terminal theme remains stuck on a previewed state if the user exits the CLI while the theme dialog is active. By ensuring the theme cleanup logic is triggered during the quit process, the application now correctly reverts to the user's saved theme upon exit, maintaining consistent terminal styling. 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 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 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
|
|
Let me just re-open and merge @JayadityaGit's original PR 👍 That way original author gets credit for the change, thanks for flagging 🙏 |
|
Previous PR for this is in the merge queue ✅ |
|

Summary
When the Theme Dialog is open and the user highlights a theme (which previews it immediately), then exits the CLI via double Ctrl+C or Ctrl+D without pressing Enter, the preview theme stays applied to the goodbye banner and the post-exit terminal state.
useThemeCommand.closeThemeDialogalready re-applies the saved theme on close (packages/cli/src/ui/hooks/useThemeCommand.ts:80-84), so the fix is to invoke it from thequitaction handler beforesetQuittingMessagesfires.Details
Previous attempt: PR #22542 landed this exact 2-line shape and was closed 2026-04-08 by the 14-day stale-PR auto-close (the issue was not labeled
help wantedat the time). @psinha40898 confirmed the final shape was correct on that PR: "iirc the PR is now using the action registry to execute the logic on user press, akin to an event handler." The issue was subsequently labeledhelp wantedon 2026-04-08 by @cocosheng-g, which is why this re-submission.The diff is intentionally minimal and matches the accepted shape. No changes to
ThemeDialog.tsxoruseThemeCommand.ts- the fix belongs in the quit event handler, not the component or hook.Related Issues
Fixes #22541
How to Validate
npm install && npm run buildnpm run start/themeinside the CLIPre-Merge Checklist
This contribution was developed with AI assistance (Claude Code).