Skip to content

fix(cli): remove hardcoded white color from CLI output#1088

Merged
yamadashy merged 2 commits intomainfrom
fix/cli-report-white-color
Jan 12, 2026
Merged

fix(cli): remove hardcoded white color from CLI output#1088
yamadashy merged 2 commits intomainfrom
fix/cli-report-white-color

Conversation

@yamadashy
Copy link
Owner

@yamadashy yamadashy commented Jan 11, 2026

Remove pc.white() calls from cliReport.ts to use the terminal's default foreground color instead.

This fixes visibility issues on light-themed terminals like Solarized Light where white text becomes unreadable against a light background.

Closes #1057

Light mode

image

Dark mode

image

Checklist

  • Run npm run test
  • Run npm run lint

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yamadashy, 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 enhances the user experience of the command-line interface by eliminating instances of hardcoded white text in its output. By allowing the terminal to render text using its default foreground color, the changes significantly improve readability, especially for users who prefer or are required to use light-themed terminal environments where white text on a light background would be unreadable.

Highlights

  • Improved CLI Readability: Removed hardcoded white color (pc.white()) from CLI output messages to ensure better visibility on various terminal themes, especially light ones.
  • Default Terminal Colors: The CLI output now leverages the terminal's default foreground color, enhancing accessibility and user experience.
  • Test Updates: Adjusted unit tests to reflect the removal of the pc.white() function mock and updated expected log outputs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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

  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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Removes color formatting from CLI report output by replacing pc.white wrapping with plain strings across pack summary, security checks, and file listings. Updates test expectations to reflect the removed white-color prefix from all affected assertions.

Changes

Cohort / File(s) Change Summary
CLI Report Color Removal
src/cli/cliReport.ts
Removes pc.white color wrapping from headers, labels, and data lines in security check, pack summary, top files, and completion messages. Affects "Pack Summary", "Security Check", totals (Total Files/Tokens/Chars), "Output", "Git Diffs", file paths, and completion text while preserving underlying logic and structure.
Test Expectation Updates
tests/cli/cliReport.test.ts
Updates test assertions to remove WHITE: prefix from expected output strings, aligning with removal of pc.white wrapping in source. Maintains control flow validation while reflecting new plaintext output format.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the primary change: removing hardcoded white color from CLI output.
Linked Issues check ✅ Passed The PR addresses the core objective of #1057 by removing hardcoded white color, allowing terminals to use default foreground color and improving compatibility with light-themed terminals like Solarized Light.
Out of Scope Changes check ✅ Passed All changes are focused on removing pc.white() calls from CLI output files and updating corresponding tests, which are directly scoped to the linked issue objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the change (removing pc.white() calls), the motivation (visibility issues on light-themed terminals), provides visual evidence, and confirms both npm run test and npm run lint were executed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cli-report-white-color

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 11, 2026

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69e117b
Status: ✅  Deploy successful!
Preview URL: https://16308b70.repomix.pages.dev
Branch Preview URL: https://fix-cli-report-white-color.repomix.pages.dev

View logs

Copy link
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 effectively addresses the visibility issue of CLI output on light-themed terminals by removing hardcoded pc.white() calls. The changes are consistent across the cliReport.ts file and the corresponding tests are updated correctly. I've added a few suggestions to improve the formatting of lists for better alignment and consistency, which is a minor enhancement made possible by these changes.

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.17%. Comparing base (e930545) to head (69e117b).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/cli/cliReport.ts 95.65% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1088   +/-   ##
=======================================
  Coverage   87.16%   87.17%           
=======================================
  Files         116      116           
  Lines        4379     4382    +3     
  Branches     1019     1019           
=======================================
+ Hits         3817     3820    +3     
  Misses        562      562           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude
Copy link
Contributor

claude bot commented Jan 11, 2026

Code Review: PR #1088 - fix(cli): remove hardcoded white color from CLI output

Summary

