From f8984ca0829b7f7cfd4a083e0e1a6f721db064cb Mon Sep 17 00:00:00 2001 From: Keshav Agarwal Date: Mon, 22 Jun 2026 23:12:43 +0530 Subject: [PATCH] fix: advance delivery indicator past Sent and add distinct double-tick The notify_message_delivery zome input uses serde rename_all=camelCase, so it expects messageRecord, but the client sent message_record. The payload failed to deserialize, the call threw, delivery acks were never recorded, and the indicator was stuck on a single tick. Send messageRecord to match. Also render a dedicated double-check glyph for delivered messages instead of overlapping two single checks. --- ui/src/lib/svgIcons.ts | 2 ++ ui/src/lib/types.ts | 2 +- .../[id]/DeliveryStatusIndicator.svelte | 20 +++++++++---------- ui/src/store/ConversationMessageStore.ts | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ui/src/lib/svgIcons.ts b/ui/src/lib/svgIcons.ts index adc5c4ac..da231b82 100644 --- a/ui/src/lib/svgIcons.ts +++ b/ui/src/lib/svgIcons.ts @@ -28,6 +28,8 @@ export const svgIcons: { [key: string]: string } = { '', checkMark: '', + doubleCheck: + '', cancel: '', copy: '', diff --git a/ui/src/lib/types.ts b/ui/src/lib/types.ts index 173081ff..9297b930 100644 --- a/ui/src/lib/types.ts +++ b/ui/src/lib/types.ts @@ -132,7 +132,7 @@ export interface SendMessageInput { export interface NotifyMessageDeliveryInput { agent: AgentPubKey; - message_record: MessageRecord; + messageRecord: MessageRecord; } export interface DeleteMessageInput { diff --git a/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte b/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte index e0d96c25..f3a199da 100644 --- a/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte +++ b/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte @@ -6,25 +6,25 @@ export let deliveredCount: number = 0; export let recipientCount: number = 0; - $: showDouble = - status === DeliveryStatus.DeliveredPartial || status === DeliveryStatus.DeliveredAll; + $: icon = + status === DeliveryStatus.DeliveredPartial || status === DeliveryStatus.DeliveredAll + ? "doubleCheck" + : "checkMark"; + $: colorClass = status === DeliveryStatus.DeliveredAll ? "text-primary-500" : "text-secondary-400 dark:text-secondary-300"; - $: showCount = - status === DeliveryStatus.DeliveredPartial && recipientCount > 1; + + $: showCount = status === DeliveryStatus.DeliveredPartial && recipientCount > 1; - - {#if showDouble} - - {/if} + {#if showCount} - {deliveredCount}/{recipientCount} + {deliveredCount}/{recipientCount} {/if} diff --git a/ui/src/store/ConversationMessageStore.ts b/ui/src/store/ConversationMessageStore.ts index 3a84cc3b..bd49870c 100644 --- a/ui/src/store/ConversationMessageStore.ts +++ b/ui/src/store/ConversationMessageStore.ts @@ -840,7 +840,7 @@ const paginationState = writable>({}); try { const delivered = await client.notifyMessageDelivery(cellId, { agent, - message_record: messageRecord, + messageRecord, }); return { agentB64: encodeHashToBase64(agent), delivered }; } catch (err) {