Skip to content

[#24371] Render stderr output in red in the Textual console#19

Open
Danipiza wants to merge 2 commits into
feature/ros2-clifrom
fix/errors_print
Open

[#24371] Render stderr output in red in the Textual console#19
Danipiza wants to merge 2 commits into
feature/ros2-clifrom
fix/errors_print

Conversation

@Danipiza

@Danipiza Danipiza commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Example
Screenshot from 2026-04-23 08-06-16

Screenshot from 2026-04-28 15-39-49 Screenshot from 2026-04-28 15-42-20

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza changed the base branch from main to feature/ros2-cli April 28, 2026 13:32
@Danipiza Danipiza force-pushed the feature/ros2-cli branch from 2b03f16 to 710061b Compare May 7, 2026 09:34

def __init__(self, app, stream_name: str = "stdout"):
self.app = app
self.stream_name = stream_name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.stream_name = stream_name
self.color = "red" if stream_name == "stderr" else ""

Comment on lines +62 to +63
color = "red" if self.stream_name == "stderr" else ""
self.app.call_from_thread(self.app.add_line, data, color)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
color = "red" if self.stream_name == "stderr" else ""
self.app.call_from_thread(self.app.add_line, data, color)
self.app.call_from_thread(self.app.add_line, data, self.color)

AI suggested to also pass self.app.call_from_thread(self.app.add_line, data, self.color, True) here to set subprocess_flag to True.

Comment thread pyproject.toml
"textual-serve==1.1.3",
"typeguard==2.13",
"pyperclip==1.11.0",
"torch==2.10.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"torch==2.10.0",

I would delete this. I could not find any issue with our dependencies testing locally. I believe issues with torch versions are more related to specific Nvidia Drivers versions rather than our deps, hence, leaving pip to automatically select the versions seems like the more appropriate and suitable way to go in order to be compatible with as much devices as possible.

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.

2 participants