fix(ui): remove opposite border to fix background banding on user messages

This commit is contained in:
Ed Zynda
2026-02-26 12:54:56 +03:00
parent a2c8201ec4
commit 711aefba5e
+6 -12
View File
@@ -177,25 +177,19 @@ func renderContentBlock(content string, containerWidth int, options ...rendering
borderColor = *renderer.borderColor
}
// Very muted color for the opposite border
mutedOppositeBorder := AdaptiveColor("#F3F4F6", "#1F2937")
// Align determines which border gets the accent color.
// Only render the accent-side border to avoid background
// banding from the opposite border character.
switch align {
case lipgloss.Right:
style = style.
BorderRight(true).
BorderLeft(true).
BorderRightForeground(borderColor).
BorderLeftForeground(mutedOppositeBorder)
borderChars = 2
BorderRightForeground(borderColor)
borderChars = 1
default: // Left (and fallback)
style = style.
BorderLeft(true).
BorderRight(true).
BorderLeftForeground(borderColor).
BorderRightForeground(mutedOppositeBorder)
borderChars = 2
BorderLeftForeground(borderColor)
borderChars = 1
}
}