Skip to content

Commit 591e530

Browse files
committed
🐛 fix(ui): wide mode overflow — code blocks, markdown, assistant content
- Remove margin-left: 44px on assistant content (caused overflow) - Add min-width: 0, overflow-wrap: anywhere, word-break on assistant content - Add max-width: 100% on code blocks and markdown - Add overflow-x: auto on code block inner elements - Prevent horizontal scroll in wide mode
1 parent 96a1907 commit 591e530

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

packages/app/src/index.css

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ body::before {
4444
padding-left: 0;
4545
border-left: none;
4646
position: relative;
47-
margin-left: 44px;
47+
min-width: 0;
48+
overflow-wrap: anywhere;
49+
word-break: break-word;
4850
}
4951

5052
[data-slot="session-turn-assistant-content"]::before {
5153
content: "⬡ OPENCODE AI";
5254
display: flex;
5355
align-items: center;
5456
gap: 10px;
55-
margin-bottom: 16px;
56-
margin-left: -44px;
57+
margin-bottom: 12px;
5758
font-family: var(--font-family-sans);
5859
font-size: 12px;
5960
font-weight: 700;
@@ -140,6 +141,21 @@ body::before {
140141
background: var(--surface-inset-strong, #1e1e2e) !important;
141142
box-shadow: none !important;
142143
overflow: hidden;
144+
max-width: 100%;
145+
}
146+
147+
/* Prevent code overflow in wide mode */
148+
[data-component="markdown"] pre code,
149+
[data-component="markdown"] .shiki code {
150+
overflow-x: auto;
151+
display: block;
152+
max-width: 100%;
153+
}
154+
155+
[data-component="markdown"] {
156+
max-width: 100%;
157+
overflow-wrap: anywhere;
158+
word-break: break-word;
143159
}
144160

145161
/* Code block copy button: Always visible, pill with "Copy" feel */

0 commit comments

Comments
 (0)