refactor(cli): categorize built-in themes into dark/ and light/ directories#18634
Conversation
Summary of ChangesHello @JayadityaGit, 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 focuses on improving the maintainability and organization of the CLI's built-in themes. By categorizing themes into distinct 'dark' and 'light' directories, the codebase becomes more structured and future theme additions will be more predictable. The changes are purely structural, with no impact on the existing theme behavior or functionality. Highlights
Changelog
Activity
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the theme files by organizing them into dark/ and light/ subdirectories, which improves the project structure. While this is a good change, I've found a critical issue: the renaming of default themes from lowercase to capitalized strings (e.g., 'default' to 'Default') is a breaking change for users with existing settings. My review includes a comment detailing this issue and recommends a solution to ensure backward compatibility. Apart from this, the file moves and import path updates are correctly implemented.
| isDefaultTheme: (name: string) => | ||
| name === 'default' || name === 'default-light', | ||
| name === 'Default' || name === 'Default Light', |
There was a problem hiding this comment.
Changing the default theme names from lowercase ('default', 'default-light') to capitalized ('Default', 'Default Light') is a breaking change for users who have the old names in their settings.json. Without a migration path, their configured theme will no longer be found, and the CLI will fall back to the default dark theme. This contradicts the PR's goal of being a pure refactor with "No functional changes to theme behavior".
To ensure backward compatibility, please add a migration for these legacy theme names. One approach is to handle this in packages/cli/src/config/settings.ts during settings load, similar to how 'VS' and 'VS2015' are handled:
// In packages/cli/src/config/settings.ts, inside loadSettings()
// ...
// Support legacy theme names
if (userSettings.ui?.theme === 'VS' || userSettings.ui?.theme === 'default-light') {
userSettings.ui.theme = DefaultLight.name;
} else if (userSettings.ui?.theme === 'VS2015' || userSettings.ui?.theme === 'default') {
userSettings.ui.theme = DefaultDark.name;
}
// ... and similarly for workspaceSettingsSince the relevant lines in settings.ts are not part of this diff, I cannot add a direct code suggestion there. Please apply this fix to maintain user configuration.
|
when i was navigating the themes folder, I thought it was necessary to separate the main logic and the built in themes for better maintainability ! |
…solve conflicts in theme-manager.ts and useTerminalTheme.test.tsx
|
At present this branch has conflicts , i dont know if the maintainers are interested in this change.. if the community show interest, I will resolve the conflicts @jacob314 (tagging for visibility) |
|
Thanks for the review @jacob314 ! |
|
please check on the build and running the application (just in case) thank you ! |
|
The sheer quantity of the PR's i am seeing is astonishing, thanks for reviewing the community PR's @jacob314 and the whole team... well I can just wait in this moment. my PR is so small compared to rest of community, no wonder it is p3 priority. thanks again ! |
|
will resolve the conflicts soon ! please let me know if i missed something ! |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request effectively reorganizes the built-in themes into dark and light categories, which significantly improves the project structure and maintainability. The changes are well-executed, with all import paths correctly updated across the codebase. I have one suggestion regarding the categorization of the NoColorTheme to further enhance the logical grouping.
| import { NoColorTheme } from './no-color.js'; | ||
| import { ANSI } from './builtin/dark/ansi.js'; | ||
| import { ANSILight } from './builtin/light/ansi-light.js'; | ||
| import { NoColorTheme } from './builtin/dark/no-color.js'; |
There was a problem hiding this comment.
The NoColorTheme is being categorized as a 'dark' theme by placing it in the builtin/dark/ directory. While this might be a fallback for dark themes, a "no color" theme is conceptually neutral, neither dark nor light. Placing it in the dark directory could be misleading for future maintenance.
To better reflect its neutral nature, consider moving no-color.ts to the root of the builtin directory (e.g., packages/cli/src/ui/themes/builtin/no-color.ts).
| import { NoColorTheme } from './builtin/dark/no-color.js'; | |
| import { NoColorTheme } from './builtin/no-color.js'; |
There was a problem hiding this comment.
eagle eyed ! Bravo
- Moved no-color.ts to the root of the builtin/ directory. - Renamed light and dark themes to append '-light.ts' and '-dark.ts' to ensure consistency. - Updated import statements in theme-manager.ts and affected components. - Bumped copyright headers to 2026 for all modified theme files.
|
Previously, some theme files followed a consistent naming convention (e.g., including -light or -dark), while others did not. For example, a light theme file such as solarized.ts did not explicitly indicate that it was a light variant. To improve clarity and maintain consistency, I renamed such files to explicitly include their variant in the filename (e.g., solarized-light.ts). The same convention has been applied to all dark theme files as well. Now: All light theme files end with -light All dark theme files end with -dark This ensures a consistent naming pattern across the codebase and helps future contributors avoid the confusion I initially experienced when navigating and extending the theme system. |
|
Also updated copyright to 2026, i only updated the files i touched ! |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a well-executed refactoring that reorganizes the built-in CLI themes into dark and light directories. All file moves and import path updates are consistent with the new structure, improving the codebase's organization and maintainability. I have reviewed the changes and found no issues.
|
The more i contribute here , the more i realize the importance of Human eyes and constant questioning one's own sanity ! |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a refactoring that reorganizes the built-in CLI themes into dark/ and light/ subdirectories, which improves the project's structure and maintainability. The changes are consistent across the codebase, with all relevant import paths updated to reflect the new file locations. The refactoring appears to be complete and correct, with no functional changes introduced.


Summary
Reorganize the built-in CLI themes into a clearer, categorized directory structure by separating dark and light themes into dedicated folders. This improves maintainability, discoverability, and overall codebase organization.
Details
Moved all dark theme files to:
packages/cli/src/ui/themes/builtin/dark/Moved all light theme files to:
packages/cli/src/ui/themes/builtin/light/Updated all affected import paths across the CLI package, including:
Updated
useTerminalTheme.test.tsx:Performed a clean build and verified that theme switching works correctly after the refactor
Impact
Related Issues
#18633