From 20349308f7d3e10c45cb6a239c2f6eabac9a8bd4 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Fri, 25 Sep 2026 11:08:41 -0400 Subject: [PATCH] Load displayed identities' profiles for collection labels A displayed collection such as search results has no member loader, so agents whose profiles were not cached lacked their owner hint and showed as "murderbot (agent)" instead of "baxen's murderbot". Load uncached candidates along with their owners. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson --- .../shared/identity_names/identity_names_provider.dart | 9 ++++++++- mobile/test/features/pulse/compose_note_page_test.dart | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mobile/lib/shared/identity_names/identity_names_provider.dart b/mobile/lib/shared/identity_names/identity_names_provider.dart index 383dea1372..2f07546d73 100644 --- a/mobile/lib/shared/identity_names/identity_names_provider.dart +++ b/mobile/lib/shared/identity_names/identity_names_provider.dart @@ -47,7 +47,14 @@ IdentityNames watchIdentityNames( agentPubkeys: agentPubkeys, fallbackNames: fallbackNames, ); - final missing = sources.missingOwnerProfiles(names.candidates); + // A displayed identity's profile carries its owner hint, so load uncached + // candidates as well as their owners; channels load member profiles + // elsewhere, but a displayed collection has no other loader. + final missing = { + for (final key in names.candidates) + if (!sources.profiles.containsKey(key)) key, + ...sources.missingOwnerProfiles(names.candidates), + }; if (missing.isNotEmpty) { Future.microtask(() { if (ref.context.mounted) { diff --git a/mobile/test/features/pulse/compose_note_page_test.dart b/mobile/test/features/pulse/compose_note_page_test.dart index d0650a5bc5..ff06b65d6b 100644 --- a/mobile/test/features/pulse/compose_note_page_test.dart +++ b/mobile/test/features/pulse/compose_note_page_test.dart @@ -17,6 +17,9 @@ class _FakeUserCacheNotifier extends UserCacheNotifier { @override UserProfile? get(String pubkey) => _users[pubkey.toLowerCase()]; + + @override + Future preload(List pubkeys) async => true; } void main() {