Merge pull request #2623 from Molecule-AI/fix/canvas-chat-agent-prose-invert

fix(canvas): agent chat bubble dark-mode prose contrast (regression #2618)
This commit is contained in:
Hongming Wang 2026-05-03 19:42:49 +00:00 committed by GitHub
commit 954d2172f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -792,7 +792,18 @@ function MyChatPanel({ workspaceId, data }: Props) {
}`}
>
{msg.content && (
<div className={`prose prose-sm max-w-none [&>p]:mb-1 [&>p:last-child]:mb-0 ${msg.role === "user" ? "prose-invert" : ""}`}>
<div
className={`prose prose-sm max-w-none [&>p]:mb-1 [&>p:last-child]:mb-0 ${
msg.role === "user"
? "prose-invert"
// Agent bubbles use bg-zinc-700 in dark mode; without
// prose-invert the Tailwind Typography plugin keeps
// its default DARK body color → unreadable dark-on-dark.
// Light mode keeps default prose colors against the
// warm surface-card bg.
: "dark:prose-invert"
}`}
>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{msg.content}</ReactMarkdown>
</div>
)}