fix(desktop): allow shared agent mentions - #3056
Closed
joahg wants to merge 1 commit into
Closed
Conversation
Co-authored-by: Joah Gerstenberg <me@joahg.com> Signed-off-by: Joah Gerstenberg <me@joahg.com>
wesbillman
added a commit
that referenced
this pull request
Aug 5, 2026
## Summary - admit relay-discovered agents to autocomplete when their response policy authorizes the viewer - require authorization in the exact active stream/forum channel for mentions, while keeping community-wide discovery for member invitation - fail closed for relay-only agents in DMs and unresolved composer contexts - re-authorize cached autocomplete rows after policy/channel changes so stale agent suggestions cannot leak back in - preserve managed-agent behavior and explicitly reject stale agent-marked channel members absent from both live directories ## Validation - `pnpm --dir desktop test` — 4,288 passed - `pnpm --dir desktop typecheck` - `pnpm --dir desktop check` - `pnpm --dir desktop build:e2e` - focused Playwright mention matrix — 12 passed - focused Playwright member-invitation matrix — 2 passed - pre-push hooks after rebase to current `origin/main` — desktop check and 4,288 tests passed - independent correctness/privacy re-review cleared with no remaining blocker ## Related competing PRs This supersedes or overlaps #2333, #3056, #4242, #4137, #2314, #4058, and #2605. This version adds exact-channel authorization, fail-closed DM/context handling, cached-row reauthorization, forum coverage, outbound mention-tag coverage, explicit stale-member coverage, and add-member discovery coverage. Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Member
Author
|
🤖 Closing as part of Joah's pre-OOO PR triage — stale. Happy to reopen if this is still needed. |
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.
Summary
respondTo: anyoneProblem
useMentionsrejected every agent identity that was not in the current user's locally managed-agent set before applying the existing mention visibility and invocability policy.That removed cross-owner channel bots from autocomplete even when they were shared with the user and configured to respond to anyone. Because the candidate never entered the mention map, message sending received no recipient pubkey and emitted no corresponding
ptag.Fix
Move the complete mention candidate decision behind a tested admission helper that applies:
The ownership-only helper remains unchanged for add-member search, where that restriction is intentional.
Testing
cd desktop && pnpm checkcd desktop && pnpm test— 3,631 passedcd desktop && pnpm typecheckcd desktop && pnpm buildThe regression test covers a channel bot owned by another user, with no locally managed identity and
respondTo: anyone, at the candidate-admission seam used byuseMentions.