Skip to content

fix(desktop): preserve agent mention separator after send - #5623

Merged
wesbillman merged 2 commits into
mainfrom
tho/agent-mention-caret-post-send
Aug 12, 2026
Merged

fix(desktop): preserve agent mention separator after send#5623
wesbillman merged 2 commits into
mainfrom
tho/agent-mention-caret-post-send

Conversation

@tellaho

@tellaho tellaho commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Typing immediately after sending to a persistently addressed agent now continues after the agent mention instead of corrupting it.

Problem: Post-send restoration passed the persistent @Agent prefix through the Markdown parser, which discarded its trailing separator and left WebKit rendering the caret at the mention boundary.

Solution: Restore the prefix as literal ProseMirror text, preserve the separator, and focus a selection placed at the restored document end. This does not expand or otherwise change the setting’s existing scope: persistent addressed agents remain thread-only.

File changes

desktop/src/features/messages/lib/useRichTextEditor.ts
Adds a focused plain-text restoration helper that preserves trailing whitespace while suppressing authored-update reconciliation.

desktop/src/features/messages/ui/useMentionSendFlow.ts
Routes non-empty post-send persistent audience restoration through the literal-text helper instead of Markdown content loading.

desktop/tests/e2e/persistent-agent-audience.spec.ts
Extends the real Enter-send flow to assert the preserved separator, document-end selection, and immediate typing outside the agent mention.

Reproduction steps

  1. Open a thread with a persistently addressed agent.
  2. Send a message with Enter.
  3. Confirm the composer restores the addressed agent and a trailing space.
  4. Type immediately without clicking the composer.
  5. Confirm the new text appears after the agent mention and the mention remains highlighted.
Screen.Recording.2026-08-11.at.8.49.25.PM.mov

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as ready for review August 12, 2026 04:04
@tellaho
tellaho requested a review from a team as a code owner August 12, 2026 04:04

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by Carl on Wes’s behalf. I traced the editor restoration, send/reconciliation, focus/selection, and mention-registration paths and found no blocking issues. The focused persistent-agent audience E2E suite passes at the reviewed head.

@wesbillman
wesbillman merged commit a8e5c89 into main Aug 12, 2026
26 checks passed
@wesbillman
wesbillman deleted the tho/agent-mention-caret-post-send branch August 12, 2026 17:32
wpfleger96 added a commit that referenced this pull request Aug 12, 2026
Ready-for-review prep for the model-capabilities manifest PR:
- Merge origin/main (15 commits) into the branch. The one changed-in-both
  file, UserProfilePopover.tsx, auto-merged cleanly: main's #5574 extracted
  interaction handlers into useProfileInteractionActions (disjoint region),
  leaving the managedAgent.model label render path untouched, so the
  resolveModelLabel rewire survives with identical semantics.
- Re-point scripts/normative-corpus.json:562 _note from the deleted
  DATABRICKS_V2_OPENAI_CODE_NAMES constant to the manifest mechanism that
  now owns the behavior (boundary-aligned family_tokens + databricks_v2
  concrete-unknown fallback). Doc-only; every expect block byte-identical.

