feat: nest the log the way github.com does #19

Merged
barrettruth merged 2 commits from feat/indent-proto into main 2026-07-27 23:40:15 +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 log is flush. Two kinds of indentation get conflated when reading a run on
the web, and only one of them is in the bytes:

Real. with: / version: 0.16.0 — an action echoing its own inputs.
Already preserved exactly.

Drawn. Group and step membership. The raw log has none of it:

2026-07-27T15:14:08.6671865Z ##[group]Runner Image Provisioner$
2026-07-27T15:14:08.6672883Z Hosted Compute Agent$

Hosted Compute Agent starts at byte 29 with nothing in front of it.
github.com synthesizes that indent; the log never said so.

Solution

Draw it too, as inline virtual text keyed off the fold depth already computed
for foldexpr. The bytes are untouched, so yank and search() still see the
log as GitHub stores it.

✓ Set up job
  Current runner version: '2.335.1'
  Runner Image Provisioner
    Hosted Compute Agent
    Version: 20260707.563
    Build Date: 2026-07-07T19:33:50Z

Step header at 0, step body at 2, group header at 2, group body at 4 — the
same shape as the web view. 2563 lines still render in ~900ms, all of it the
fetch.

This also settles what 'foldcolumn' was being considered for: nesting is
legible without spending two columns of every window on it.

One thing it does not do

:setlocal conceallevel=0 reveals the raw bytes but keeps the drawn indent:

2026-07-27T15:14:08.6672883Z     Hosted Compute Agent

Virtual text does not answer to 'conceallevel' — the same constraint behind
the doubling fix in #12. Conceal uncovers bytes; it was never a switch for
turning rendering off. The genuinely raw view remains :term gh api repos/{owner}/{repo}/actions/jobs/{job_id}/logs, which the help already names.

'breakindent' is also still unable to reflow a wrapped line to its visible
indent, since Vim measures indent from the buffer and byte 0 is a timestamp.
Indentation makes the structure scannable; it does not fix wrapping.

## 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 log is flush. Two kinds of indentation get conflated when reading a run on the web, and only one of them is in the bytes: **Real.** ` with:` / ` version: 0.16.0` — an action echoing its own inputs. Already preserved exactly. **Drawn.** Group and step membership. The raw log has none of it: ``` 2026-07-27T15:14:08.6671865Z ##[group]Runner Image Provisioner$ 2026-07-27T15:14:08.6672883Z Hosted Compute Agent$ ``` `Hosted Compute Agent` starts at byte 29 with nothing in front of it. github.com synthesizes that indent; the log never said so. ## Solution Draw it too, as inline virtual text keyed off the fold depth already computed for `foldexpr`. The bytes are untouched, so yank and `search()` still see the log as GitHub stores it. ``` ✓ Set up job Current runner version: '2.335.1' Runner Image Provisioner Hosted Compute Agent Version: 20260707.563 Build Date: 2026-07-07T19:33:50Z ``` Step header at 0, step body at 2, group header at 2, group body at 4 — the same shape as the web view. 2563 lines still render in ~900ms, all of it the fetch. This also settles what `'foldcolumn'` was being considered for: nesting is legible without spending two columns of every window on it. ## One thing it does not do `:setlocal conceallevel=0` reveals the raw bytes but keeps the drawn indent: ``` 2026-07-27T15:14:08.6672883Z Hosted Compute Agent ``` Virtual text does not answer to `'conceallevel'` — the same constraint behind the doubling fix in #12. Conceal uncovers bytes; it was never a switch for turning rendering off. The genuinely raw view remains `:term gh api repos/{owner}/{repo}/actions/jobs/{job_id}/logs`, which the help already names. `'breakindent'` is also still unable to reflow a wrapped line to its visible indent, since Vim measures indent from the buffer and byte 0 is a timestamp. Indentation makes the structure scannable; it does not fix wrapping.
feat: nest the log the way github.com does
All checks were successful
quality / Test (pull_request) Successful in 5s
quality / Format (pull_request) Successful in 9s
quality / Lint (pull_request) Successful in 9s
199d75e7df
A step's body sits under its header and a group's body under both, which is
how the run reads on the web and how anyone who has looked at one there
expects it to read. The log itself is flush: "Hosted Compute Agent" begins at
byte 29 with no space in front of it, and the indentation on github.com is
drawn, not stored.

So it is drawn here too, as inline virtual text keyed off the fold depth we
had already computed, which leaves the bytes untouched. Yanking still gives
the log, searching still matches it, and the extra pass costs nothing next to
the fetch.

It also settles what foldcolumn was being considered for. Nesting is visible
without spending two columns of every window on it.
docs: conceallevel uncovers prefixes, it does not give you the raw log
All checks were successful
quality / Lint (pull_request) Successful in 6s
quality / Test (pull_request) Successful in 10s
quality / Format (pull_request) Successful in 17s
5dc77bc285
barrettruth deleted branch feat/indent-proto 2026-07-27 23:40:15 +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!19
No description provided.