Skip to content

Enhance log parsing with ANSI color support#70

Open
petero-dk wants to merge 1 commit into
PurpleSoftSrl:mainfrom
zealofzebras:feature/ansicolors
Open

Enhance log parsing with ANSI color support#70
petero-dk wants to merge 1 commit into
PurpleSoftSrl:mainfrom
zealofzebras:feature/ansicolors

Conversation

@petero-dk

@petero-dk petero-dk commented Jun 24, 2026

Copy link
Copy Markdown

This pull request improves the display of pipeline logs by adding support for ANSI color and style codes, ensuring log output appears with the correct formatting (such as colors and bold text) as emitted by CLI tools. The main changes introduce a parser for ANSI escape sequences and update the log rendering logic to use rich text spans instead of plain text.

Specifically for terraform plan output this makes a big diffference

Log display enhancements:

  • Added methods in _PipelineLogsController to parse ANSI SGR (color/style) escape sequences and map them to Flutter colors, enabling colored and bold log output. This includes _ansiSgrRegex, _ansiOtherRegex, _ansiColor, and parseLogLine.
  • Updated the log line rendering in _PipelineLogsScreen to use Text.rich with the parsed InlineSpans from parseLogLine, allowing logs to display with proper color and style formatting.
Screenshot_20260624-122426

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