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

dcdpr / jp / 26805864183
67%

Build:
DEFAULT BRANCH: main
Ran 02 Jun 2026 07:45AM UTC
Jobs 1
Files 397
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

02 Jun 2026 07:43AM UTC coverage: 66.422% (-0.02%) from 66.438%
26805864183

push

github

web-flow
fix(cli, tool): Guard temp line behind TTY and fix multi-tool collision (#713)

The streaming "Calling tool…" temp line uses cursor-relative control
sequences (`\r`, `\x1b[K`) that only make sense on a real TTY. When jp
was piped, those raw bytes leaked into the output. All temp line writes
are now gated behind `is_tty`.

A second bug caused a visible collision when two tool calls were
in-flight and the first completed: `complete` was immediately redrawing
the temp line for the still-pending tool, which landed on the same line
as the permanent header the caller was about to print, producing output
like `…fs_read_fileCalling tool…`. The fix changes `complete` to only
clear the line; the next timer tick is responsible for redrawing it.

Two smaller state-tracking issues were fixed alongside this:

- `tick` now sets `line_active = true` after writing, so a subsequent
`complete` call knows to clear the line even if `register` ran before
the first tick.

- `clear_temp_line` was guarded by `pending.is_empty()` instead of
`line_active`, so it would skip the clear when tools were pending but
the line had already been erased.

- `reset` was zeroing `line_active` before calling `cancel_all`, which
caused `cancel_all` to skip clearing a line that was still visible on
screen. The pre-clear is removed; `cancel_all` now owns that
responsibility.

A `visible_lines` test helper is added to emulate terminal cursor
movement (`\r`, `\x1b[K`) so tests can assert against what the user
actually sees rather than raw byte sequences.

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

10 of 11 new or added lines in 1 file covered. (90.91%)

9 existing lines in 3 files now uncovered.

33279 of 50102 relevant lines covered (66.42%)

231.42 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
79.77
-0.12% crates/jp_cli/src/render/tool.rs

Coverage Regressions

Lines Coverage ∆ File
7
81.86
-3.1% crates/contrib/schematic_macros/src/common/field.rs
1
90.74
-0.93% crates/contrib/schematic_macros/src/common/container.rs
1
79.77
-0.12% crates/jp_cli/src/render/tool.rs
Jobs
ID Job ID Ran Files Coverage
1 26805864183.1 02 Jun 2026 07:45AM UTC 397
66.42
GitHub Action Run
Source Files on build 26805864183
  • Tree
  • List 397
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26805864183
  • c31c5976 on github
  • Prev Build on main (#26805122083)
  • Next Build on main (#26806176212)
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