This PR fixes visibility issues on light-themed terminals (e.g., Solarized Light) by removing pc.white() calls from CLI output. The change allows text to use the terminal's default foreground color instead of hardcoding white.

Verdict: ✅ LGTM - Approve


Detailed Analysis

Code Quality

The changes are clean and focused. The PR removes 26 lines of pc.white() wrapper calls and updates 4 test expectations accordingly. The semantic coloring (pc.green, pc.yellow, pc.dim) is preserved where it conveys meaning (success, warnings, de-emphasized text).

Consistency Check

I verified that pc.white is no longer used anywhere in the src/ directory after this change. The remaining color usages are appropriate:

  • pc.green() - Success indicators (✔, completion messages)
  • pc.yellow() - Warnings (suspicious files, security issues)
  • pc.dim() - De-emphasized/secondary information
  • pc.cyan() - Accents (spinners, highlights)

Test Coverage

Tests are properly updated to match the new expected output format. The mock for pc.white was removed, and test assertions were updated to expect plain strings instead of WHITE: prefixed strings.


Premortem Analysis

Potential Failure Scenarios & Mitigations
Scenario Risk Level Mitigation
Terminal with no default color Low Terminals without a default foreground color are extremely rare. Standard terminals (bash, zsh, Windows Terminal, iTerm2) all have sensible defaults.
Regression in visual hierarchy Low The semantic colors (green, yellow, dim) are preserved, maintaining visual distinction where it matters.
Missing test coverage Low Tests cover the changed functions and verify the expected output format.

Minor Observations

  1. The PR cleanly addresses the root cause identified in Support solarized color scheme #1057 - white text is unreadable on light backgrounds.

  2. The approach follows best practices: using default terminal colors for regular text while reserving semantic colors for meaningful distinctions.

  3. Commit message follows Conventional Commits format correctly: fix(cli): ...


No blocking issues found. This is a well-scoped fix that improves accessibility for users with light-themed terminals.

Remove pc.white() calls from cliReport.ts to use terminal's default
foreground color instead. This fixes visibility issues on light-themed
terminals like Solarized Light where white text is unreadable.

Closes #1057
Use padEnd(3) consistently across all list outputs for better
alignment.
@yamadashy yamadashy force-pushed the fix/cli-report-white-color branch from 760cb5d to 69e117b Compare January 12, 2026 05:41
@claude
Copy link
Contributor

claude bot commented Jan 12, 2026

Follow-up Review: PR #1088

I noticed an additional commit was pushed since my last review:

  • style(cli): align index numbers with consistent padding - Uses padEnd(3) consistently across all list outputs

This is a good style improvement that complements the main fix. The consistent padding ensures proper alignment when listing items (suspicious files, binary files, top files, git security issues).

Verdict: ✅ Still LGTM

Updated Observations

The new commit applies consistent formatting across 4 places in cliReport.ts:

  1. reportSecurityCheck - suspicious files list (line 154)
  2. reportSuspiciousGitContent - git security issues list (line 177)
  3. reportTopFiles - top files list (already had this pattern)
  4. reportSkippedFiles - binary files list (line 232)

All use the same pattern: const indexString = \${index + 1}.`.padEnd(3, ' ');`

This ensures consistent formatting for lists 1-9 (single digit) vs 10+ (double digit).

No new concerns. Ready to merge.

@yamadashy yamadashy merged commit d6d3bb5 into main Jan 12, 2026
128 of 139 checks passed
@yamadashy yamadashy deleted the fix/cli-report-white-color branch January 12, 2026 05:57
yamadashy added a commit that referenced this pull request Jan 18, 2026
Add release notes for v1.11.1 covering:
- Multi-root directory labels (#1024)
- Non-interactive skill generation options (#1022)
- Remote git command timeout fix (#1078)
- CLI output visibility fix for light themes (#1088)
- Library bundling documentation (#1075)

Improve release note generation guidelines:
- Clarify "What's New" vs "Improvements" usage
- Add rule to include related issue numbers with PRs
- Add rule to include links in documentation sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support solarized color scheme

1 participant