fix: send "-" from a job to the commit, not to its run #20

Merged
barrettruth merged 1 commit from fix/up-to-commit into main 2026-07-27 23:42:37 +00:00
Owner

Checklist

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

Problem

<CR> on a check descends two levels at once — commit's checks straight to a
job — while - climbed back one at a time:

ci://neovim/neovim/checks/fbcb7a05…
<CR>  ->  ci://neovim/neovim/job/90019927064
-     ->  ci://neovim/neovim/run/30278897599     ← never been here
-     ->  ci://neovim/neovim/checks/fbcb7a05…

For a single-job workflow like lint commits that middle stop lists exactly
one thing: the job you just left.

The degenerate case is the symptom. The cause is that a run holds less than
the list you came from.
The checks view is commit-scoped and already carries
every job of every run, with the workflow in its own column. A run is a
filter on that list, not a level above it — so - moved you to less
information and - again to more. Going up should never narrow.

It costs more than it looks, too, because there is no back: keepalt protects
your alternate, so after <CR> into a job <C-^> returns to the source file
you were editing, not to the list. - is the only way out.

Solution

- undoes <CR>:

<CR>  ->  ci://neovim/neovim/job/90019927064
-     ->  ci://neovim/neovim/checks/fbcb7a05…
-     ->  ci: already at the top level

head_sha is already in the job response, so this needs no extra request. A
run remains reachable by pasting its URL and keeps its own - to the same
commit.

The rejected alternative was skipping the run only when it has one job.
Navigation that changes shape depending on the data is not something you can
build a habit on.

## 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 `<CR>` on a check descends two levels at once — commit's checks straight to a job — while `-` climbed back one at a time: ``` ci://neovim/neovim/checks/fbcb7a05… <CR> -> ci://neovim/neovim/job/90019927064 - -> ci://neovim/neovim/run/30278897599 ← never been here - -> ci://neovim/neovim/checks/fbcb7a05… ``` For a single-job workflow like `lint commits` that middle stop lists exactly one thing: the job you just left. The degenerate case is the symptom. The cause is that **a run holds less than the list you came from.** The checks view is commit-scoped and already carries every job of every run, with the workflow in its own column. A run is a *filter* on that list, not a level above it — so `-` moved you to less information and `-` again to more. Going up should never narrow. It costs more than it looks, too, because there is no back: `keepalt` protects your alternate, so after `<CR>` into a job `<C-^>` returns to the source file you were editing, not to the list. `-` is the only way out. ## Solution `-` undoes `<CR>`: ``` <CR> -> ci://neovim/neovim/job/90019927064 - -> ci://neovim/neovim/checks/fbcb7a05… - -> ci: already at the top level ``` `head_sha` is already in the job response, so this needs no extra request. A run remains reachable by pasting its URL and keeps its own `-` to the same commit. The rejected alternative was skipping the run only when it has one job. Navigation that changes shape depending on the data is not something you can build a habit on.
fix: send "-" from a job to the commit, not to its run
All checks were successful
quality / Test (pull_request) Successful in 3s
quality / Format (pull_request) Successful in 18s
quality / Lint (pull_request) Successful in 20s
17f6f7867c
Pressing enter on a check descended two levels at once, from the commit's
checks straight to a job, while "-" climbed back one at a time. The run you
landed in was somewhere you had never been, and for a single-job workflow it
listed only the job you had just left.

The deeper trouble is that a run holds less than the list you came from. The
checks view is scoped to the commit and already carries every job of every
run, workflow and all, so a run is a filter on it rather than a level above
it. Going up should not narrow.

So "-" undoes enter now. head_sha is already in the job we fetch, so this
costs no request, and a run stays reachable by its URL with its own "-" to
the same commit.
barrettruth deleted branch fix/up-to-commit 2026-07-27 23:42:37 +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!20
No description provided.