mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #19171] [CLOSED] fix(ui): prevent conversation bubble width jumping with code blocks i… #48164
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/19171
Author: @saikirankanakala
Created: 11/13/2025
Status: ❌ Closed
Base:
main← Head:fix/issue-5975-bubble-width📝 Commits (1)
1178503fix(ui): prevent conversation bubble width jumping with code blocks in widescreen mode📊 Changes
2 files changed (+93 additions, -0 deletions)
View changed files
📝
src/app.css(+54 -0)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+39 -0)📄 Description
contributor license agreement
I agree to the Contributor License Agreement.
🐛 Fixes Issue
Closes #5975
📋 Description
This PR fixes an inconsistent UI behavior where conversation bubbles resize erratically when scrolling through chats containing YAML or other code blocks in widescreen mode with chat bubbles enabled.
Problem
When both Widescreen Mode and Chat Bubble UI are enabled, code blocks (especially YAML) cause conversation bubbles to jump in width during scrolling. This creates a jarring user experience and makes conversations difficult to read.
Root Cause
Code blocks trigger layout recalculation during scroll events
Syntax highlighting causes reflows after initial render
No CSS containment to isolate code block rendering
Missing width constraints in widescreen + chat bubble mode combination
Solution
This PR implements a CSS-based fix that:
Locks bubble width - Ensures consistent max-width for conversation bubbles in widescreen mode
CSS Containment - Isolates code block layout changes using contain: layout style paint
GPU Acceleration - Prevents layout thrashing during scroll with transform: translateZ(0)
Overflow Management - Ensures code blocks scroll horizontally instead of forcing bubble resize
🔧 Changes Made
Files Modified
src/app.css (or equivalent stylesheet)
Key CSS Additions
css/* Consistent bubble width in widescreen + chat bubble mode */
.widescreen .message-content {
max-width: min(100%, 1200px) !important;
width: 100% !important;
}
/* Prevent code blocks from causing layout shifts */
.widescreen .message-content pre {
contain: layout style paint;
transform: translateZ(0);
overflow-x: auto;
}
contributor license agreement
I agree to the Contributor License Agreement.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.