feat: report loading as a progress message #30

Merged
barrettruth merged 1 commit from feat/progress into main 2026-07-28 00:29:54 +00:00
Owner

Checklist

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

Problem

Nothing was echoed while a view loaded. 'busy' marks a buffer without saying
what is being done to it, and it cannot say anything at all about :CI master,
which resolves a revision before any buffer exists — so a slow one looked
like the command had been ignored.

Solution

ci: Resolving master
ci: Loading neovim/neovim checks

ci: Loading neovim/neovim job 90019927064
ci:  39% Loading neovim/neovim job 90019927064
ci:  78% Loading neovim/neovim job 90019927064

The message has the same lifetime as 'busy' — it starts where the flag is
raised and ends where it is cleared, so it hooks into the two places every load
already passes through rather than being sprinkled through each fetch. Handing
the id back revises one message instead of queueing several.

The chunked paint reports a real percentage, being the only part of the work
with a denominator. The requests report nil, which |progress-message|
defines as unknown progress.

Verified through the Progress autocommand: running → 39% → 78% → success
for a job, running → success twice for :CI master (resolve, then load).

Version

kind='progress' needs 0.13, so that is the floor: health.lua, both
Requirements lists, and the now-redundant "(Neovim 0.12+)" note on the
vim.pack instructions.

The dev shell takes Neovim from nix-community/neovim-nightly-overlay instead
of nixpkgs, which is still on 0.12.4 and would otherwise run the tests against
an API the plugin now depends on:

before  NVIM v0.12.4              kind='progress' throws
after   NVIM v0.13.0-nightly      kind='progress' works

guh.nvim requires 0.13+ for exactly this API.

## 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 Nothing was echoed while a view loaded. `'busy'` marks a buffer without saying what is being done to it, and it cannot say anything at all about `:CI master`, which resolves a revision *before* any buffer exists — so a slow one looked like the command had been ignored. ## Solution ``` ci: Resolving master ci: Loading neovim/neovim checks ci: Loading neovim/neovim job 90019927064 ci: 39% Loading neovim/neovim job 90019927064 ci: 78% Loading neovim/neovim job 90019927064 ``` The message has the same lifetime as `'busy'` — it starts where the flag is raised and ends where it is cleared, so it hooks into the two places every load already passes through rather than being sprinkled through each fetch. Handing the id back revises one message instead of queueing several. The chunked paint reports a real percentage, being the only part of the work with a denominator. The requests report `nil`, which `|progress-message|` defines as unknown progress. Verified through the `Progress` autocommand: `running → 39% → 78% → success` for a job, `running → success` twice for `:CI master` (resolve, then load). ## Version `kind='progress'` needs 0.13, so that is the floor: `health.lua`, both Requirements lists, and the now-redundant "(Neovim 0.12+)" note on the `vim.pack` instructions. The dev shell takes Neovim from `nix-community/neovim-nightly-overlay` instead of nixpkgs, which is still on 0.12.4 and would otherwise run the tests against an API the plugin now depends on: ``` before NVIM v0.12.4 kind='progress' throws after NVIM v0.13.0-nightly kind='progress' works ``` `guh.nvim` requires 0.13+ for exactly this API.
feat: report loading as a progress message
All checks were successful
quality / Test (pull_request) Successful in 5m58s
quality / Format (pull_request) Successful in 6m0s
quality / Lint (pull_request) Successful in 6m3s
40e4e0b473
Nothing was echoed while a view loaded. The only sign was 'busy', which marks
a buffer without saying what is happening to it, and which cannot say
anything at all about ":CI master" — that resolves a revision before any
buffer exists, so a slow one looked like the command had been ignored.

Progress messages are the Neovim answer and want 0.13, so that is the floor
now. The dev shell takes its Neovim from the nightly overlay rather than
nixpkgs, which is still on 0.12 and would run the tests against an API the
plugin depends on.

The message has the same life as 'busy': one starts where the flag is raised
and ends where it is cleared, in the two places every load already passes
through. Reusing the id revises one message rather than queueing several. The
chunked paint reports a real percentage, being the only part of the work with
a denominator; the requests report unknown progress, which the API has a
spelling for.
barrettruth deleted branch feat/progress 2026-07-28 00:29:54 +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!30
No description provided.