Constrain chat code block containers to the message bubble width.
Keep long fenced code scrollable instead of letting code min-content width resize the bubble.
Testing
git diff --check
Checked the CodeBlock.svelte containment classes are present.
Note: I did not run the full Svelte check because dependencies are not installed in this local clone.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/24430
**Author:** [@sjhddh](https://github.com/sjhddh)
**Created:** 5/7/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/code-block-bubble-width-5975`
---
### 📝 Commits (1)
- [`50c9c93`](https://github.com/open-webui/open-webui/commit/50c9c93922940792235b2f6e791b05519ed60183) fix: constrain chat code blocks to bubble width
### 📊 Changes
**1 file changed** (+2 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/components/chat/Messages/CodeBlock.svelte` (+2 -2)
</details>
### 📄 Description
Fixes #5975.
## Summary
- Constrain chat code block containers to the message bubble width.
- Keep long fenced code scrollable instead of letting code min-content width resize the bubble.
## Testing
- `git diff --check`
- Checked the `CodeBlock.svelte` containment classes are present.
Note: I did not run the full Svelte check because dependencies are not installed in this local clone.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24430
Author: @sjhddh
Created: 5/7/2026
Status: ❌ Closed
Base:
main← Head:fix/code-block-bubble-width-5975📝 Commits (1)
50c9c93fix: constrain chat code blocks to bubble width📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
src/lib/components/chat/Messages/CodeBlock.svelte(+2 -2)📄 Description
Fixes #5975.
Summary
Testing
git diff --checkCodeBlock.sveltecontainment classes are present.Note: I did not run the full Svelte check because dependencies are not installed in this local clone.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.