diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index cc5258eb5..12fbe7252 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -17,6 +17,7 @@ - Fixed the sign-in URL printed by `/mcp login` not being clickable when it wraps ([#10186](https://github.com/earendil-works/pi/issues/10186)). - Fixed `--provider` without `--model` being silently ignored and running the default model from another provider; it now fails with an error ([#10236](https://github.com/earendil-works/pi/issues/10236)). - Fixed MCP servers that ask for more scope (`insufficient_scope`) requesting sign-in over and over. The new sign-in requested only the missing scopes, so the new token lost access the previous one had; it now keeps the granted scopes. +- Fixed user messages in the transcript keeping two full-width copies of every rendered line; they keep one, with identical output. ## [0.99.2] - 2026-09-30 diff --git a/packages/coding-agent/src/modes/interactive/components/user-message.ts b/packages/coding-agent/src/modes/interactive/components/user-message.ts index 009389dfc..c187eff43 100644 --- a/packages/coding-agent/src/modes/interactive/components/user-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/user-message.ts @@ -1,4 +1,4 @@ -import { Box, Container, Markdown, type MarkdownTheme } from "@earendil-works/pi-tui"; +import { Container, Markdown, type MarkdownTheme } from "@earendil-works/pi-tui"; import type { MarkdownTransformer } from "../../../core/extensions/types.ts"; import { getMarkdownTheme, theme } from "../theme/theme.ts"; import { createMarkdownTransform } from "./markdown-transform.ts"; @@ -37,15 +37,17 @@ export class UserMessageComponent extends Container { private rebuild(): void { this.clear(); - const contentBox = new Box(this.outputPad, 1, (content: string) => theme.bg("userMessageBg", content)); - contentBox.addChild( + // The Markdown pads and colors its own background: a Box around it would keep a second full-width copy of every + // line, with identical output. + this.addChild( new Markdown( this.text, - 0, - 0, + this.outputPad, + 1, this.markdownTheme, { color: (content: string) => theme.fg("userMessageText", content), + bgColor: (content: string) => theme.bg("userMessageBg", content), }, { preserveOrderedListMarkers: true, @@ -54,7 +56,6 @@ export class UserMessageComponent extends Container { }, ), ); - this.addChild(contentBox); } override render(width: number): string[] {