Fix review TUI wrapping#1158
Merged
peyton-alt merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves entire review’s Bubble Tea TUI rendering in narrow/resized terminals by making dashboard/detail output display-width aware and sanitizing agent-emitted text to prevent hard-wrapping corruption and control-sequence leakage.
Changes:
- Added shared helpers to strip ANSI, remove control characters, and pad/truncate by display-cell width.
- Updated dashboard and detail rendering to clamp lines to terminal width and allocate preview width from remaining table space.
- Added regression tests for narrow terminals, resizing, wide characters/emoji, ANSI control sequences, finished dashboards, and sink ordering.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/review/tui_text.go | Introduces shared ANSI stripping + display-width pad/truncate + control-char sanitization helpers. |
| cmd/entire/cli/review/tui_model.go | Makes dashboard rendering width-aware, clamps lines, and sanitizes/truncates preview text by display width. |
| cmd/entire/cli/review/tui_model_test.go | Adds dashboard width/regression tests (narrow widths, resize, control-sequence stripping). |
| cmd/entire/cli/review/tui_detail.go | Switches detail view rendering to display-width truncation/padding and shared sanitization. |
| cmd/entire/cli/review/tui_detail_test.go | Adds detail-view width regression tests including wide characters/emoji and ANSI stripping. |
| cmd/entire/cli/review/cmd_test.go | Adds tests pinning sink ordering so the TUI sink precedes post-run writers. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9044dc5. Configure here.
Entire-Checkpoint: bf2e18977a22
pjbgf
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://entire.io/gh/entireio/cli/trails/332
Summary
Fixes
entire reviewdashboard rendering corruption when multiple agents are running in narrow terminals.The dashboard could emit table rows wider than the terminal. Bubble Tea then hard-wrapped those redraw frames, leaving stale header and row fragments on screen. This PR makes dashboard and detail rendering width-aware and sanitizes agent text before it reaches table cells.
Changes
Validation
mise run test:cimise run lintNote
Medium Risk
Moderate risk because it changes how TUI text is sanitized and width-truncated/padded (including emoji/wide chars), which could alter on-screen output and edge-case formatting but is isolated to review UI rendering and sink ordering.
Overview
Fixes
entire reviewTUI rendering in narrow/resized terminals by making both the dashboard and detail views display-width aware (cell-based truncation/padding) and by sanitizing agent text to strip ANSI/control sequences before rendering.The dashboard now derives preview column width from the current terminal width, clamps every rendered line to that width, and adds regression tests covering very small widths, window resizes, wide characters/emoji, and control-sequence leakage. It also adds a test to pin sink ordering so the
TUISinkruns before post-run writers likeDumpSink/SynthesisSink.Reviewed by Cursor Bugbot for commit 9044dc5. Configure here.