Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions packages/coding-agent/src/modes/interactive/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# changes

## bounded compaction progress preview (2026-07-24)

### What changed

- Streamed compaction summary progress is normalized and rendered as a single `TruncatedText` row beneath the active
compaction indicator.
- Multiline summary content no longer expands the transient status container or pushes the editor and transcript
through repeated terminal viewport remaps.

### Why

- Compaction summaries can contain thousands of characters and many newlines. Rendering that temporary content
verbatim above the editor made the composer move with every progress update and pushed prior output into scrollback,
which looked like transcript deletion.

### Why extension system couldn't handle this

- Compaction progress events and the status/editor container layout are private interactive-mode rendering surfaces.

### Expected merge conflict zones

- MEDIUM: `interactive-mode.ts` compaction progress event rendering.

## per-section thinking duration headers (2026-07-22)

### What changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3561,11 +3561,13 @@ export class InteractiveMode {
event.text !== undefined ? event.text : `${this.autoCompactionProgressText}${event.delta ?? ""}`;
if (!nextText) break;
this.autoCompactionProgressText = nextText;
const preview = nextText.length > 4_000 ? `...${nextText.slice(nextText.length - 4_000)}` : nextText;
const previewSource = nextText.length > 4_000 ? `...${nextText.slice(nextText.length - 4_000)}` : nextText;
const preview = previewSource.replace(/\s+/g, " ").trim();
if (!preview) break;
this.statusContainer.clear();
this.statusContainer.addChild(this.activeStatusIndicator);
this.statusContainer.addChild(new Spacer(1));
this.statusContainer.addChild(new Text(theme.fg("muted", preview), 1, 0));
this.statusContainer.addChild(new TruncatedText(theme.fg("muted", preview), 1, 0));
this.ui.requestRender();
break;
}
Expand Down
12 changes: 8 additions & 4 deletions packages/coding-agent/test/interactive-mode-compaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,16 @@ describe("InteractiveMode compaction events", () => {
await handleEvent.call(fakeThis, {
type: "compaction_progress",
reason: "extension",
delta: "live summary chunk",
delta: "live summary\nchunk",
});

const rendered = stripAnsi(statusContainer.children.flatMap((child) => child.render(120)).join("\n"));
expect(rendered).toContain("Compacting context");
expect(rendered).toContain("live summary chunk");
const rendered = statusContainer.children
.flatMap((child) => child.render(120))
.map((line) => stripAnsi(line))
.filter((line) => line.trim().length > 0);
expect(rendered).toHaveLength(2);
expect(rendered[0]).toContain("Compacting context");
expect(rendered[1]).toContain("live summary chunk");

fakeThis.autoCompactionLoader?.stop();
});
Expand Down