canopy-ui 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/chat/ChatPanel.tsx
CHANGED
|
@@ -179,7 +179,10 @@ export function ChatPanel({
|
|
|
179
179
|
header, i.e. unreachable. Pinning keeps "Load earlier"/"Load full"
|
|
180
180
|
always visible. */}
|
|
181
181
|
{historySlot}
|
|
182
|
-
|
|
182
|
+
{/* overflow-x-hidden: `overflow-y: auto` alone computes overflow-x to
|
|
183
|
+
auto, so anything wider than the column made the transcript scroll
|
|
184
|
+
sideways into empty space. Wide content scrolls inside its own box. */}
|
|
185
|
+
<div ref={containerRef} onScroll={onScroll} className="flex-1 overflow-x-hidden overflow-y-auto">
|
|
183
186
|
<MessageList
|
|
184
187
|
messages={state.messages}
|
|
185
188
|
emptyState={emptyState}
|
package/src/chat/MessageItem.tsx
CHANGED
|
@@ -119,8 +119,13 @@ export function MessageItem({
|
|
|
119
119
|
const showThinking =
|
|
120
120
|
(isPending || isStreaming) && message.role === "assistant" && !text;
|
|
121
121
|
return (
|
|
122
|
+
// `overflow-wrap:anywhere` so one unbreakable token — a long path, a URL,
|
|
123
|
+
// inline code — wraps inside the bubble. Without it the token overflowed
|
|
124
|
+
// `max-w-[80%]` and made the whole transcript scroll sideways into empty
|
|
125
|
+
// space on a phone (2026-09-24). Tables and code blocks keep their own
|
|
126
|
+
// horizontal scroll; this only affects running text.
|
|
122
127
|
<div
|
|
123
|
-
className={`my-2 max-w-[80%] rounded-2xl px-4 py-2 ${bubbleClass}`}
|
|
128
|
+
className={`my-2 min-w-0 max-w-[80%] rounded-2xl px-4 py-2 [overflow-wrap:anywhere] ${bubbleClass}`}
|
|
124
129
|
aria-live={isStreaming || isPending ? "polite" : undefined}
|
|
125
130
|
>
|
|
126
131
|
{showThinking ? (
|