Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix: bubble bg always wraps the measured text - no more horizontally cut lines

Gulum92d2bfdec2d0
diff --git a/src/renderer/src/scene/office/ThoughtBubble.ts b/src/renderer/src/scene/office/ThoughtBubble.ts
index 799902c1..db8b51c2 100644
--- a/src/renderer/src/scene/office/ThoughtBubble.ts
+++ b/src/renderer/src/scene/office/ThoughtBubble.ts
@@ -251,7 +251,12 @@ export class ThoughtBubble {
}
private redraw(): void {
- this.bgW = Math.min(this.label.width + PADDING_X * 2, MAX_WIDTH / RENDER_SCALE);
+ // The cloud always wraps the MEASURED text. Clamping the bg to MAX_WIDTH
+ // while the label keeps its real width let text paint past the bubble edge
+ // whenever the measurement overshot wordWrapWidth a touch (emoji glyphs,
+ // fallback-font metrics) — on the dark map that read as "horizontally cut".
+ // wordWrap already bounds the label, so the bg needs no clamp of its own.
+ this.bgW = this.label.width + PADDING_X * 2;
this.bgH = this.label.height + PADDING_Y * 2;
this.bg.clear();
diff --git a/src/renderer/src/scene/office/ToolBubble.ts b/src/renderer/src/scene/office/ToolBubble.ts
index 74811c6b..69938fb2 100644
--- a/src/renderer/src/scene/office/ToolBubble.ts
+++ b/src/renderer/src/scene/office/ToolBubble.ts
@@ -207,7 +207,11 @@ export class ToolBubble {
}
private redrawBg(): void {
- this.bgW = Math.min(this.label.width + PADDING_X * 2, MAX_WIDTH / RENDER_SCALE);
+ // Always wrap the MEASURED text — clamping the bg while the label keeps
+ // its real width lets text paint past the bubble edge when the measurement
+ // overshoots wordWrapWidth (emoji glyphs, fallback metrics). wordWrap
+ // already bounds the label, so the bg needs no clamp of its own.
+ this.bgW = this.label.width + PADDING_X * 2;
this.bgH = this.label.height + PADDING_Y * 2;
this.bg.clear();
this.bg.roundRect(0, 0, this.bgW, this.bgH, CORNER_RADIUS);