Skip to content

fix(task): remove red/yellow from task prefix colors#8782

Merged
jdx merged 1 commit intojdx:mainfrom
lechuckcaptain:fix/task-prefix-colors
Apr 16, 2026
Merged

fix(task): remove red/yellow from task prefix colors#8782
jdx merged 1 commit intojdx:mainfrom
lechuckcaptain:fix/task-prefix-colors

Conversation

@lechuckcaptain
Copy link
Copy Markdown
Contributor

@lechuckcaptain lechuckcaptain commented Mar 26, 2026

Summary

  • Removes red and yellow from the task prefix color palette, as they can be confused with errors/warnings and their legibility depends on the unknown terminal background color
  • Replaces the 6-color palette with 16 styles: 4 base colors (blue, magenta, cyan, green) combined with 4 modifiers (regular, bold, dim, bright)
  • Color is determined by hashing the task display name; consecutive hash values cycle through hues first, then modifiers

Closes #4142

@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 refines the visual presentation of task prefixes by overhauling the color selection logic. The primary goal is to enhance readability and differentiation of concurrent tasks in the terminal output, moving away from potentially ambiguous colors and introducing a broader, more distinct set of styles.

Highlights

  • Task Prefix Colors: Removed red and yellow from the task prefix color palette to avoid confusion with errors/warnings and ensure better legibility across various terminal backgrounds.
  • Expanded Color Palette: Replaced the previous 6-color palette with 12 distinct styles, incorporating blue, magenta, cyan, and green with regular, bold, and dim variants.
  • Color Interleaving: Implemented a new color ordering strategy to interleave styles, ensuring that adjacent task prefixes have maximally distinct hues and modifiers.
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.

@lechuckcaptain
Copy link
Copy Markdown
Contributor Author

lechuckcaptain commented Mar 26, 2026

Testing

Sample mise.toml to test the prefix colors with 12 parallel tasks:

[tasks.color-test]
description = "Run all color test subtasks"
depends = [
  "alpha", "bravo", "charlie", "delta",
  "echo", "foxtrot", "golf", "hotel",
  "india", "juliet", "kilo", "lima",
  "mike", "november", "oscar", "papa",
]

[tasks.alpha]
run = "echo 'Hello from alpha' && sleep 0.3"
[tasks.bravo]
run = "echo 'Hello from bravo' && sleep 0.3"
[tasks.charlie]
run = "echo 'Hello from charlie' && sleep 0.3"
[tasks.delta]
run = "echo 'Hello from delta' && sleep 0.3"
[tasks.echo]
run = "echo 'Hello from echo' && sleep 0.3"
[tasks.foxtrot]
run = "echo 'Hello from foxtrot' && sleep 0.3"
[tasks.golf]
run = "echo 'Hello from golf' && sleep 0.3"
[tasks.hotel]
run = "echo 'Hello from hotel' && sleep 0.3"
[tasks.india]
run = "echo 'Hello from india' && sleep 0.3"
[tasks.juliet]
run = "echo 'Hello from juliet' && sleep 0.3"
[tasks.kilo]
run = "echo 'Hello from kilo' && sleep 0.3"
[tasks.lima]
run = "echo 'Hello from lima' && sleep 0.3"
[tasks.mike]
run = "echo 'Hello from mike' && sleep 0.3"
[tasks.november]
run = "echo 'Hello from november' && sleep 0.3"
[tasks.oscar]
run = "echo 'Hello from oscar' && sleep 0.3"
[tasks.papa]
run = "echo 'Hello from papa' && sleep 0.3"
image

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 refactors the task prefix styling in src/task/mod.rs. It transitions from using basic console::Color enums to more versatile console::Style objects, enabling richer and more complex visual formatting for task prefixes. There are no review comments to address.

@lechuckcaptain lechuckcaptain force-pushed the fix/task-prefix-colors branch 3 times, most recently from 0dec465 to a8d141e Compare March 26, 2026 14:51
@lechuckcaptain lechuckcaptain force-pushed the fix/task-prefix-colors branch from 73e009e to 85b067b Compare April 16, 2026 13:33
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 16, 2026

Greptile Summary

This PR replaces the 6-color task prefix palette (which included red and yellow) with 4 base colors (blue, magenta, cyan, green) combined with 4 modifiers (regular, bold, dim, bright), yielding 16 distinct styles. Color selection uses a simple sum-of-character-code-points hash over display_name, which is adequate for a cosmetic feature.

Confidence Score: 5/5

Safe to merge — purely cosmetic change with no logic or correctness issues.

The change is confined to color/style selection in estyled_prefix. No P0/P1 issues were found; the 4-color × 4-modifier palette and sum-hash approach are functionally correct. Previously discussed concerns (16 vs 12 styles, cycling order) were already addressed in prior review threads.

No files require special attention.

Important Files Changed

Filename Overview
src/task/mod.rs Replaces 6-color prefix palette with 4 colors × 4 modifiers (16 styles); logic is correct and the static COLORS is properly lazily initialized.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["estyled_prefix()"] --> B["hash = sum of char code points in display_name"]
    B --> C["color = COLORS[hash % 4]\nBlue / Magenta / Cyan / Green"]
    C --> D{"(hash / 4) % 4"}
    D -- "0 (default)" --> E["regular"]
    D -- "1" --> F["bold"]
    D -- "2" --> G["dim"]
    D -- "3" --> H["bright"]
    E & F & G & H --> I["ereset() + styled prefix string"]
