The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 18:30 UTC
fix(web): sent messages honor their theme foreground (#26888)
Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Xinmin Zeng <fancyzeng999@gmail.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Xinmin Zeng committed
Nov 12, 2026 at 14:11 UTC
b63d3c592318ce936f787c48023f0dba498056dd
2 files changed
+18
-1
apps/web/src/components/chat/TimelineUserMessageRow.tsx
+1
-1
@@ -1218,7 +1218,7 @@ const UserMessageBody = memo(function UserMessageBody(props: {
1218
cwd={props.markdownCwd}
1219
threadRef={ctx.threadRef ?? undefined}
1220
skills={props.skills}
1221
- className="text-foreground user-message-markdown"
1221
+ className="text-message-foreground user-message-markdown"
1222
lineBreaks
1223
parseRawHtml={false}
1224
extraRemarkPlugins={USER_MESSAGE_REMARK_PLUGINS}
apps/web/src/index.css
+17
@@ -2138,6 +2138,11 @@ code {
2138
font-size: 0.85em;
2139
}
2140
2141
+.chat-markdown.user-message-markdown :not(pre) > code {
2142
+ background: color-mix(in srgb, var(--contrast-message-foreground) 10%, transparent);
2143
+ color: var(--contrast-message-foreground);
2144
+}
2145
+
2146
.chat-markdown strong {
2147
font-weight: 700;
2148
}
@@ -2202,6 +2207,18 @@ code {
2207
}
2208
}
2209
2210
+/* Sent messages color prose with the message foreground, which is not chosen
2211
+ for the code surface, so their plain-text fences keep the global foreground. */
2212
+.chat-markdown.user-message-markdown
2213
+ .chat-markdown-codeblock:is(
2214
+ [data-language="text" i],
2215
+ [data-language="txt" i],
2216
+ [data-language="plain" i],
2217
+ [data-language="plaintext" i]
2218
+ ) {
2219
+ color: var(--contrast-foreground) !important;
2220
+}
2221
+
2222
/* Paragraphs and code blocks arrive in chunks while a response streams. Fade
2223
each new block in so the chunk does not pop. @starting-style only applies
2224
when an element is first inserted, and the rule is gated on data-streaming,