mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #16604] [CLOSED] fix: Conversation bubble width jumping with YAML code blocks in wides… #24181
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/16604
Author: @Rain6435
Created: 8/14/2025
Status: ❌ Closed
Base:
dev← Head:fix/issue-5975-conversation-bubble-sizing-final📝 Commits (5)
d880a91fix: Conversation bubble width jumping with YAML code blocks in widescreen mode7d29f64Merge origin/dev into fix/issue-5975-conversation-bubble-sizing-finalc6362f1Formatting issue.e773420restore: Add back missing static files8130823Formatting issue and cleanup.📊 Changes
4 files changed (+795 additions, -371 deletions)
View changed files
📝
src/lib/components/chat/Messages/CodeBlock.svelte(+223 -74)📝
src/lib/components/chat/Messages/Message.svelte(+245 -75)📝
src/lib/components/chat/Messages/UserMessage.svelte(+243 -221)📝
src/lib/components/common/CodeEditor.svelte(+84 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in
Discussions and describe your changes before submitting a pull
request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the
devbranch.Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is
added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or
other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring
adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
Changelog Entry
Description
This PR fixes the conversation bubble width jumping issue with YAML code blocks in widescreen mode. The problem occurred
when long YAML content caused automatic width expansion, leading to inconsistent bubble sizes during scrolling. The solution
implements strict width controls and forces horizontal overflow instead of automatic width adjustment.
Fixed
Changed
!importantdeclarations to lock bubble dimensionsTechnical Details
EditorView.lineWrappingfrom CodeMirror configurationwhite-space: nowrapandoverflow-x: autoto force horizontal scrollingcontain: layoutto prevent child elements from affecting parent dimensions!importantto lock width propertiesAdditional Information
Fixes #5975
Test Plan
Screenrecording
https://github.com/user-attachments/assets/767b9092-3e7d-4cb4-92de-bf5840df2944
Testing Steps
- Paste the YAML content in a chat message
- Scroll down until the code block is out of view
- Scroll back up and observe that the bubble width remains consistent
- Check that horizontal scrollbars appear in the code block
- Test manual resize functionality by dragging bubble edges
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to
the /CONTRIBUTOR_LICENSE_AGREEMENT, and
I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.