fix: stop rendering the timestamp twice at conceallevel=0 #12

Merged
barrettruth merged 1 commit from fix/timestamp-doubling into main 2026-07-27 22:04:22 +00:00
Owner

Checklist

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

Problem

virt_text ignores 'conceallevel'; only conceal answers to it. Both were
describing the same 29 bytes, so lowering the level revealed the raw stamp
without removing the annotation drawn in front of it:

conceallevel=3  Mon, 27 Jul 2026 15:14:08 GMT ✓ Set up job
conceallevel=0  Mon, 27 Jul 2026 15:14:08 GMT 2026-07-27T15:14:08.0000000Z ✓ Set up job

The underlying mistake is saying a thing is both content and annotation.
conceal hides text that is in the buffer; virt_text renders text that is
not. Pointing both at one range means two representations that cannot toggle
together.

Solution

The date is an overlay now — it occupies the stamp's cells instead of
displacing them, so there is nothing to double, at any level.

That leaves conceal with exactly one job: hiding the ##[...] markers. So
'conceallevel' still means something, and what it means is now honest:

conceallevel=3  Mon 27 Jul 2026 15:14:08 GMT Runner Image Provisioner
conceallevel=0  Mon 27 Jul 2026 15:14:08 GMT ##[group]Runner Image Provisioner

The buffer is untouched either way — the raw stamp is still there to search and
yank.

The comma

An overlay has to match the width it covers. Verified both failure modes: 30
cells over 29 eats the following character, and a short one leaves a gap. So it
spans the stamp less its trailing space — 28 cells — which lets that space
separate the date from the log, and makes the date 28 wide. That costs the
comma after the weekday: Mon 27 Jul 2026 15:14:08 GMT.

## 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 `virt_text` ignores `'conceallevel'`; only `conceal` answers to it. Both were describing the same 29 bytes, so lowering the level revealed the raw stamp without removing the annotation drawn in front of it: ``` conceallevel=3 Mon, 27 Jul 2026 15:14:08 GMT ✓ Set up job conceallevel=0 Mon, 27 Jul 2026 15:14:08 GMT 2026-07-27T15:14:08.0000000Z ✓ Set up job ``` The underlying mistake is saying a thing is both content and annotation. `conceal` hides text that is in the buffer; `virt_text` renders text that is not. Pointing both at one range means two representations that cannot toggle together. ## Solution The date is an **overlay** now — it occupies the stamp's cells instead of displacing them, so there is nothing to double, at any level. That leaves `conceal` with exactly one job: hiding the `##[...]` markers. So `'conceallevel'` still means something, and what it means is now honest: ``` conceallevel=3 Mon 27 Jul 2026 15:14:08 GMT Runner Image Provisioner conceallevel=0 Mon 27 Jul 2026 15:14:08 GMT ##[group]Runner Image Provisioner ``` The buffer is untouched either way — the raw stamp is still there to search and yank. ## The comma An overlay has to match the width it covers. Verified both failure modes: 30 cells over 29 eats the following character, and a short one leaves a gap. So it spans the stamp *less its trailing space* — 28 cells — which lets that space separate the date from the log, and makes the date 28 wide. That costs the comma after the weekday: `Mon 27 Jul 2026 15:14:08 GMT`.
fix: stop rendering the timestamp twice at conceallevel=0
All checks were successful
quality / Test (pull_request) Successful in 6s
quality / Lint (pull_request) Successful in 6s
quality / Format (pull_request) Successful in 7s
8c8efd2ffd
virt_text ignores 'conceallevel'; only conceal answers to it. Both described
the same 29 bytes, so lowering the level revealed the stamp without removing
the annotation drawn over it:

    Mon, 27 Jul 2026 15:14:08 GMT 2026-07-27T15:14:08.0000000Z ✓ Set up job

The date is an overlay now, which occupies the stamp's cells rather than
displacing them, so there is nothing to double. Conceal is left with one job,
hiding the ##[...] markers, which is the only thing 'conceallevel' now toggles.

An overlay has to match the width it covers: a wider one eats the character
after it, and a narrower one leaves a gap. So it spans the stamp less its
trailing space, 28 cells, letting that space separate date from log, and the
date is 28 wide, which costs the comma after the weekday.
barrettruth deleted branch fix/timestamp-doubling 2026-07-27 22:04:22 +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!12
No description provided.