Fix widget greeting overflow with long names. Sync messages on every WS connect

This commit is contained in:
Abhinav Raut
2026-04-12 13:10:17 +05:30
parent f487950fbb
commit 64eb4e4c8b
2 changed files with 3 additions and 6 deletions
@@ -8,7 +8,7 @@
class="max-h-8 max-w-full"
/>
<!-- Greeting and introduction -->
<div class="mt-24 font-bold text-4xl">
<div class="mt-24 font-bold text-4xl break-all">
<h2>{{ parsedGreeting }}</h2>
<p class="text-muted-foreground mt-2 font-semibold">
{{ parsedIntroduction }}
+2 -5
View File
@@ -58,7 +58,6 @@ export class WidgetWebSocketClient {
handleOpen () {
this.reconnectInterval = 1000
this.wasReconnecting = this.reconnectAttempts > 0
this.reconnectAttempts = 0
this.isReconnecting = false
this.lastPong = Date.now()
@@ -69,10 +68,8 @@ export class WidgetWebSocketClient {
this.joinInbox()
}
// If this was a reconnection, sync current conversation messages.
if (this.wasReconnecting) {
this.syncMissedMessages()
}
// Sync messages on every connect to pick up anything missed while disconnected.
this.syncMissedMessages()
}
handleMessage (event) {