Skip to content

fix(coding-agent): bound compaction status width#328

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

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

Conversation

@minpeter

@minpeter minpeter commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the merged fix(coding-agent): stabilize compaction lifecycle #310 CompactionStatusIndicator architecture
  • reserve terminal width for both status and useful streamed preview
  • truncate the combined ANSI/wide-glyph-aware row to the exact render width
  • prevent progress text from wrapping into rows that move the composer and viewport

This one-commit PR is based directly on merged #310/current main. It supersedes #322, whose pre-merge implementation
used a separate progress component that is obsolete after #310.

RED -> GREEN

  • RED on exact merged main:
    • a hostile multiline progress update rendered at visible width 606 for a requested 40-column terminal row
  • GREEN:
    • exactly one rendered line
    • visible width <= 40
    • compaction status and useful normalized preview both remain visible
    • complete interactive compaction file: 10/10

Verification

  • root build: passed
  • root npm run check: passed
  • real 80x24 source TUI with local fake provider:
    • three live turns
    • manual /compact
    • one-row active compaction indicator
    • transcript and bottom status retained
    • exit 0
  • browser xterm.js evidence:
    • xterm-live/terminal.png
    • xterm-live/terminal.txt
    • xterm-live/metadata.json
  • fake provider, PTY, Chrome, TCP port, HOME/config/session sandbox all cleaned

Summary by cubic

Bounds the compaction status row to the terminal width so progress text never wraps or shifts the composer/viewport. Spinner, status, and streamed preview now render on a single line with ANSI/wide-glyph aware truncation.

  • Bug Fixes
    • Truncate combined status + preview to the exact width using visibleWidth/truncateToWidth from @earendil-works/pi-tui.
    • Allocate width between status and progress to keep both visible; clamp to one rendered row.
    • Update test to assert a hostile multiline update renders as one line within 40 cols; refresh changes.md.

Written for commit 49176d5. Summary will update on new commits.

Review in cubic

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