Skip to content

feat(trace): Render ANSI colors in trace and logs table error rows - #126293

Closed
JoshuaKGoldberg wants to merge 6 commits into
masterfrom
joshgoldberg/logs-1023-render-ansi-colors-in-trace-waterfall-and-logs-table-error
Closed

JoshuaKGoldberg wants to merge 6 commits into
masterfrom
joshgoldberg/logs-1023-render-ansi-colors-in-trace-waterfall-and-logs-table-error

Conversation

@JoshuaKGoldberg

Copy link
Copy Markdown
Member

Error rows in the trace waterfall and the error rows injected into a trace's logs table now render ANSI colors with #126237's shared AnsiText component, instead of showing raw escape codes. The error's drawer tab label strips the codes.

Before After
Waterfall, light Before, waterfall, light After, waterfall, light
Waterfall, dark Before, waterfall, dark After, waterfall, dark
Logs tab, light Before, logs tab, light After, logs tab, light
Logs tab, dark Before, logs tab, dark After, logs tab, dark

Stacked on #126237. Fixes LOGS-1023.

Moves the ansi-sequence-parser rendering from logs into a shared component so .log attachment previews use it too, and drops the ansi-to-react dependency.

Fixes DE-1651
ansi-to-react collapsed carriage-return overwrites before rendering, so progress-style lines showed only their final write. Restore that in LogFileViewer.

Refs DE-1651
Only log messages want ANSI output's whitespace preserved. Other callers render it in single-line, truncated containers where preserved newlines would break the layout.

Refs DE-1651
The dark green ANSI color had noticeably more chroma than the other ANSI hues, so move green and bright green one step lighter.

Refs DE-1651
@linear-code

linear-code Bot commented Oct 2, 2026

Copy link
Copy Markdown

LOGS-1023

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 2, 2026
Error titles in the trace waterfall and in the logs table's injected error rows showed raw ANSI escape codes. Render them with the shared AnsiText component, and strip the codes from the drawer tab label.

Fixes LOGS-1023
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1023-render-ansi-colors-in-trace-waterfall-and-logs-table-error branch from 9207863 to 4e016a1 Compare October 2, 2026 00:22
Base automatically changed from joshgoldberg/de-1651-remove-ansi-to-react-in-favor-of-ansi-sequence-parser to master October 2, 2026 13:45
@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

Combined into #126291.

This branch was successfully deployed

1 active deployment
Preview — 4e016a18 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant