pi-pretty 0.4.4
pi-pretty 0.4.4
Summary
This patch release fixes terminal background tearing/misaligned cells by enforcing the pi-tui line-width contract for background-filled tool output.
What changed
- Clamp every background-filled tool line to the active terminal width before adding background padding.
- Use
@mariozechner/pi-tuitruncateToWidth()andvisibleWidth()so ANSI escapes and wide Unicode cells are measured correctly. - Preserve the configured tool background after ANSI reset sequences even when truncation occurs.
- Remove the 80-column minimum width floor so narrow terminals do not receive over-wide rendered lines.
- Replace custom read-output truncation with pi-tui's ANSI-aware truncation helper.
- Add regression coverage for expanded ANSI tool headers, wide characters, and narrow terminal widths.
Files
src/index.tstest/bash-rendering.test.tspackage.jsonpackage-lock.json
Verification
npm run lint✅npm run typecheck✅npm test✅ (69 tests)
Upgrade notes
No configuration changes are required.
This release specifically follows the pi-tui requirement that rendered component lines must not exceed the available width, preventing terminal auto-wrap artifacts in red/error and themed tool backgrounds.