Skip to content

Remote friend Bot mention from the "@" menu renders as a raw handle, not a Bot mention (bubble + sidebar preview) #71

Closed

Description

@hsliuustc0106

Part of #5 (@flybot/social); display side of the #9 umbrella (display names).

Environment

  • macOS arm64, FlyBot core + @flybot/social from ThinkFlowLab/FlyBot#main (a48fd86), dsh web UI.
  • A group chat (You, Chief, 代码审查官, FlyBot Manager) whose members include the Friends' remote Bot 代码审查官 (@bot-2a758c0f.danyang.home, home danyang.home).

Steps to reproduce

  1. In the group chat, type @ and pick the remote Bot from the menu (its row shows "代码审查官 (bot-2a758c0f.danyang.home) · Remote · danyang.home").
  2. Finish the message, e.g. 你是?, and send.
  3. Look at the group's row in the sidebar, and at the sent bubble.

Actual

Picking a remote Bot inserts its raw handle as text (remoteMentionRows inserts @<handle> ), so the stored message is:

@bot-2a758c0f.danyang.home 你是?

  • The sidebar conversation preview shows that raw address: @bot-2a758c0f.danyang.home 你是? (see screenshot).
  • In the chat bubble the handle is not a Bot mention: the client mention rule matches display names only (shared/mentions.js), and remote Bots are not in the roster's bot list (mentionableBots maps room members through roster.byId). So the handle falls through to DSH's generic user-text rendering — which, per the comment at the top of user-message.js, draws every @word as a file reference. Team Bot mentions in the same chat (@代码审查官, @FlyBot Manager — the first two bubbles in the screenshot) render as avatar + name chips; the remote one renders as a file-like address.

Delivery itself works: the host's sendUserMentions recognizes @<handle> and sends it through bot.send (social approval still applies), so this is display-only.

Expected

  • The bubble renders the remote mention like any Bot mention: avatar + display name (代码审查官), clickable to that Bot's remote chat.
  • The sidebar preview shows a readable mention (@代码审查官 你是?), not the endpoint address.

Where it sits (for discussion, not prescriptive)

  • core/src/client/flybot-registry.js remoteMentionRows — inserts @handle .
  • core/src/client/at-menu.js mentionRows — merges those rows into every chat's @ menu.
  • core/src/client/user-message.js userTextParts — chips only display-name matches; handles fall through to DSH's file-reference rendering.
  • core/src/client/text.js previewOf — preview shows the stored text as-is.
  • core/src/host/hooks.js sendUserMentions — already matches the handle form (name = handle without @), which is what keeps delivery working.

The display name would need to come from the local remote-members record (roster.remoteBots), never from message text, so the display-name trust rule in #9 stays intact.

Screenshot

Group chat with a remote friend Bot mention: the sidebar preview shows the raw handle @bot-2a758c0f.danyang.home

Activity

  1. hsliuustc0106 commented on Oct 15, 2026

    @hsliuustc0106
    CollaboratorAuthor

    Implemented on fix-71-remote-mention-render (tip d1d64c1, based on a48fd86).

    Ran at d1d64c1: new tests red on the unbroken tip, then npm test 612/612, build-client --check, npm run lint (0 errors; the 20 warnings pre-exist on main), ds-bot-patches generate+check (9 patches apply cleanly, core == ds-bot + patches). Not run: smoke (no index.js/src/host/ change), Desktop app, real-model turns. Reviewer note: a fresh worktree needs core/dev/harness/node_modules (or DSH_HARNESS) for npm test — the git fallback resolves to a repo-root harness checkout that is missing packages and fails at-menu/time-context there.

  2. added 2 commits that reference this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions