fix: stop echoing the buffer's own name back into its winbar #18

Merged
barrettruth merged 1 commit from fix/winbar-no-echo into main 2026-07-27 23:11:58 +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 winbar sits beside the buffer's name, not instead of it, so anything it
repeats is a wasted column. Two views were repeating their own identifier:

ci://neovim/neovim/checks/e3c5974a…
CI neovim/neovim | 29 passing | e3c5974a  feat(dir): open cwd with `1-` #40948

ci://neovim/neovim/pr/41010
CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59  #41010 feat(exmode)…

Solution

Each winbar carries the state, a human label, and whichever identifier the name
does not already hold.

buffer name holds winbar
checks/{oid} the SHA CI {repo} │ {summary} │ {subject}
pr/{n} the number CI {repo} │ {summary} │ {sha8} {title}
run/{id} the run id CI {repo} │ {summary} │ {sha8} {workflow}
job/{id} the job id LOG {repo} │ {sym} {job} │ {workflow}
CI neovim/neovim | 29 passing | feat(dir): open cwd with `1-` #40948
CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59  feat(exmode): `1q:`…

The two SHAs that stay are the ones their names lack: a pr/ or run/ buffer
is named by a number, so the commit under test is new information. The run view
already followed this after #17, and the job view needed nothing.

{workflow} stays on the job line because job names repeat across workflows —
Analyze alone does not identify it, and workflow_name is the workflow's
name: key rather than its filename.

Dropping the SHA from the checks winbar is safe because every name the plugin
produces resolves to the full OID first, including :CI master. A hand-typed
ci://…/checks/master keeps that spelling, but that form is documented as
round-tripping a name the plugin gave you.

## 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 winbar sits beside the buffer's name, not instead of it, so anything it repeats is a wasted column. Two views were repeating their own identifier: ``` ci://neovim/neovim/checks/e3c5974a… CI neovim/neovim | 29 passing | e3c5974a feat(dir): open cwd with `1-` #40948 ci://neovim/neovim/pr/41010 CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59 #41010 feat(exmode)… ``` ## Solution Each winbar carries the state, a human label, and whichever identifier the name does *not* already hold. | buffer | name holds | winbar | | --- | --- | --- | | `checks/{oid}` | the SHA | `CI {repo} │ {summary} │ {subject}` | | `pr/{n}` | the number | `CI {repo} │ {summary} │ {sha8} {title}` | | `run/{id}` | the run id | `CI {repo} │ {summary} │ {sha8} {workflow}` | | `job/{id}` | the job id | `LOG {repo} │ {sym} {job} │ {workflow}` | ``` CI neovim/neovim | 29 passing | feat(dir): open cwd with `1-` #40948 CI neovim/neovim | 2 skipped, 41/43 passing | 8739bc59 feat(exmode): `1q:`… ``` The two SHAs that stay are the ones their names lack: a `pr/` or `run/` buffer is named by a number, so the commit under test is new information. The run view already followed this after #17, and the job view needed nothing. `{workflow}` stays on the job line because job names repeat across workflows — `Analyze` alone does not identify it, and `workflow_name` is the workflow's `name:` key rather than its filename. Dropping the SHA from the checks winbar is safe because every name the plugin produces resolves to the full OID first, including `:CI master`. A hand-typed `ci://…/checks/master` keeps that spelling, but that form is documented as round-tripping a name the plugin gave you.
fix: stop echoing the buffer's own name back into its winbar
All checks were successful
quality / Test (pull_request) Successful in 6s
quality / Lint (pull_request) Successful in 9s
quality / Format (pull_request) Successful in 9s
70dc77e942
A checks buffer is named by the commit and then opened its winbar with the
same commit; a pull request buffer is named by the number and led with the
same number. The winbar is beside the name, not instead of it, so anything it
repeats is a wasted column.

What each one keeps is the state, a human label, and whichever identifier the
name does not already carry. That leaves the commit's subject alone on one and
the head SHA before the title on the other, since a pull request is named by
number and the commit it is testing is genuinely something new.

The rule holds for the run view after the previous change and needs nothing
from the job view, whose name is a job id and whose winbar shows neither that
nor anything else twice.
barrettruth deleted branch fix/winbar-no-echo 2026-07-27 23:11:58 +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!18
No description provided.