Skip to content

feat(desktop): show each agent's role in the @-mention selector#2706

Open
webdevtodayjason wants to merge 1 commit into
block:mainfrom
webdevtodayjason:feat/mention-selector-agent-about
Open

feat(desktop): show each agent's role in the @-mention selector#2706
webdevtodayjason wants to merge 1 commit into
block:mainfrom
webdevtodayjason:feat/mention-selector-agent-about

Conversation

@webdevtodayjason

@webdevtodayjason webdevtodayjason commented Jul 24, 2026

Copy link
Copy Markdown

Closes #2699.

Problem

The @-mention selector lists agents by display name + avatar only. In a workspace with several agents that share a visual style (the issue's example: three bee agents — Fizz, Honey, Bumble), the rows are near-indistinguishable at the point of use: nothing says who builds, who writes, who researches.

Approach

Surface each agent's public kind-0 about as a one-line role under its display name in the selector. It renders inside the meta line that already carries the bot icon and the "managed by …" suffix, so row geometry is unchanged — and an empty about renders exactly today's row (bot icon + literal "agent"), the graceful degradation the issue asked for. Humans never get a role line, even when their profile has an about.

Data path (all client-side, no relay changes):

  • The desktop's Tauri profile-summary conversions (users_batch_from_events, user_search_result_from_event) already parsed kind-0 content but dropped about. They now carry it, and the TS layer maps it through UserProfileSummary / UserSearchResult (the field was previously Omit-ed in tauriProfiles.ts).
  • useMentions already batch-resolves owner profiles for the "managed by" label. Agent candidates whose about isn't already known get the same treatment via useUsersBatchQuery — backed by its per-pubkey delta cache — so the role line resolves even for agents who haven't authored anything in the loaded timeline.
  • Suggestion mapping prefers an about resolved at candidate-build time (user-search results carry it inline), else falls back to the profile lookup — mirroring the existing avatarUrl fallback. A multi-line about collapses to a single line; the full text lives in the row's title tooltip.
  • The E2E mock bridge summaries now include about to stay faithful to the Rust response shape.

Known limitation (flagged in the issue): agents don't reliably publish an about today, and the #2534 republish allowlist can strip the field. Affected rows simply degrade to the current name-only presentation — when those land, this UI lights up with no further changes.

Tests

  • Rust: users_batch_carries_about_when_present, user_search_result_carries_about_when_present (present → carried, absent → None).
  • JS unit: 6 new tests on the suggestion mapping — candidate-first precedence, profile-lookup fallback, humans never get a description, multi-line collapse, whitespace-only → null.
  • Playwright: new mention-descriptions-screenshots.spec.ts asserts the role lines, the no-about fallback row, the human row, and that a long about truncates on one line (scrollWidth > clientWidth) with the full text in the tooltip. The existing 50 mentions.spec.ts + team-mentions.spec.ts smoke tests pass unchanged.
  • just ci passes locally. (No relay/db/auth changes, so the integration suite is unaffected.)

Screenshots in the comment below.

Checklist

  • just ci passes (fmt + clippy + unit tests + mobile)
  • New public fields have doc comments
  • No new unwrap() in production code paths
  • No new unsafe blocks

@webdevtodayjason
webdevtodayjason requested a review from a team as a code owner July 24, 2026 11:25
@webdevtodayjason

Copy link
Copy Markdown
Author

Agent role lines

Fizz, Honey, and Bumble each show their kind-0 about as a one-line role next to the bot icon; Buzzy (no about) keeps today's plain "agent" row.

01-agent-role-lines

Long about truncates to one line

A long about stays on a single truncated line (full text in the hover tooltip) and the "managed by" label survives at the end of the row.

02-long-about-truncates

Surface the kind-0 about field as a one-line role/description under
agent rows in the mention autocomplete (block#2699). Carried through the
Tauri profile summary path, resolved via the existing users-batch
delta cache for agents missing from the caller's profile lookup, and
rendered as a truncated single line that degrades to today's plain
"agent" label when about is empty.

Signed-off-by: webdevtodayjason <jason@webdevtoday.com>
@webdevtodayjason
webdevtodayjason force-pushed the feat/mention-selector-agent-about branch from a031120 to dd11fce Compare July 24, 2026 19:28
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.

feat(desktop): show each agent's role/description in the @-mention selector

1 participant