Persist agent audiences with native inline mentions - #1949
Conversation
wesbillman
left a comment
There was a problem hiding this comment.
The persistent-audience product direction looks useful as an opt-in: identity/channel/thread scoping, native mention tags as the routing source, manual-deletion reconciliation, and the generation/revision guards are good safety properties.
One blocking behavior issue remains: Send without inviting removes non-members only from mentionPubkeys, while completeSend later promotes the unchanged draft.explicitAgentPubkeys. For a non-member agent, the send therefore excludes that agent but still persists it; the next composer hydration re-adds it and presents the same invite choice again. This contradicts the user's explicit decision not to route to/invite that recipient. Please filter persistent-audience promotion to the agent pubkeys that remain effective for this completed send, and cover this path with a regression test.
This head is also currently 5 commits behind main, GitHub reports merge conflicts (including useMentions.ts and playwright.config.ts), and only DCO/Semgrep/zizmor ran. Please rebase, resolve the overlap, and obtain fresh full desktop CI before approval.
Co-authored-by: npub1n4y9luxx9y27pz5qz93vr9w8auyk7mmpgwf9gpe9tn4zv4kyhzjqtcntu7 <9d485ff0c62915e08a801162c195c7ef096f6f6143925407255cea2656c4b8a4@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1n4y9luxx9y27pz5qz93vr9w8auyk7mmpgwf9gpe9tn4zv4kyhzjqtcntu7 <9d485ff0c62915e08a801162c195c7ef096f6f6143925407255cea2656c4b8a4@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1n4y9luxx9y27pz5qz93vr9w8auyk7mmpgwf9gpe9tn4zv4kyhzjqtcntu7 <9d485ff0c62915e08a801162c195c7ef096f6f6143925407255cea2656c4b8a4@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1n4y9luxx9y27pz5qz93vr9w8auyk7mmpgwf9gpe9tn4zv4kyhzjqtcntu7 <9d485ff0c62915e08a801162c195c7ef096f6f6143925407255cea2656c4b8a4@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
8973f2d to
8a2cd67
Compare
|
Addressed the blocking review and rebased onto current
Focused validation passed: 14 audience/send tests, TypeScript typecheck, Biome, and diff checks. GitHub now reports the PR mergeable and fresh full CI is queued. |
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
|
Fixed the Desktop Core failure in Local validation: |
wesbillman
left a comment
There was a problem hiding this comment.
Re-reviewed the latest head. The blocking Send without inviting issue is fixed by intersecting explicitly authored agents with the effective mention recipients before promotion, with focused regression coverage. The authored-order behavior remains intact, the branch is mergeable, and full desktop CI is green. I found no remaining behavior blocker.
…vider * origin/main: fix(desktop): preserve relaunch through mesh shutdown (#1966) Persist agent audiences with native inline mentions (#1949) chore(release): release Buzz Desktop version 0.4.8 (#1973) fix(desktop): restore default community join option (#1969) chore(release): release Buzz Mobile version 0.4.5 (#1965)
…adata * origin/main: fix(join-policy): require legal consent on hosted invites (#1987) [codex] Prevent actor-tag UI impersonation (#1931) chore(release): release Buzz Desktop version 0.4.9 (#1986) Restyle onboarding: branded landing screen, yellow/gradient backgrounds, new starter avatars (#1982) feat(acp): retry initial relay connection with terminal/transient error classification (#1922) feat(mobile): add external release signing mode for central APK Signer pipelines (#1972) Guide CLI installation and subscription sign-in (#1980) Scope relay runtime state by community (#1658) unify channel add + search into one entry point (#1964) Apply optional relay join policy across join flows (#1894) fix(desktop): preserve relaunch through mesh shutdown (#1966) Persist agent audiences with native inline mentions (#1949)
…ock#3146) The @channel feed branch aliased `n.event_created_at` into the select list while the p-tag branch aliased `m.event_created_at`, so `UNION` compared a column that two independent denormalized indexes have to keep byte-identical for the dedupe to hold. Both branches now project exactly `EVENT_COLS` and the outer query orders on the event's own `created_at`, so an event that is both p-tagged and `@channel` collapses to one row by construction. Also drops the word "audience" from the NIP-CM comments and doc text — it is reserved for the persistent agent audience work (block#1949). Refs block#3146 Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Claude Code <noreply@anthropic.com> Ai-assisted: true Signed-off-by: LordMelkor <kray@squareup.com>
) The relay accepts a `["notify", mode]` tag on a kind-40003 edit for render continuity (NIP-CM D9), but `applyEditTagOverlay` only overlaid `imeta` and `emoji`, so the tag never reached the effective tag set the renderer reads. An edit that added `@channel` to the body rendered it as plain text. `notify` now gets the same supplied-wins/preserve-on-empty semantics as `emoji`: an edit that supplies one replaces the original's (preserving the at-most-one-notify invariant), an edit that supplies none keeps the original's so a client that doesn't emit notify tags can't strip a chip the original rendered fine. This cannot escalate a notification — the unread, badge, and OS-notification paths read the raw live/feed event, never the overlay, and the relay writes no channel_notifications row for kind 40003. In the removal direction the preserved tag is inert: the chip needs the token in the edited body, which is gone. Also rewords the one branch-introduced use of the word "audience" in a `channelNotify.ts` comment (D16 — the term is reserved for the persistent agent audience vocabulary in block#1949). Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Claude Code <noreply@anthropic.com> Ai-assisted: true Co-authored-by: Codex <noreply@openai.com> Signed-off-by: LordMelkor <kray@squareup.com>
Summary
Behavior
When enabled, agents explicitly included in a successful thread send remain as native inline mentions for the next message in that thread. Switching threads restores that thread's own audience. Timeline sends remain one-shot. Ordinary mention-tag routing is unchanged.
Screenshots
Light
Dark
Narrow
Validation
Notes
The local aggregate pre-push hook ran 2,977 desktop tests; 2 source-contract assertions failed because they still expected the removed timeline audience context and the old thread type guard. Those assertions were updated to the intended thread-only contract and the branch was then pushed after the focused behavioral suite, unit tests, build, typecheck, formatting, and file-size guard passed. The mobile hook lane could not run because
dartis unavailable in this worktree environment.