feat: colour each bucket in the summary, not the whole line #22

Merged
barrettruth merged 1 commit from feat/colour-the-summary into main 2026-07-27 23:46:13 +00:00
Owner

Checklist

  • I have read CONTRIBUTING.md.
  • No AI was used to generate, edit, or review any part of this contribution.

Problem

The whole summary took the worst bucket's colour, so 1 fail, 4 skipped, 36/41 passing was red end to end — including the 36 that passed.

Solution

CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59  feat(exmode)…
    StatusLine   "CI neovim/neovim | "
    CiSkipped    "2 skipped"
    StatusLine   ", "
    CiPass       "41/43 passing"
    StatusLine   " | 8739bc59  feat(exmode)…"

Each count carries its own group and the commas stay plain.

b:ci.status now holds 'statusline' markup instead of bare text. That is
what the %{%…%} form is for, and it is how the single job symbol was already
being coloured — just one level up, in the winbar string. Moving it to the
source lets one value carry more than one colour:

LOG neovim/neovim | ✓ Analyze | codeql
    CiPass       "✓"

status_hl goes away with it, since nothing needs telling afterwards how to
paint a value that already knows. So does the worst-bucket search in
summarize, which existed only to pick that one colour.

## Checklist - [x] I have read [CONTRIBUTING.md](https://forge.barrettruth.com/barrettruth/ci.nvim/src/branch/main/CONTRIBUTING.md). - [ ] No AI was used to generate, edit, or review any part of this contribution. ## Problem The whole summary took the worst bucket's colour, so `1 fail, 4 skipped, 36/41 passing` was red end to end — including the 36 that passed. ## Solution ``` CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59 feat(exmode)… StatusLine "CI neovim/neovim | " CiSkipped "2 skipped" StatusLine ", " CiPass "41/43 passing" StatusLine " | 8739bc59 feat(exmode)…" ``` Each count carries its own group and the commas stay plain. `b:ci.status` now holds `'statusline'` markup instead of bare text. That is what the `%{%…%}` form is for, and it is how the single job symbol was already being coloured — just one level up, in the winbar string. Moving it to the source lets one value carry more than one colour: ``` LOG neovim/neovim | ✓ Analyze | codeql CiPass "✓" ``` `status_hl` goes away with it, since nothing needs telling afterwards how to paint a value that already knows. So does the worst-bucket search in `summarize`, which existed only to pick that one colour.
feat: colour each bucket in the summary, not the whole line
All checks were successful
quality / Test (pull_request) Successful in 7s
quality / Format (pull_request) Successful in 12s
quality / Lint (pull_request) Successful in 12s
99f102a699
The winbar painted the entire summary in the worst bucket's colour, so "1
fail, 4 skipped, 36/41 passing" was red from end to end, including the part
that was passing. Each count now carries its own, and the commas stay plain.

b:ci.status holds 'statusline' markup rather than bare text, which is what
the %{%…%} form exists for and is how the single symbol was already being
coloured, one level up in the winbar string. Doing it at the source lets a
value carry more than one colour, and status_hl goes away with it: nothing
needs to be told afterwards how to paint something that already knows.

Dropping it also removes the worst-bucket search, which existed only to
decide that one colour.
barrettruth deleted branch feat/colour-the-summary 2026-07-27 23:46:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
barrettruth/ci.nvim!22
No description provided.