Files
buzz/desktop
Logan Johnson 65e814f728 fix(desktop): keep your draft editable when an @ mention cannot be sent (#7190)
🤖
## Summary
Fixes four ways the composer could lose your text or cursor while
working with @ mentions:

- **A failed send no longer wipes your draft.** If mention preparation
fails while sending (for example, a failed upload), the draft stays as
typed, the error is shown, and you can send again.
- **A closing menu can no longer steal your cursor.** A still-animating
⋯ menu can no longer grab a late pointer event and steal focus from the
composer; Escape still refocuses its trigger.
- **Delayed automatic mentions no longer overwrite your typing.** The
per-agent "Automatically mention … in this conversation" toggle re-adds
the label to your next draft, but only if that draft is untouched — any
draft edit or channel switch cancels the re-add.
- **Regenerated automatic mention labels leave no residue.** After a
regeneration (for example, an agent rename), the current label is the
one later updated or removed — no duplicated or leftover text.

Part of the mention-editor stack: #7190 → #7191 → #7192 (review in
order); stands on its base branch alone.

### Related issue
Continues the merged mention-editor work from #7124 and #7128. No
separate tracking issue for this slice.

### Testing
- Unit tests cover each fix: draft retention on failed sends, re-add
revocation on draft edits or channel switches, and regenerated-label
ownership.
- Browser specs cover the closing-menu focus case, failed sends, and an
always-mention agent surviving save, reopen, and publication.
- All PR checks pass on this head.

---------

Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
2026-09-11 12:51:23 -04:00
..
…

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition