fix: only indent a group's body, as github.com does #31

Merged
barrettruth merged 1 commit from fix/indent-one-level into main 2026-07-28 02:32:26 +00:00
Owner

Checklist

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

Problem

#19 indented one level too many. A step's body was pushed in two columns, which
github.com does not do — the indentation you see under Run mlugg/setup-zig@…
there is the action echoing its own inputs, and those bytes were already being
preserved verbatim. Only a group's body is drawn indented.

It also produced a visible seam. A closed fold is rendered from the string
'foldtext' returns, and neither conceal nor inline virtual text reaches it, so
a group heading was flush while closed and two columns in while open:

open    "  Runner Image Provisioner"
closed  "Runner Image Provisioner  7 lines"

Solution

✓ Set up job
Current runner version: '2.335.1'
Runner Image Provisioner
  Hosted Compute Agent
  Version: 20260707.563

Step header, step body and group heading are all flush; only a group's contents
move. Verified closed as well:

step  fold closed -> "✓ Set up job  29 lines"
group fold closed -> "Runner Image Provisioner  7 lines"

The seam closes as a consequence rather than needing its own fix. I first
taught foldtext to prepend the indent, then found that unreachable: every
line that opens a fold is now depth 0, so the padding could only ever add
zero. Dropped it rather than keep a branch that cannot fire.

## 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 #19 indented one level too many. A step's body was pushed in two columns, which github.com does not do — the indentation you see under `Run mlugg/setup-zig@…` there is the action echoing its own inputs, and those bytes were already being preserved verbatim. Only a **group's** body is drawn indented. It also produced a visible seam. A closed fold is rendered from the string `'foldtext'` returns, and neither conceal nor inline virtual text reaches it, so a group heading was flush while closed and two columns in while open: ``` open " Runner Image Provisioner" closed "Runner Image Provisioner 7 lines" ``` ## Solution ``` ✓ Set up job Current runner version: '2.335.1' Runner Image Provisioner Hosted Compute Agent Version: 20260707.563 ``` Step header, step body and group heading are all flush; only a group's contents move. Verified closed as well: ``` step fold closed -> "✓ Set up job 29 lines" group fold closed -> "Runner Image Provisioner 7 lines" ``` The seam closes as a consequence rather than needing its own fix. I first taught `foldtext` to prepend the indent, then found that unreachable: every line that *opens* a fold is now depth 0, so the padding could only ever add zero. Dropped it rather than keep a branch that cannot fire.
fix: only indent a group's body, as github.com does
All checks were successful
quality / Test (pull_request) Successful in 6s
quality / Lint (pull_request) Successful in 11s
quality / Format (pull_request) Successful in 12s
103882970f
A step's body was being pushed in two columns as well, which github.com does
not do — the indentation visible under "Run …" there is the action echoing
its own inputs, and those bytes were already being kept verbatim. So the log
was reading one level deeper than the thing it was imitating.

It also produced a jarring seam. A closed fold is drawn from the string
foldtext returns, and neither conceal nor virtual text reaches it, so a group
heading sat flush while closed and two columns in while open. Now that a line
opening a fold is never indented, the two agree without foldtext having to
know anything about indentation.
barrettruth deleted branch fix/indent-one-level 2026-07-28 02:32:26 +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!31
No description provided.