Loading

Reviews (3): Last reviewed commit: "fix(task): remove red/yellow from task p..." | Re-trigger Greptile

Comment thread src/task/mod.rs
Red and yellow are excluded from the task prefix color palette because
they can be confused with errors/warnings, and their legibility
depends on the terminal background color which is unknown.

The palette now uses blue, magenta, cyan, and green with bold/dim
modifiers, interleaved so adjacent indices are visually distinct.

Closes jdx#4142
@lechuckcaptain lechuckcaptain force-pushed the fix/task-prefix-colors branch from 343b3b2 to b37f5a4 Compare April 16, 2026 13:51
@lechuckcaptain lechuckcaptain marked this pull request as ready for review April 16, 2026 13:57
@jdx jdx merged commit 5a2fe0c into jdx:main Apr 16, 2026
34 checks passed
mise-en-dev added a commit that referenced this pull request Apr 17, 2026
### 🚀 Features

- **(registry)** add .perl-version support for perl by @ergofriend in
[#9102](#9102)
- **(task)** add Tera template support for inline table run tasks by
@iamkroot in [#9079](#9079)

### 🐛 Bug Fixes

- **(env)** use runtime symlink paths for fuzzy versions by @jdx in
[#9143](#9143)
- **(github)** use full token resolution chain for attestation
verification by @jdx in [#9154](#9154)
- **(go)** Remove install-time version override for subpath packages by
@c22 in [#9135](#9135)
- **(npm)** respect install_before when resolving dist-tag versions by
@webkaz in [#9145](#9145)
- **(self-update)** ensure subcommand exists by @salim-b in
[#9144](#9144)
- **(task)** show available tasks when run target missing by @jdx in
[#9141](#9141)
- **(task)** forward task help args and add raw_args by @jdx in
[#9118](#9118)
- **(task)** remove red/yellow from task prefix colors by
@lechuckcaptain in [#8782](#8782)
- **(task)** merge TOML task block into same-named file task and surface
resolved dir by @jdx in [#9147](#9147)
- **(toolset)** round-trip serialized tool options by @atharvasingh7007
in [#9124](#9124)
- **(vfox)** fallback to absolute bin path if env_keys not set by
@80avin in [#9151](#9151)

### 📚 Documentation

- make agent guide wording generic by @jdx in
[#9142](#9142)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:deb docker digest to e019cb9 by @renovate[bot]
in [#9160](#9160)
- update ghcr.io/jdx/mise:copr docker digest to 8d25608 by
@renovate[bot] in [#9159](#9159)
- update ghcr.io/jdx/mise:rpm docker digest to 22e52da by @renovate[bot]
in [#9161](#9161)
- update ghcr.io/jdx/mise:alpine docker digest to a3da97c by
@renovate[bot] in [#9158](#9158)
- update rust docker digest to 4a2ef38 by @renovate[bot] in
[#9162](#9162)
- update ubuntu:24.04 docker digest to c4a8d55 by @renovate[bot] in
[#9164](#9164)
- update rust crate aws-lc-rs to v1.16.3 by @renovate[bot] in
[#9165](#9165)
- update ubuntu docker tag to resolute-20260413 by @renovate[bot] in
[#9169](#9169)
- update rust crate clap to v4.6.1 by @renovate[bot] in
[#9166](#9166)
- update taiki-e/install-action digest to a2352fc by @renovate[bot] in
[#9163](#9163)
- update rust crate ctor to 0.10 by @renovate[bot] in
[#9170](#9170)
- update rust crate tokio to v1.52.1 by @renovate[bot] in
[#9167](#9167)
- update rust crate rmcp-macros to 0.17 by @renovate[bot] in
[#9173](#9173)
- update rust crate signal-hook to 0.4 by @renovate[bot] in
[#9177](#9177)
- update rust crate zipsign-api to 0.2 by @renovate[bot] in
[#9180](#9180)
- update rust crate toml_edit to 0.25 by @renovate[bot] in
[#9179](#9179)
- update rust crate strum to 0.28 by @renovate[bot] in
[#9178](#9178)

### 📦 Registry

- add ibmcloud by @dnwe in
[#9139](#9139)
- add rush by @jdx in [#9146](#9146)

### New Contributors

- @80avin made their first contribution in
[#9151](#9151)
- @atharvasingh7007 made their first contribution in
[#9124](#9124)
- @lechuckcaptain made their first contribution in
[#8782](#8782)
- @ergofriend made their first contribution in
[#9102](#9102)
- @dnwe made their first contribution in
[#9139](#9139)

## 📦 Aqua Registry Updates

#### New Packages (3)

-
[`controlplaneio-fluxcd/flux-operator`](https://github.com/controlplaneio-fluxcd/flux-operator)
-
[`dependency-check/DependencyCheck`](https://github.com/dependency-check/DependencyCheck)
- [`kiro.dev/kiro-cli`](https://github.com/kiro.dev/kiro-cli)

#### Updated Packages (2)

-
[`jreleaser/jreleaser/standalone`](https://github.com/jreleaser/jreleaser/standalone)
- [`sigstore/cosign`](https://github.com/sigstore/cosign)
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.

2 participants