• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dcdpr / jp / 26086411961
66%

Build:
DEFAULT BRANCH: main
Ran 19 May 2026 08:47AM UTC
Jobs 1
Files 319
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 May 2026 08:45AM UTC coverage: 65.322% (+0.3%) from 64.979%
26086411961

push

github

web-flow
refactor(md): Add `indent` to buffer events and list streaming (#657)

The `Event` enum variants have been converted from tuple structs to
named-field structs, each gaining an `indent: usize` field that carries
the visual column at which the renderer should place the content. For
example, `Event::Block(String)` becomes `Event::Block { content: String,
indent: usize }`.

A new `InList` buffer state replaces the old ad-hoc list-streaming logic
inside `handle_buffering_paragraph`. It tracks `marker_column`,
`content_column`, ordering, delimiter, and item count, and pushes/pops a
parent-state stack when entering nested containers (sub-lists or fenced
code blocks inside list items). Each sibling marker triggers an
immediate flush of the preceding item as a `Block` with the list's
`marker_column` as its visual indent, so items stream individually
rather than buffering the whole list.

The `Buffer::flush() -> Option<String>` API is replaced by
`flush_events() -> Vec<Event>`, which correctly splits any queued items
at sibling-marker boundaries, renumbers ordered-list markers relative to
`start_number + items_flushed`, and emits the final partial segment as a
`Flush` event with the right indent.

`TerminalOptions` gains an `indent` field, threaded through
`Formatter::format_terminal_with`, `TerminalWriter::new`, and the chat
renderer's `print_block` / `print_code` / `terminal_options` helpers.
`TerminalWriter` seeds its initial `prefix` with `indent` spaces so
every rendered line starts at the requested visual column. A new
`indent_lines` helper in the chat renderer prepends the indent to raw
code-block lines that have already been highlighted.

The practical effect: when an LLM streams a response with nested lists
or fenced code blocks inside list items, each item and code line now
renders at the correct visual column as it arrives, rather than being
buffered until the whole list is received or rendered at column 0.

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

513 of 554 new or added lines in 7 files covered. (92.6%)

2 existing lines in 1 file now uncovered.

27390 of 41931 relevant lines covered (65.32%)

238.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
26
95.27
-1.71% crates/jp_md/src/buffer.rs
15
91.2
-5.28% crates/jp_cli/src/render/chat.rs

Coverage Regressions

Lines Coverage ∆ File
2
95.27
-1.71% crates/jp_md/src/buffer.rs
Jobs
ID Job ID Ran Files Coverage
1 26086411961.1 19 May 2026 08:47AM UTC 319
65.32
GitHub Action Run
Source Files on build 26086411961
  • Tree
  • List 319
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26086411961
  • 667129c5 on github
  • Prev Build on main (#26055214511)
  • Next Build on main (#26111134308)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc