messaging: polish built-in behaviour — resolution, send, sort, race #59
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos!59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_message_sender_name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Eleven fixes in the messaging archipelago so the built-in UI actually renders and behaves the way the code already implies. No new features.
Resolution / display
"Message in <sid>"identifier."Alice, Bob, Carol (+N more)"from contacts when the stored value is the"New Chat"placeholder."system"key is filtered out of synthesized chat names."New Chat"until reload).Send / input
Me(works around the server still stampingsender_public_key = "system"pre-auth).errorsignal as an inline banner above the input.sendingflag is cleared on chat switch so a mid-send change-of-chat doesn't leave the new input locked.List ordering / perf
fetch_contactsparallelized withfutures::future::join_all, matching thefetch_chats/fetch_messagespattern.Key changes
resolve_chat_display_name(service): group placeholder → participant list,"system"/ self filtering.resolve_contact_display_name(key, contacts) -> Option<String>— single source of truth for the pubkey → alias/name lookup.resolve_sender_name— thin wrapper for message-bubble senders.chatmessage_to_messagedatanow takes&[Contact]and uses the resolver.ChatDatacarriesraw_name+participant_keysso the header can re-resolve at render time.ChatViewgainserror/sendingprops, renders an inline error banner, and forwardsdisabledtoChatInput.NEW_CHAT_PLACEHOLDER/SYSTEM_KEYhoisted to named constants.Test plan
cargo check -p hero_archipelagos_messaginggreen against merged hero_osisrustfmt --edition 2021 --checkon all modified filestests/e2e/messaging.spec.tsin hero_os passes against the deployed archipelago (3 RPCs per chat open, resolved names in list + header, optimistic-own rendering, auto-scroll, list preview updates on send, no stale-flash on switch, NewChat+adds a chip).Closes #58, #60, #61, #62, #63, #64, #65, #66, #70, #71, #72.
Bubble sender labels showed "Message in <conv_sid>" — the server-side internal identifier (`ChatMessage.name = format!("Message in {}", ...)`), which `chatmessage_to_messagedata` was using as `sender_name` for non-own messages. Adds `resolve_sender_name(sender_public_key, own_user_key, contacts)` mirroring the DM-name resolver; threaded through both call sites in the archipelago (initial load + optimistic send push). Falls back to the raw public key when no contact matches. Closes #58messaging: resolve sender name from contactsto messaging: polish built-in features (sender, groups, own messages, errors, input lock)messaging: polish built-in features (sender, groups, own messages, errors, input lock)to messaging: polish built-in behaviour — resolution, send, sort, race