Skip to content

feat(ui): improve assistant response readability and question callouts#45

Open
shettydev wants to merge 3 commits intomainfrom
codex/assistant-response-ui-sober
Open

feat(ui): improve assistant response readability and question callouts#45
shettydev wants to merge 3 commits intomainfrom
codex/assistant-response-ui-sober

Conversation

@shettydev
Copy link
Owner

@shettydev shettydev commented Feb 8, 2026

Summary

This PR overhauls the rendering of assistant messages, moving from generic Tailwind typography to a dedicated, semantically styled system. It introduces a "smart" markdown parser that automatically structures common assistant response patterns into distinct UI elements, significantly improving readability and visual hierarchy.

Key Changes

🎨 Semantic Styling System

  • Introduced a comprehensive set of CSS variables (--assistant-*) for fine-grained control over assistant message styling in both light and dark modes.
  • Replaced generic prose classes with scoped .assistant-markdown classes to prevent style conflicts and allow for bespoke typography.

🧠 Smart Markdown Parsing

  • Added a custom Remark plugin (assistantStructurePlugin) to analyze and transform the markdown AST.
  • Section Detection: Automatically converts text labels like "Summary:", "Details:", and "Next Steps:" into semantic section headings.
  • Question Callouts: "Question:" sections are transformed into distinct callout blocks with specific styling.
  • List Normalization: Automatically converts lists within Question blocks to ordered lists for better sequential flow.

🛠️ Component Updates

  • Updated Message and ChatMessage components to utilize the new styling system.
  • Refined typography (line-height, spacing, font-size) for a better reading experience on long-form content.

Testing

  • Added unit tests in markdown.test.ts to verify AST transformations, specifically:
    • Label-to-heading conversion.
    • Question callout creation.
    • List normalization logic.

@dokploy-mukti
Copy link

dokploy-mukti bot commented Feb 9, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
web ✅ Done Preview URL 2026-02-09T08:39:16.708Z

@shettydev shettydev self-assigned this Feb 9, 2026
@dokploy-mukti
Copy link

dokploy-mukti bot commented Feb 9, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
api ✅ Done Preview URL 2026-02-09T08:55:13.223Z

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

Comments