* origin/main:
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)
  Refine channel settings and profile panels (#5574)
  fix(deps): bump webbrowser to 1.2.4 for RUSTSEC-2026-0257 (#5659)
  feat(acp): deliver channel description in prompt [Context] (#4552)
  fix(desktop): launch Databricks OAuth from passive model discovery (#5607)
  chore(release): release Buzz Desktop version 0.5.10 (#5613)
  fix(desktop): remove 0.5.9+ perf regressions, speed up get_channels (#5599)
  perf(desktop): coalesce read state localStorage persistence (#5591)
  fix(relay): stop panicking the ingest worker on reactions to project events (#5294)
  fix(desktop): bound initial timeline retention (#5603)
  fix(relay): log event kind on the HTTP bridge /events line (#5291)
  feat(tracing): add PostgreSQL tracing spans (#3678)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
bradseiler pushed a commit that referenced this pull request Aug 12, 2026
…igration

* origin/main:
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)
  Refine channel settings and profile panels (#5574)
  fix(deps): bump webbrowser to 1.2.4 for RUSTSEC-2026-0257 (#5659)
  feat(acp): deliver channel description in prompt [Context] (#4552)
  fix(desktop): launch Databricks OAuth from passive model discovery (#5607)

Co-authored-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>
Signed-off-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>

# Conflicts:
#	crates/buzz-media/src/lib.rs
#	crates/buzz-media/src/storage.rs
morgmart added a commit that referenced this pull request Aug 13, 2026
…graphy-staging

* origin/main:
  Harden shared agent instruction review (#4220)
  chore(release): release Buzz Desktop version 0.5.11 (#5714)
  feat(acp): report standard adapter usage (#4950)
  fix(mobile): settle hydrated threads on latest reply (#4702)
  perf(desktop): persist channel snapshot hash (#5684)
  fix(agent): raise output limit and allow 3 recoveries (#5475)
  fix(desktop): defer foreground resume work (#5696)
  perf(desktop): coalesce thread-activity localStorage writes (#5693)
  Batch observer-store publications per relay envelope (#5680)
  feat(buzz-acp): idle re-sleep for woken lazy pools (#5682)
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)
  Refine channel settings and profile panels (#5574)
  fix(deps): bump webbrowser to 1.2.4 for RUSTSEC-2026-0257 (#5659)
  feat(acp): deliver channel description in prompt [Context] (#4552)
  fix(desktop): launch Databricks OAuth from passive model discovery (#5607)

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
tlongwell-block pushed a commit that referenced this pull request Aug 13, 2026
…ent-config

* origin/main: (31 commits)
  Harden shared agent instruction review (#4220)
  chore(release): release Buzz Desktop version 0.5.11 (#5714)
  feat(acp): report standard adapter usage (#4950)
  fix(mobile): settle hydrated threads on latest reply (#4702)
  perf(desktop): persist channel snapshot hash (#5684)
  fix(agent): raise output limit and allow 3 recoveries (#5475)
  fix(desktop): defer foreground resume work (#5696)
  perf(desktop): coalesce thread-activity localStorage writes (#5693)
  Batch observer-store publications per relay envelope (#5680)
  feat(buzz-acp): idle re-sleep for woken lazy pools (#5682)
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)
  Refine channel settings and profile panels (#5574)
  fix(deps): bump webbrowser to 1.2.4 for RUSTSEC-2026-0257 (#5659)
  feat(acp): deliver channel description in prompt [Context] (#4552)
  fix(desktop): launch Databricks OAuth from passive model discovery (#5607)
  chore(release): release Buzz Desktop version 0.5.10 (#5613)
  fix(desktop): remove 0.5.9+ perf regressions, speed up get_channels (#5599)
  ...

Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>

# Conflicts:
#	desktop/src-tauri/src/commands/personas/inbound.rs
#	desktop/src-tauri/src/commands/personas/inbound/inbound_tests.rs
wpfleger96 added a commit that referenced this pull request Aug 13, 2026
* origin/main:
  Harden shared agent instruction review (#4220)
  chore(release): release Buzz Desktop version 0.5.11 (#5714)
  feat(acp): report standard adapter usage (#4950)
  fix(mobile): settle hydrated threads on latest reply (#4702)
  perf(desktop): persist channel snapshot hash (#5684)
  fix(agent): raise output limit and allow 3 recoveries (#5475)
  fix(desktop): defer foreground resume work (#5696)
  perf(desktop): coalesce thread-activity localStorage writes (#5693)
  Batch observer-store publications per relay envelope (#5680)
  feat(buzz-acp): idle re-sleep for woken lazy pools (#5682)
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
cameronhotchkies pushed a commit that referenced this pull request Aug 13, 2026
…read-context

* origin/main: (38 commits)
  Add mobile community invites (#5641)
  Harden shared agent instruction review (#4220)
  chore(release): release Buzz Desktop version 0.5.11 (#5714)
  feat(acp): report standard adapter usage (#4950)
  fix(mobile): settle hydrated threads on latest reply (#4702)
  perf(desktop): persist channel snapshot hash (#5684)
  fix(agent): raise output limit and allow 3 recoveries (#5475)
  fix(desktop): defer foreground resume work (#5696)
  perf(desktop): coalesce thread-activity localStorage writes (#5693)
  Batch observer-store publications per relay envelope (#5680)
  feat(buzz-acp): idle re-sleep for woken lazy pools (#5682)
  fix(desktop): preserve agent mention separator after send (#5623)
  fix(link-previews): proxy sent preview media (#5627)
  feat(deletion): add durable whole-community deletion (#4425)
  fix(desktop): preserve live channel timelines (#5662)
  Refine channel settings and profile panels (#5574)
  fix(deps): bump webbrowser to 1.2.4 for RUSTSEC-2026-0257 (#5659)
  feat(acp): deliver channel description in prompt [Context] (#4552)
  fix(desktop): launch Databricks OAuth from passive model discovery (#5607)
  chore(release): release Buzz Desktop version 0.5.10 (#5613)
  ...

Signed-off-by: Lazy Joe <dbd8c9941ba6dafebcef0abc015b65e75d52e7452f2ce483c9c3fd4d180f2504@buzz.block.builderlab.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants