You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote friend Bot mention from the "@" menu renders as a raw handle, not a Bot mention (bubble + sidebar preview) #71
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
In the group chat, type @ and pick the remote Bot from the menu (its row shows "代码审查官 (bot-2a758c0f.danyang.home) · Remote · danyang.home").
Finish the message, e.g. 你是?, and send.
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.
core/src/client/at-menu.jsmentionRows — merges those rows into every chat's @ menu.
core/src/client/user-message.jsuserTextParts — chips only display-name matches; handles fall through to DSH's file-reference rendering.
core/src/client/text.jspreviewOf — preview shows the stored text as-is.
core/src/host/hooks.jssendUserMentions — 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.
The bubble chips a friend Bot's handle like a name mention — avatar + display name from the roster, click opens its remote chat (user-message.js matches the handle as a second name of the same Bot). The shared calling rule (shared/mentions.js) and the wire form the host matches are unchanged.
Sidebar previews (both the host's room.preview and previewOf) rewrite known handles via nameMentions (text.js), from the local roster only.
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.
Activity
hsliuustc0106 commentedon Oct 15, 2026
Implemented on fix-71-remote-mention-render (tip
d1d64c1, based ona48fd86).user-message.jsmatches the handle as a second name of the same Bot). The shared calling rule (shared/mentions.js) and the wire form the host matches are unchanged.room.previewandpreviewOf) rewrite known handles vianameMentions(text.js), from the local roster only.roster.bots[].remote/roster.remoteBotsrecords, never from message text (Security: untrusted-content fence escape and unsanitized remote display names (PR #2 review) #9).user-message.jsandmention-rule.test.jsjoined patch topic0003-flybot-api-client; ds-bot-core invariant Social: inbound delivery loses, duplicates or cannot reply to remote messages (PR #2 review) #8 added.Ran at
d1d64c1: new tests red on the unbroken tip, thennpm test612/612,build-client --check,npm run lint(0 errors; the 20 warnings pre-exist onmain),ds-bot-patches generate+check(9 patches apply cleanly, core == ds-bot + patches). Not run: smoke (noindex.js/src/host/change), Desktop app, real-model turns. Reviewer note: a fresh worktree needscore/dev/harness/node_modules(orDSH_HARNESS) fornpm test— the git fallback resolves to a repo-root harness checkout that is missing packages and failsat-menu/time-contextthere.nameMentions: rewrite all handles in one pass (#71)
Merge pull request #74 from ThinkFlowLab/fix-71-remote-mention-render
Render a remote mention's handle as the Bot display name (ThinkFlowLa…
Name a friend Bot mention by its one name (ThinkFlowLab#967) (ThinkFl…