Skip to content

Show the right message when a member search matches nobody - #148

Merged
QuicksilverSlick merged 1 commit into
mainfrom
fix/members-plain-search-message
Nov 10, 2026
Merged

QuicksilverSlick merged 1 commit into
mainfrom
fix/members-plain-search-message

Conversation

@QuicksilverSlick

Copy link
Copy Markdown
Owner

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: pastedKeyResolved did 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, so pastedKeyIsOutsider came 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: pastedKeyResolved now starts with pastedPubkey !== 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.

  • The new test FAILED before the guard: No matching people or agents. was not found, and the page snapshot showed the search box holding zzzz-matches-nobody with the not-a-member text under it.
  • The new test passes after the guard.
  • All 20 tests in channels.spec.ts matching "members sidebar", including every paste test, pass after the guard.
  • tsc --noEmit, biome check on both files, and check:file-sizes all 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

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>
@QuicksilverSlick QuicksilverSlick added the lane:ready Builder is done: green, agent-reviewed, exercised. The steward puts it in the next train. label Nov 9, 2026
@QuicksilverSlick
QuicksilverSlick merged commit f24dd0e into main Nov 10, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:ready Builder is done: green, agent-reviewed, exercised. The steward puts it in the next train.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant