Skip to content

Terminal Output Mishandles Carriage Returns Leading to Incorrect Progress Bar Display #2561

@Yikai-Liao

Description

@Yikai-Liao

App Version

v3.11.14

API Provider

OpenRouter

Model Used

Claude 3.7 Sonnet

Actual vs. Expected Behavior

  • Actual Behavior: Terminal output with carriage returns (\r) does not display correctly in Roo Code. Progress bars (like those from tqdm or similar tools) show multiple intermediate states instead of the final state, cluttering the output and wasting significant context space.
  • Expected Behavior: Terminal output should simulate real terminal behavior by only showing the content after the last carriage return (\r) on each line, ensuring progress bars display their final state cleanly and conserving context for more relevant information.

Detailed Steps to Reproduce

  1. Open Roo Code extension in VSCode on any supported platform (Windows, Mac, or Linux).
  2. Run a command in the integrated terminal that produces progress bar output with carriage returns, such as a Python script using tqdm (e.g., for i in tqdm(range(100)): time.sleep(0.1)).
  3. Observe the terminal output in Roo Code's terminal view.
  4. Notice that instead of a single updating progress bar line, multiple states of the progress bar are displayed as separate lines or concatenated incorrectly, filling up the output log and pushing out other important context.

Relevant API Request Output

Additional Context

  • This issue significantly impacts user experience when running scripts or commands that use carriage returns for progress bars or inline updates, common in tools like tqdm, npm install, or other CLI utilities. The cluttered output wastes valuable context space in the terminal view, making it harder to focus on critical logs or results.
  • The issue is related to how terminal output is processed in TerminalProcess.ts, where carriage returns are not handled to simulate terminal rendering.
  • This impacts the "System Support" pillar of the Roo Code roadmap by hindering consistent terminal integration across platforms.
  • No screenshots attached as the issue is text-based, but I can provide a video or further logs if needed to demonstrate the context waste.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions