feat(tui): add terminal highlighting improvements#391
Merged
Conversation
Port three TUI rendering improvements: 1. Diff rendering: shaded green/red backgrounds via terminal color level detection (truecolor/256-color/ansi16) with light/dark theme awareness. Falls back to foreground-only colors on ANSI-16 terminals. 2. Syntax highlighting: replace tree-sitter-bash with syntect+two-face for multi-language theme-aware highlighting (~250 languages, Catppuccin Mocha default). Used in both bash command rendering and markdown fenced code blocks. 3. Markdown rendering: fenced code block syntax highlighting with language detection from info strings, local file link rendering with cwd-relative paths, and URL-preserving adaptive word wrapping. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
- Update rustls-webpki 0.103.4 -> 0.103.10 (RUSTSEC-2026-0049) - Ignore RUSTSEC-2026-0002 (lru 0.12.x pinned by ratatui fork) 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
Apply the background color to gutter spans and pad each diff line with trailing spaces to fill the complete rendering width. This ensures the green/red tint covers from left edge to right edge, not just behind the text content. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
The background tint now covers the complete line from left to right: - prefix_lines propagates Line background color onto prefix spans - push_wrapped_diff_line pads to width + outer_pad so trailing space accounts for the 4-char indent that prefix_lines will prepend 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
cargo clippy -p nori-tui --all-features --tests)just fmtcleancargo test -p tui-pty-e2e)