Skip to content

feat(tui): distinguish user messages with bold text and matching underlines - #341

Merged
daviddanialy merged 5 commits into
mainfrom
feat/user-message-highlight
Nov 4, 2026
Merged

daviddanialy merged 5 commits into
mainfrom
feat/user-message-highlight

Conversation

@daviddanialy

@daviddanialy daviddanialy commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Match the submitted message’s › caret to the input caret’s teal/cyan accent.
  • Keep submitted user messages bold and add a thin cyan rule underneath each message, with no background fill that could be mistaken for text selection.
  • Place the rule below the entire message, including wrapped and blank lines. The accent follows the terminal's ANSI palette.
  • Paint the rule as decoration over an empty source row so it is not included in copied text. Links remain underlined and clickable; assistant replies are unchanged.

Demo

Kit bold user messages with a matching underline

Rendered from Kit's actual Ratatui UI cell buffer with a conventional dark ANSI palette (not a hand-drawn mockup). Includes a short prompt, a wrapped multiline prompt, a blank line, and a clickable link.

Updated following feedback: the original blue fill looked like selected text. This version uses Daniel's suggestion of bold text with a line beneath the message instead. The final underline shares the textarea’s rounded-border horizontal glyph and cyan accent, visually connecting sent messages to the input box.

Testing

  • mise run test -- --lib tui::ui::tests — 111 passed for the rule implementation
  • mise run test -- --lib tui::ui::tests::user_ — rechecked after matching the composer style
  • Render regression covering narrow and wide terminals, bold text with no fill, matching rule, clickable links, and exclusion of the rule from copied text.
  • mise exec -- cargo fmt --check

@daviddanialy daviddanialy changed the title feat(tui): highlight user messages with full-width blue bands feat(tui): distinguish user messages with bold text and blue rules Nov 4, 2026
@daviddanialy daviddanialy changed the title feat(tui): distinguish user messages with bold text and blue rules feat(tui): distinguish user messages with bold text and matching underlines Nov 4, 2026

@kit-code-agent kit-code-agent Bot left a comment

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.

The decorative rule adds an extra blank line when copying across a user message and its assistant response. It should remain visual-only without changing the copied transcript.

Took 26 min

Comment thread src/tui/ui.rs Resolved

@kit-code-agent kit-code-agent Bot left a comment

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.

No issues found. The changes look good to merge.

Took 3 min 41 sec

@daviddanialy
daviddanialy enabled auto-merge (squash) November 4, 2026 23:36
@daviddanialy
daviddanialy merged commit 3097dde into main Nov 4, 2026
7 checks passed
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