Skip to content

feat(cli): add a global --color flag and fix queue-show glyphs#1656

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690
Jun 23, 2026
Merged

feat(cli): add a global --color flag and fix queue-show glyphs#1656
mergify[bot] merged 1 commit into
mainfrom
devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690

Conversation

@JulianMaurin

@JulianMaurin JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 5 merge protections satisfied — ready to merge.

Show 5 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

@JulianMaurin

JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(cli): add a global --color flag and fix queue-show glyphs #1656 👈
2 feat(cli): add a -v/-vv verbosity ladder backed by tracing #1657
3 feat(cli): generate shell completions and a man page #1658
4 test: golden-snapshot the CLI surface and guard schema drift #1659
5 refactor: dedupe the GIT_SEQUENCE_EDITOR lookup and drop port cruft #1660
6 docs(agents): rewrite AGENTS.md for the Rust workspace #1661
7 fix(cli): render stack-squash validation errors via clap #1671

@JulianMaurin JulianMaurin marked this pull request as ready for review June 19, 2026 07:13
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/honor-github-rate-limits-bound-connect-time--cbc95194 branch from 9092426 to 7d5e952 Compare June 19, 2026 07:52
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690 branch from 3f98270 to 59dc281 Compare June 19, 2026 07:52
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 19, 2026 07:52 Failure
@JulianMaurin

JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3f98270 2026-06-19 07:52 UTC
2 rebase 3f98270 → 59dc281 (rebase only) 2026-06-19 07:52 UTC
3 content 59dc281 → e3c3289 (raw) 2026-06-19 16:51 UTC
4 rebase e3c3289 → a1e3b01 (rebase only) 2026-06-22 13:00 UTC
5 rebase a1e3b01 → f3bea6c (rebase only) 2026-06-23 07:41 UTC

@mergify mergify Bot requested a review from a team June 19, 2026 07:58
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690 branch from 59dc281 to e3c3289 Compare June 19, 2026 16:51
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/honor-github-rate-limits-bound-connect-time--cbc95194 branch from 7d5e952 to 18dabc5 Compare June 19, 2026 16:51
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 19, 2026 16:51 Failure
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690 branch from e3c3289 to a1e3b01 Compare June 22, 2026 13:00
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/honor-github-rate-limits-bound-connect-time--cbc95194 branch from 18dabc5 to 8b05d13 Compare June 22, 2026 13:00
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 22, 2026 13:01 Failure
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
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690 branch from a1e3b01 to f3bea6c Compare June 23, 2026 07:41
@mergify mergify Bot deployed to Mergify Merge Protections June 23, 2026 07:41 Active
@mergify mergify Bot requested a review from a team June 23, 2026 07:48
@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-23 07:52 UTC · Rule: default · triggered by merge protections
  • Checks skipped · PR is already up-to-date
  • Merged2026-06-23 07:54 UTC · at f3bea6c05916ce47d8b584eca40630eed229b39e · squash

This pull request spent 1 minute 12 seconds in the queue, including 5 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit 6ed654b into main Jun 23, 2026
22 checks passed
@mergify mergify Bot deleted the devs/JulianMaurin/feat/rust-cli-excellence/add-global-color-flag-fix-queue-show-glyphs--b7a20690 branch June 23, 2026 07:54
@mergify mergify Bot added queued and removed queued labels Jun 23, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants