Skip to content

fix: advance delivery indicator past Sent and add distinct double-tick - #171

Merged
Amirhesp merged 2 commits into
developfrom
fix/add-double-tick-delivery-indicator
Jul 14, 2026
Merged

Amirhesp merged 2 commits into
developfrom
fix/add-double-tick-delivery-indicator

Conversation

@MasterK0927

Copy link
Copy Markdown
Contributor

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.

Summary

TODO:

  • CHANGELOG updated

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes delivery-ack payload deserialization by aligning the UI payload shape with the backend’s serde(rename_all = "camelCase") expectations, and improves the UI delivery indicator by using a dedicated double-check glyph.

Changes:

  • Send messageRecord (camelCase) instead of message_record when calling notify_message_delivery, so acks can be recorded and delivery status can advance beyond “Sent”.
  • Update the delivery status UI to render a single icon that switches between checkMark and doubleCheck.
  • Add a new doubleCheck SVG icon asset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ui/src/store/ConversationMessageStore.ts Updates zome call payload key to messageRecord so delivery notifications deserialize correctly.
ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte Switches from overlapping two checkmarks to selecting a single icon (checkMark / doubleCheck) and adjusts sizing/spacing.
ui/src/lib/types.ts Renames NotifyMessageDeliveryInput field to messageRecord to match the backend payload shape.
ui/src/lib/svgIcons.ts Adds a doubleCheck SVG icon for delivered states.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Amirhesp

Copy link
Copy Markdown
Collaborator

@MasterK0927 Thanks for the PR. Could you please create a dev releas(v0.12.7-dev) to test the message delivery feature and also check that the synchronization is intact?

@Amirhesp

Amirhesp commented Jul 1, 2026 •

Copy link
Copy Markdown
Collaborator

@MasterK0927 Thanks for working on this.

During code review and local testing of PR #171, It discovered that real-time messaging is broken on the develop branch. Messages sent between two agents do not appear until the app is manually reloaded. This was introduced by PR #161.

How confirmed it:

fix/scroll-bug (branched before PR #161) -> real-time messaging works
develop (contains PR #161) -> messages only appear on reload
PR #171 branch (based on develop) -> same issue

Root cause:

PR #161 introduced two concurrent delivery paths that conflict with each other:

create_message in the Rust zome calls send_remote_signal(RemoteSignalPayload::Message(...), agents) -- a fire-and-forget signal that triggers recv_remote_signal on the recipient
The new notify_message_delivery zome function calls call_remote(agent, "recv_remote_signal", RemoteSignalPayload::Message(...)) -- a blocking remote call that also triggers recv_remote_signal on the same recipient.

Both paths call recv_remote_signal on the recipient's conductor simultaneously. This conflict prevents the signal from reaching the frontend in real-time.

What needs to be resolved:

create_message and notify_message_delivery both call recv_remote_signal on the recipient, which is the conflict. One of these paths needs to be removed.

$: showCount =
status === DeliveryStatus.DeliveredPartial && recipientCount > 1;

$: showCount = status === DeliveryStatus.DeliveredPartial && recipientCount > 1;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid redundant diffs

create_message signals recipients again so messages arrive live;
notify_message_delivery stays for the delivery acknowledgement.
Trim unrelated formatting churn in DeliveryStatusIndicator.
@Amirhesp

Copy link
Copy Markdown
Collaborator

Sync issue is resolved but delivery tick icon has some issues that will be fixed in a follow up PR.

@Amirhesp
Amirhesp merged commit e6a005e into develop Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants