Files
buzz/desktop
Logan Johnson 1a02b3a01d 🤖 fix(desktop): show an agent in @ search after you add it to a channel (#7192)
🤖
## Summary
Makes a newly added agent findable with @ in the channel you added it
to, and makes the welcome flow's new agent mentionable right away.

- **After Add members (or creating a channel), the first @ search finds
the new agent.** Accepting the addition refreshes the member lists
behind @ search immediately, including choosing the exact agent when its
name is ambiguous. Refreshes refetch the authoritative roster only —
nothing is inserted optimistically. (Roster reconciliation wiring lives
in #7191.)
- **The welcome flow's new starter agent is mentionable on the first
try.** The roster refreshes after provisioning; a view remounted
mid-provisioning refetches its own roster and discovers what actually
got created, even when provisioning partially failed. Repeated calls
share one operation, so the team is never double-created.
- **Switching accounts mid-flow can't cross wires.** If you switch
identity while the welcome flow is provisioning, the in-flight work
stays bound to the account that started it; the new account gets its own
fresh attempt instead of joining or reusing the other one's operation.

Part of the mention-editor stack: #7190 → #7191 → this PR (review in
order).

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

### Testing
- New unit tests cover the accepted channel-creation and Add-member
refresh paths, roster reconciliation, and welcome-team admission
outcomes (partial, zero, rejected, full), including the remounted-client
case and identity/relay switches mid-provisioning. Focused welcome
journeys: 12/12; full desktop package: 6,183/6,183.
- Browser tests cover both journeys: add the agent, then the first @
search finds it; and the welcome-flow roster after starter provisioning,
including the exact same-name choice.

### Before / after
Captured on an earlier revision of this change; the behavior is the
same.

Before — creating a channel does not refresh the agent list, so Add
members finds no matching agent:


![before-fresh-add-blocked](https://raw.githubusercontent.com/block/buzz/90dd8f7e1a7a344dc9bad75cf3275d31976d3071/pr-7192--before-fresh-add-blocked.png)

After — Add succeeds and the first `@Fresh` search shows Fresh Scout as
a channel member:


![after-fresh-add](https://raw.githubusercontent.com/block/buzz/90dd8f7e1a7a344dc9bad75cf3275d31976d3071/pr-7192--after-fresh-add.png)

Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
2026-09-30 11:23:06 -04:00
..
2026-03-09 13:02:11 -07:00
…
2026-03-09 13:02:11 -07: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