From f8984ca0829b7f7cfd4a083e0e1a6f721db064cb Mon Sep 17 00:00:00 2001 From: Keshav Agarwal Date: Mon, 22 Jun 2026 23:12:43 +0530 Subject: [PATCH 1/2] 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) { From 17aa6ca435e7b676a746bd7beb7d1d226a47d8e0 Mon Sep 17 00:00:00 2001 From: Keshav Agarwal Date: Tue, 7 Jul 2026 22:27:52 +0530 Subject: [PATCH 2/2] fix: broadcast created messages for real-time delivery create_message signals recipients again so messages arrive live; notify_message_delivery stays for the delivery acknowledgement. Trim unrelated formatting churn in DeliveryStatusIndicator. --- dnas/relay/zomes/coordinator/relay/src/message.rs | 15 +++++++++++++++ .../[id]/DeliveryStatusIndicator.svelte | 9 ++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dnas/relay/zomes/coordinator/relay/src/message.rs b/dnas/relay/zomes/coordinator/relay/src/message.rs index 3fc9a167..7fc42074 100644 --- a/dnas/relay/zomes/coordinator/relay/src/message.rs +++ b/dnas/relay/zomes/coordinator/relay/src/message.rs @@ -27,6 +27,21 @@ pub fn create_message(input: SendMessageInput) -> ExternResult { (), )?; + let my_pub_key = agent_info()?.agent_initial_pubkey; + let agents = input + .agents + .into_iter() + .filter(|a| a != &my_pub_key) + .collect(); + let _ = send_remote_signal( + crate::RemoteSignalPayload::Message(MessageRecord { + message: Some(input.message), + original_action: message_hash.clone(), + signed_action: record.signed_action().clone(), + }), + agents, + ); + debug!("create message all messages link: {:?}", link); Ok(record) } diff --git a/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte b/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte index f3a199da..402200b9 100644 --- a/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte +++ b/ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte @@ -10,21 +10,20 @@ 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 showCount} - {deliveredCount}/{recipientCount} + {deliveredCount}/{recipientCount} {/if}