fix(mentions): coalesce persona definitions with running instances - #4107
Open
iroiro147 wants to merge 1 commit into
Open
fix(mentions): coalesce persona definitions with running instances#4107iroiro147 wants to merge 1 commit into
iroiro147 wants to merge 1 commit into
Conversation
Issue block#3947: The mention picker was showing persona-definition rows ('managed by you · not in channel') while omitting the actual running channel-member instances of those personas. Root cause: - Persona candidates were only filtered by managedAgentPersonaIds (personas linked to managed agent definitions) - Running instances with personaId set (from members or relayAgents) were not tracked or used for filtering - This caused orphaned persona definitions to appear while the actual running instances were omitted Fix: - Add instancePersonaIds to track personas that have running instances - Filter persona candidates to exclude personas with running instances - This ensures only persona definitions without any instance are shown as mintable candidates, while actual running instances are offered The mention picker now correctly shows running channel-member instances and excludes persona definitions that are already deployed as instances. Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
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
Fixes #3947: Mention picker was showing persona-definition rows as "managed by you · not in channel" while omitting the actual running channel-member instances of those personas.
Root Cause
The mention candidate assembly had two issues:
managedAgentPersonaIds(personas linked to managed agent definitions), but running instances withpersonaIdset (from channel members or relay agents) were not tracked separately.Fix
Added
instancePersonaIdsto track personas that have running instances (from channel members, relay agents, or managed agents with pubkeys). Persona candidates are now filtered to exclude any persona that has a running instance, ensuring:Changes
useMentions.ts: AddedinstancePersonaIdstracking set + updated persona candidate filter to check bothmanagedAgentPersonaIdsandinstancePersonaIdsTesting
tsc --noEmit)pnpm build:e2e)