Skip to content

fix(coding-agent): bound compaction progress preview#322

Closed
minpeter wants to merge 1 commit into
code-yeongyu:mainfrom
minpeter:fix/compaction-progress-preview
Closed

fix(coding-agent): bound compaction progress preview#322
minpeter wants to merge 1 commit into
code-yeongyu:mainfrom
minpeter:fix/compaction-progress-preview

Conversation

@minpeter

@minpeter minpeter commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep streamed compaction progress to one transient display row
  • preserve the active loader and useful preview text without expanding the status container
  • prevent long multiline summaries from pushing the composer and prior transcript through terminal viewport remaps

This PR is deliberately independent and based directly on current main. It does not depend on compaction lifecycle
PR #310; the old fork-only stacked PR is superseded by this upstream-facing branch.

Root cause

compaction_progress rendered up to 4,000 characters of accumulated summary text through multiline Text inside
statusContainer, immediately above the editor. Every streamed newline increased root height, moved the composer, and
made prior output look erased as the terminal viewport remapped.

Behavior

  • normalize whitespace for the transient preview
  • show a single bounded line with an ellipsis when needed
  • retain the spinner and latest useful preview
  • leave completed compaction transcript rendering unchanged

Verification

  • focused interactive compaction regression tests
  • coding-agent/root build and static checks
  • real source TUI at normal and narrow terminal sizes
  • browser-rendered xterm.js screenshot/transcript with viewport-width validation

Fresh validation receipts will be attached to this Draft before it is marked ready.


Summary by cubic

Bound streamed compaction progress to a single transient line to stop viewport remaps and composer jumps during auto-compaction. Normalizes whitespace and truncates long previews while keeping the spinner and final compaction transcript unchanged.

  • Bug Fixes
    • Render progress as one TruncatedText row; collapse whitespace and trim.
    • Limit preview source to last 4,000 chars; skip empty previews.
    • Keep the active status indicator; prevent statusContainer height growth.
    • Update test to assert two-line status (indicator + preview) and handle newlines.

Written for commit 6848e71. Summary will update on new commits.

Review in cubic

@minpeter

Copy link
Copy Markdown
Contributor Author

Superseded by merged-main Draft PR #328: #328. PR #310 merged a new CompactionStatusIndicator architecture while #322 was under review, so #328 keeps that architecture and contains only the terminal-width bound plus its RED→GREEN test.

@minpeter minpeter closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant