feat(cli): add a global --color flag and fix queue-show glyphs#1656
Merged
Conversation
This was referenced Jun 19, 2026
Contributor
Merge Protections🟢 All 5 merge protections satisfied — ready to merge. Show 5 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
|
This was referenced Jun 19, 2026
Contributor
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Jun 19, 2026
9092426 to
7d5e952
Compare
3f98270 to
59dc281
Compare
Contributor
Author
Revision history
|
59dc281 to
e3c3289
Compare
7d5e952 to
18dabc5
Compare
e3c3289 to
a1e3b01
Compare
18dabc5 to
8b05d13
Compare
Base automatically changed from
devs/JulianMaurin/feat/rust-cli-excellence/honor-github-rate-limits-bound-connect-time--cbc95194
to
main
June 23, 2026 07:37
Color was decided solely by `NO_COLOR` + `stdout().is_terminal()`, so there was no way to force color through a pager or CI log viewer, and no `--color` switch. Add a global `--color <auto|always|never>` (accepted on every subcommand), resolved once at startup into a process-wide `mergify_tui::ColorChoice`. `Theme::detect` now honors, in order: explicit `always`/`never`; then `NO_COLOR` (off); then `FORCE_COLOR` / `CLICOLOR_FORCE` (on); then the TTY check. The decision is factored into a pure, unit-tested `resolve_enabled`. Also fix `queue show`'s check-state glyphs, which used an `⏰` double-width emoji (the exact column-misalignment failure the glyph vocabulary forbids), plus an out-of-set `◌` and `?`: map them onto the mandated single-width set (`●` pending, `✗` timed-out, `—` unknown). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Change-Id: Ib7a20690d1869e6209112a140870a48fad25d7e3
a1e3b01 to
f3bea6c
Compare
jd
approved these changes
Jun 23, 2026
kozlek
approved these changes
Jun 23, 2026
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 1 minute 12 seconds in the queue, including 5 seconds running CI. Required conditions to merge
|
mergify Bot
pushed a commit
that referenced
this pull request
Jun 23, 2026
`--debug` was a documented no-op and there was no structured logging, so when a network-heavy command hung or retried there was no way to see what it was doing. Add a global `-v/--verbose` (repeatable: -v info, -vv debug, -vvv trace) and initialise a `tracing_subscriber` that writes to stderr — stdout stays clean for piping. `--debug` is repurposed as a shorthand that floors the level at debug. `RUST_LOG` overrides the flag-derived filter; only our own crates are raised so -vv doesn't drown in hyper/reqwest noise. `stack list` and `queue show` previously declared their own `--verbose` detail flag; they now read the global one, so `-v` carries a single meaning everywhere and clap no longer sees a colliding arg id. Instrument the HTTP retry driver (mergify-core::http) with debug/warn events for each request attempt and every retry decision (5xx, rate-limit, transient send error) including the backoff/wait — never logging the bearer token. `mergify <cmd> -vv` now shows the request attempts and retry timing on stderr. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Depends-On: #1656
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Color was decided solely by
NO_COLOR+stdout().is_terminal(), sothere was no way to force color through a pager or CI log viewer, and
no
--colorswitch.Add a global
--color <auto|always|never>(accepted on everysubcommand), resolved once at startup into a process-wide
mergify_tui::ColorChoice.Theme::detectnow honors, in order:explicit
always/never; thenNO_COLOR(off); thenFORCE_COLOR/CLICOLOR_FORCE(on); then the TTY check. The decision is factoredinto a pure, unit-tested
resolve_enabled.Also fix
queue show's check-state glyphs, which used an⏰double-width emoji (the exact column-misalignment failure the glyph
vocabulary forbids), plus an out-of-set
◌and?: map them onto themandated single-width set (
●pending,✗timed-out,—unknown).Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com