From 392b39af5a132b12352aaee242a31bd371aa1f6c Mon Sep 17 00:00:00 2001 From: Brandon Lucas <38222767+thebrandonlucas@users.noreply.github.com> Date: Thu, 29 Oct 2026 13:54:12 +0000 Subject: [PATCH] fix(gpui): paint long inline code on the theme's chip background TextViewStyle::default() is built from the light palette, and with_code_background only sets the fenced-block background. Inline code over 40 characters stays in the text flow and takes the style's inline_code highlight, so in dark mode it kept the light accent fill under light text. State the inline code background alongside the code background in the three TextViewStyle builders. Co-Authored-By: Claude Sonnet 5.5 --- apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs | 4 ++++ apps/buzz-gpui/crates/app/src/ui/markdown.rs | 4 ++++ apps/buzz-gpui/crates/app/src/ui/settings/updates.rs | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs b/apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs index c9a9da9284c..842cc1c65a5 100644 --- a/apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs +++ b/apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs @@ -634,6 +634,10 @@ fn memory_body(key: &str, body: &str, rich: bool, cx: &App) -> AnyElement { .with_link(c.text_link) .with_border(c.border_standard) .with_code_background(c.affordance_subtle) + .with_inline_code(HighlightStyle { + background_color: Some(c.affordance_subtle), + ..Default::default() + }) .with_selection(c.text_link.opacity(0.25)); TextView::markdown( SharedString::from(format!("memory-body-{key}")), diff --git a/apps/buzz-gpui/crates/app/src/ui/markdown.rs b/apps/buzz-gpui/crates/app/src/ui/markdown.rs index adcacd937b9..9659198dbe1 100644 --- a/apps/buzz-gpui/crates/app/src/ui/markdown.rs +++ b/apps/buzz-gpui/crates/app/src/ui/markdown.rs @@ -2004,6 +2004,10 @@ fn text_style(color: Hsla, c: &buzz_ui::Colors) -> TextViewStyle { .with_link(c.text_link) .with_border(c.border_standard) .with_code_background(c.affordance_subtle) + .with_inline_code(HighlightStyle { + background_color: Some(c.affordance_subtle), + ..Default::default() + }) .with_selection(c.text_link.opacity(0.25)) .with_paragraph_gap(rems(0.)) } diff --git a/apps/buzz-gpui/crates/app/src/ui/settings/updates.rs b/apps/buzz-gpui/crates/app/src/ui/settings/updates.rs index 2c084498122..b7ffded490c 100644 --- a/apps/buzz-gpui/crates/app/src/ui/settings/updates.rs +++ b/apps/buzz-gpui/crates/app/src/ui/settings/updates.rs @@ -221,6 +221,10 @@ fn notes(cx: &App) -> Option { .with_link(c.text_link) .with_border(c.border_standard) .with_code_background(c.affordance_subtle) + .with_inline_code(HighlightStyle { + background_color: Some(c.affordance_subtle), + ..Default::default() + }) .with_selection(c.text_link.opacity(0.25)); let view_on_github = button("update-release-page", "View on GitHub") .icon_end(IconName::ArrowSquareOut)