Repository navigation
Show the right message when a member search matches nobody - #148
Merged
Merged
Conversation
After a key had been pasted once, the community roster stayed cached. A plain search or malformed key that matched nobody then showed "That key isn't a member of this community yet" instead of "No matching people or agents." The resolved check never required a parsed key, and the roster lookup for a null key is always false, so no key at all counted as an outsider. Require a parsed key before treating the lookup as resolved. Wording only: nothing could be added by mistake. Claude-Account: russelledeming@gmail.com Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
In the members sidebar's "Add people and agents, or paste a public key" box, the wrong message could appear. After a key had been pasted once, the community roster stayed cached. Typing a plain search, or a malformed key, that matched nobody then showed "That key isn't a member of this community yet. An owner or admin can add them in Settings > Members." It should show "No matching people or agents."
The cause:
pastedKeyResolveddid not require a parsed key. The earlier lookup's result carries over as placeholder data, so the empty lookup reports success. With no key,roster.some(member.pubkey === null)is false, sopastedKeyIsOutsidercame out true. Found in the 9 Nov 2026 launch check. Nothing could be added by mistake, so this is wording only.What changed
desktop/src/features/channels/ui/MembersSidebar.tsx:pastedKeyResolvednow starts withpastedPubkey !== null(1 line).desktop/tests/e2e/channels.spec.ts: a new test next to the malformed-key test. It pastes a key so the roster loads, clears the box, types a plain search matching nobody, and expects "No matching people or agents." and no not-a-member text (20 lines). The existing malformed-key test passes either way because no key is looked up first, so the profile lookup never reports success.How it was checked
All local, on an e2e build served from this worktree on a private port, with one Playwright worker.
No matching people or agents.was not found, and the page snapshot showed the search box holdingzzzz-matches-nobodywith the not-a-member text under it.channels.spec.tsmatching "members sidebar", including every paste test, pass after the guard.tsc --noEmit,biome checkon both files, andcheck:file-sizesall pass.This touches
desktop/, so it needs a launch check when its train asks.Factory-Task: desktop/members-plain-search-message
Built-by: claude-code/claude-opus-5-5
Claude-Account: russelledeming@gmail.com
Undo: revert this PR's merge commit; the only product change is the one guard line in MembersSidebar.tsx.
🤖 Generated with Claude Code