-
-
Notifications
You must be signed in to change notification settings - Fork 752
fix(packages/cli-v3/src/utilities/cliOutput.ts): improve contrast for chalkWorker in light mode #2239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(packages/cli-v3/src/utilities/cliOutput.ts): improve contrast for chalkWorker in light mode #2239
Conversation
🦋 Changeset detectedLatest commit: 8cfdd29 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe function responsible for styling text output in the CLI was updated. Instead of applying a custom hex color ( 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (24)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/cli-v3/src/utilities/cliOutput.ts (1)
40-42
: Centralize the worker color to keep the palette tweak-friendly
chalkWorker()
is now the only helper that embeds a chalk style directly. For symmetry withgreen
andpurple
, expose the color through a constant so future palette tweaks are one-liners.+export const workerColour = chalk.yellowBright; + export function chalkWorker(text: string) { - return chalk.yellowBright(text); + return workerColour(text); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/cli-v3/src/utilities/cliOutput.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{ts,tsx}`: Always prefer using isomorphic code like fetch, ReadableStream,...
**/*.{ts,tsx}
: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
Use strict mode
No default exports, use function declarations
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
packages/cli-v3/src/utilities/cliOutput.ts
⏰ Context from checks skipped due to timeout of 90000ms (24)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: typecheck / typecheck
🔇 Additional comments (1)
packages/cli-v3/src/utilities/cliOutput.ts (1)
40-42
: Quick-win accepted – brighter yellow greatly improves light-mode contrastSwitching from the low-contrast
#FFFF89
hex tochalk.yellowBright
is a pragmatic, zero-risk fix that immediately boosts readability across common terminals.
Related to #2214
The CLI uses chalk for text color. Currently, the contrast is rather poor in light mode, especially
chalkWorker
which is unreadable.Unfortunately, there's no way to use different colors for light/dark mode and there's no reliable way to detect the terminal background color.
This PR is just a quick fix and changes the color for
chalkWorker
from#FFFF89
toyellowBright
to make the text at least readable in light mode.Below is a screenshot for what each color looks like in light mode for reference:
Compared to in dark mode:
No, I did not run the code locally to test. Tried to but ran into some errors when trying to migrate the db when running
pnpm run db:migrate
, "Error: P1010: Userpostgres
was denied access on the databasepostgres.public
" and gave up 😅 .