Preserve persistent agent audience order#1989
Merged
Merged
Conversation
wesbillman
requested changes
Jul 16, 2026
wesbillman
left a comment
Collaborator
There was a problem hiding this comment.
The first-open audience needs to follow authored document order, not event-tag/profile-alias insertion order. Please also add a regression case where mention tag order differs from text order.
morgmart
force-pushed
the
morgarita/persistent-agent-audience
branch
from
July 16, 2026 21:00
69d5a2d to
00a7a2d
Compare
added 3 commits
July 16, 2026 14:30
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> # Conflicts: # desktop/src/features/messages/ui/useMentionSendFlow.ts # desktop/tests/e2e/persistent-agent-audience.spec.ts
Co-authored-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1d6t84ajeg9skp2609l2k6axgcme8x7g7u7luj352r03hcwreg7lqnxcsex <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@sprout-oss.stage.blox.sqprod.co>
morgmart
force-pushed
the
morgarita/persistent-agent-audience
branch
from
July 16, 2026 21:30
00a7a2d to
bddd3d3
Compare
wesbillman
approved these changes
Jul 16, 2026
michaelneale
added a commit
that referenced
this pull request
Jul 16, 2026
* origin/main: Fix policy receipts for cold-launch invite links (#2005) Preserve persistent agent audience order (#1989) feat(desktop): create channels in sections (#1996) feat(desktop): graduate community rail (#1995) chore(release): release Buzz Desktop version 0.4.10 (#1997) feat(desktop): onboarding step dots, identity/key page restyle, overflow scroll (#1993) chore(desktop): add AppShell.tsx file-size override to unblock main CI (#1992) feat: add invite QR and mobile direct join (#1957)
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
Root cause
The composer hydration effect was being rescheduled from unstable hook-object identities during real edits. At the same time, asynchronous autocomplete and audience reconciliation could treat programmatic mention restoration as authored input. That allowed a later hydration pass to reorder or restore mentions the user had changed.
This keeps the fix local: hydration now follows the actual thread/draft transition, authored document order remains authoritative, and programmatic post-send replacement is installed synchronously before the network send.
Validation
pnpm buildnode --import ./test-loader.mjs --experimental-strip-types --test src/features/messages/lib/persistentAgentAudience.test.mjs src/features/messages/ui/persistentAgentAudienceHosts.test.mjs: 15/15pnpm check:file-sizesLocal hook limitations
buzz-authintegration testsmissing_keyandbad_keyfile_permissionsfail in the local aggregate hook environmentFollow-up to #1949, which merged before these fixes were ready.