Skip to content

fix: disable progress display in --live TUI mode#203

Merged
kris-hansen merged 1 commit intomainfrom
fix/live-mode-progress-overlap
Apr 2, 2026
Merged

fix: disable progress display in --live TUI mode#203
kris-hansen merged 1 commit intomainfrom
fix/live-mode-progress-overlap

Conversation

@kris-hansen
Copy link
Copy Markdown
Owner

@kris-hansen kris-hansen commented Apr 2, 2026

PR Type:

Bug fix


PR Description:

  • Disables the ProgressDisplay when running in --live TUI mode to prevent text overlap and rendering issues.
  • Adds a new method DisableProgressDisplay() to the Processor to handle this functionality.
  • Updates runWorkflowWithStreamLog() to call DisableProgressDisplay() when the disableSpinner flag is set, indicating TUI mode.

PR Main Files Walkthrough:

files:
  • cmd/process.go: Modified the runWorkflowWithStreamLog function to call DisableProgressDisplay() on the Processor instance when the disableSpinner flag is set, ensuring that both the spinner and progress display are disabled in TUI mode.
  • utils/processor/dsl.go: Added a new method DisableProgressDisplay() to the Processor struct. This method sets the progressDisplay to disabled, preventing it from outputting completion summaries when in TUI mode.

User Description:

Problem

When using --live mode, the TUI dashboard (bubbletea) takes over the terminal with alt-screen mode. However, after the workflow completes and the TUI exits, the ProgressDisplay still outputs completion summaries to stdout.

This causes text overlap and garbled output as shown in the issue report — the completion summary renders on top of the previous TUI output.

Fix

Disable ProgressDisplay when in TUI mode, alongside the already-disabled spinner. The TUI dashboard already shows workflow completion status via the complete event type in the progress reporter.

Changes

  • Added DisableProgressDisplay() method to Processor
  • Called it in runWorkflowWithStreamLog() when the disableSpinner flag is set (which indicates TUI mode)

Testing

Tested with a multi-iteration agentic loop workflow using --live mode. The completion summary no longer overlaps with the TUI output.

When using --live mode, the TUI dashboard handles all progress output.
The ProgressDisplay was still printing completion summaries to stdout
after the TUI exited, causing text overlap and rendering issues.

This fix disables the ProgressDisplay when in TUI mode, alongside the
already-disabled spinner.
@preston-ai
Copy link
Copy Markdown

preston-ai bot commented Apr 2, 2026

PR Analysis

  • 🎯 Main theme: Disabling the progress display in TUI mode to prevent text overlap and rendering issues.
  • 📝 PR summary: This PR addresses a bug where the ProgressDisplay outputs completion summaries after the TUI exits, causing text overlap. It introduces a new method DisableProgressDisplay() in the Processor to disable the progress display when in TUI mode. The runWorkflowWithStreamLog() function is updated to call this method when the disableSpinner flag is set.
  • 📌 Type of PR: Bug fix
  • 🧪 Relevant tests added: No
  • Focused PR: Yes, because the changes are specifically aimed at fixing the text overlap issue in TUI mode by disabling the progress display.
  • ⏱️ Estimated effort to review [1-5]: 2, because the changes are straightforward and focused on a specific functionality, making it relatively easy to review.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR effectively addresses the issue of text overlap in TUI mode by disabling the progress display. It would be beneficial to ensure that this change does not inadvertently affect other modes of operation. Consider adding tests to verify the behavior in different modes.

How to use

Instructions

To invoke the Preston AI, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.


// DisableProgressDisplay disables the progress display output (use when running in TUI mode)
func (p *Processor) DisableProgressDisplay() {
p.progressDisplay.SetEnabled(false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider checking if p.progressDisplay is not nil before calling SetEnabled(false) to avoid potential nil pointer dereference errors. [important]

@kris-hansen kris-hansen merged commit ca60761 into main Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant