Repository navigation
perf(search): name searched people from the profile search response - #2353
Conversation
where nip-11 public_profile.searchable is set, /profiles/search returns each found person's relay-signed kind 30382 head with their kind 0 (block/buzz#9019). keep those answers, bounded, one-shot and for 30s, and let directMessages.verified answer those subjects through the same verifiedProfileSubject/verifiedProfile checks without a second read. a person the response carried no head for is answered as unverified. relays without the flag keep the existing read. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Kalvin Chau <[email protected]>
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 looks good. I checked the client against the relay side from block/buzz#9019: the endpoint returns each found person's current relay-signed head in the same page as their kind 0, and the heads table is written in the same transaction as the event, so reading a missing head as "none" matches what the separate 30382 read would have returned. one nonblocking test note inline
| authority?.pubkey !== next.pubkey || | ||
| authority.multipleIssuers !== next.multipleIssuers | ||
| authority.multipleIssuers !== next.multipleIssuers || | ||
| authority.searchable !== next.searchable |
There was a problem hiding this comment.
🤖 nonblocking: nothing covers this line. I removed it locally and every test under src/features/relay still passed. it matters most when a refresh flips searchable from true to false: the kept authority object would still say searchable, so keep() would record "none" for everyone on a page the relay no longer returns heads for, and those rows would show their profile names until useVerifiedNames re-asks 5 minutes later. a small case next to the discovery refresh tests in verified-profile.test.ts (refresh with searchable toggled, expect a new authority object) would pin it
There was a problem hiding this comment.
🤖 Done as a follow-up in #2522: the test refreshes searchable, then searchable again (same object kept), then without the flag (new object). It fails with this line removed.
…r-load-perf * origin/main: (31 commits) test: fix invitation and coordination checks on main (#2517) perf(search): name searched people from the profile search response (#2353) Use the merge queue for pull requests that require it (#2452) fix(browser): load scheme-less address input over https, falling back to http (#2467) fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486) fix(test): observe coordination transition events (#2297) fix(profiles): keep the next view's profile reads through a shrink (#2395) fix(channels): show Add and Send message errors above the Manage members list (#2421) fix(threads): keep reply hooks off agent activity bubbles (#2422) fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425) test: scope row menu placement checks to active section rows (#2493) feat(relay): detach channel windows to a point in history (#2042) feat(identity): decide a missing backup choice from community membership (#2378) Offer Builderlab decisions in FI builds (#2227) feat(inbox): preview recent Inbox activity when hovering the sidebar row (#2347) Add collapsible Solo and Team sidebar sections (#2296) fix(codex): open long Codex transcripts a page of items at a time (#2259) Keep Solo model and effort choices per chat (#2342) feat(sidebar): smooth channel reordering with bounded motion (#2108) Connect legacy agents from DMs and channel mentions (#2423) ...
* origin/main: (31 commits) test: fix invitation and coordination checks on main (#2517) perf(search): name searched people from the profile search response (#2353) Use the merge queue for pull requests that require it (#2452) fix(browser): load scheme-less address input over https, falling back to http (#2467) fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486) fix(test): observe coordination transition events (#2297) fix(profiles): keep the next view's profile reads through a shrink (#2395) fix(channels): show Add and Send message errors above the Manage members list (#2421) fix(threads): keep reply hooks off agent activity bubbles (#2422) fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425) test: scope row menu placement checks to active section rows (#2493) feat(relay): detach channel windows to a point in history (#2042) feat(identity): decide a missing backup choice from community membership (#2378) Offer Builderlab decisions in FI builds (#2227) feat(inbox): preview recent Inbox activity when hovering the sidebar row (#2347) Add collapsible Solo and Team sidebar sections (#2296) fix(codex): open long Codex transcripts a page of items at a time (#2259) Keep Solo model and effort choices per chat (#2342) feat(sidebar): smooth channel reordering with bounded motion (#2108) Connect legacy agents from DMs and channel mentions (#2423) ... Signed-off-by: Michael Neale <[email protected]>
…-clone-auth-ab8b97 * origin/main: feat(workflows): suggest channel members for @ in Send Message text (block#2309) AIDA-2344: Exclude muted channels from Dock (block#2313) feat(search): add slack-style message search operators on desktop (block#2463) test: fix invitation and coordination checks on main (block#2517) perf(search): name searched people from the profile search response (block#2353) Use the merge queue for pull requests that require it (block#2452) Signed-off-by: damienrj <[email protected]>
* origin/main: fix(messages): keep the hover toolbar while its menu is open (#2439) feat(workflows): suggest channel members for @ in Send Message text (#2309) AIDA-2344: Exclude muted channels from Dock (#2313) feat(search): add slack-style message search operators on desktop (#2463) test: fix invitation and coordination checks on main (#2517) perf(search): name searched people from the profile search response (#2353) Use the merge queue for pull requests that require it (#2452)
…punctuation * upstream/main: (78 commits) fix(plugins): read Square HTTPS sources with the Block SSH agent (block#2465) feat(plugins): let agents request plugin changes for owner review (block#2280) fix(messages): keep the hover toolbar while its menu is open (block#2439) feat(workflows): suggest channel members for @ in Send Message text (block#2309) AIDA-2344: Exclude muted channels from Dock (block#2313) feat(search): add slack-style message search operators on desktop (block#2463) test: fix invitation and coordination checks on main (block#2517) perf(search): name searched people from the profile search response (block#2353) Use the merge queue for pull requests that require it (block#2452) fix(browser): load scheme-less address input over https, falling back to http (block#2467) fix(identity): stop one-click key unlinks and show the linked backed-up key (block#2486) fix(test): observe coordination transition events (block#2297) fix(profiles): keep the next view's profile reads through a shrink (block#2395) fix(channels): show Add and Send message errors above the Manage members list (block#2421) fix(threads): keep reply hooks off agent activity bubbles (block#2422) fix(channels): offer only Copy link in a not-joined preview's sidebar actions (block#2425) test: scope row menu placement checks to active section rows (block#2493) feat(relay): detach channel windows to a point in history (block#2042) feat(identity): decide a missing backup choice from community membership (block#2378) Offer Builderlab decisions in FI builds (block#2227) ... Signed-off-by: Cheng Peng <[email protected]> # Conflicts: # docs/buzz-help.md
…lled-read * origin/main: (28 commits) Run native Codex through plugin execution targets (#2150) test: split Solo access browser scenarios (#2499) feat(agents): let any agent change Buzz settings through the MCP (#2248) Let plugins decorate host sidebar rows and add sort modes (#1853) NEXUS-4082: Keep the new-message boundary stable during a visit (#2083) feat(agents): move version history into settings (#2374) fix(agents): read goose Activity by saved session ids and render memory bodies on open (#2466) feat(channels): starter channels: admin switch and relay auto_join flag (#1624) fix(plugins): read Square HTTPS sources with the Block SSH agent (#2465) feat(plugins): let agents request plugin changes for owner review (#2280) fix(messages): keep the hover toolbar while its menu is open (#2439) feat(workflows): suggest channel members for @ in Send Message text (#2309) AIDA-2344: Exclude muted channels from Dock (#2313) feat(search): add slack-style message search operators on desktop (#2463) test: fix invitation and coordination checks on main (#2517) perf(search): name searched people from the profile search response (#2353) Use the merge queue for pull requests that require it (#2452) fix(browser): load scheme-less address input over https, falling back to http (#2467) fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486) fix(test): observe coordination transition events (#2297) ... Signed-off-by: Gil Birman <[email protected]> Co-authored-by: Claude <[email protected]> # Conflicts: # docs/buzz-help.md
Follow-up to #2322 for block/buzz#9019. That relay change makes
POST /profiles/searchmatch verified names and return each found person's current relay-signed kind 30382 head next to their kind 0. It advertises this asfederated_identity.public_profile.searchable: truein NIP-11.Today the client drops those heads (
kind === 0filter), anduseVerifiedNamesreads them again. A person found only by verified name (fname→ profile nameFak) stays hidden byrankPeopleuntil that second read lands.Behavior
searchablefrom NIP-11. An equal refresh only keeps the current authority object ifsearchableis unchanged too.createProfileSearchkeeps each endpoint response's answers. Each person on the page gets their newest head by the relay key, or "none" when the response carried no head for them.PROFILE_CACHE_BASE), taken once, tied to the authority that was current when they landed, and stand for 30 s.directMessages.verifiedanswers those subjects from the kept answers through the sameverifiedProfileSubject/verifiedProfilechecks, and reads only the rest. A page the search fully answered sends no 30382 read.useVerifiedNamesand the UI are unchanged. Rows name themselves on the next render after a page settles, with no network wait.Not in scope: people who are verified but have no kind 0 (still dropped, as before), and seeding the shared verified cache from search.
Validation
profile-search.test.ts:searchable;direct-messages.test.ts: a real session searches withsearchable, thenverified()names the page with zero reads; without the flag it reads once. Replacing the kept answers with an empty map fails the searchable case.verified-profile.test.ts: discovery parsessearchable.tsc --noEmit; biome lint onsrc/features/relay; vitest on the touched relay tests plussrc/features/profiles,SearchResults,ChannelMembersDialogandsrc/bundled/mentions(588 tests).