Repository navigation
Closed
Labels
area:socialFriends, invites, grants, Bot SocialFriends, invites, grants, Bot Socialarea:uiWeb/desktop UI and copyWeb/desktop UI and copybugSomething isn't workingSomething isn't workingself-testFiled by the product self-test routine (issues only)Filed by the product self-test routine (issues only)
Description
Summary
On the home that shared a Bot (A), a friend's conversation is close to invisible: B's lines land inside A's own Chief chat between A's own messages, with no unread count or badge; the very first line took about 25 s and only showed after a page reload; and nothing on A (or B) lists the friendship except Chief → Sharing → People with access. The local API agrees: social/overview returns no friends on either home, although the per-Bot friendship is active.
Environment
- FlyBot main
a7f51e83ffacc4a6e803669d25fdc9e40eef6c44(Add friend: accept and invite as two labelled groups, Done at the bottom #416), core + plugins/social + plugins/tree on@deepseek-ai/dsh@0.2.0-rc.2, Node 24.21.0. - Two fresh installs on one Linux box: A
:3090(owner SelfA1238,@selfa1238.home) and B:3091(owner SelfB1238,@selfb1238.home). Bot Social prodhttps://47-80-69-220.sslip.io. Both Chiefs onark/deepseek-v4-flash(real model). - Friend link: A made a per-Bot invite for A's Chief; B joined it, talking through B's Chief (relationship
rel_01M597ETM4MFYM90M80ER53J8G, grantgrt_01M597ETM5PK3PNKGZ09R7PC96→@selfb1238.home). B's Chief is not shared back (one-way per-Bot grant, by design Per-Bot grants leak: accepting a Helper invite exposes the joiner's Chief; face-room Chief shows in Friends' Bots; Manage access wrong/raw #138/Regression of #138: joining a friend's invite still puts the joiner's Chief on the inviter's main list #161). A's Chief =@chief.selfa1238.home, B's talk-through Bot =@chief.selfb1238.home. - Auto-send was off on both homes at the start.
- Found by product self-test 2026-10-19 12:38 Asia/Shanghai, focus A Friend DM (browser run about 12:41–12:50 Asia/Shanghai). Screenshots stayed on the test machine; what they show is written out below.
Common setup (B talks to A's Chief)
On B, open the sidebar row for A's Chief (Chief + grey SelfA1238 + globe) and send, one at a time, waiting for each answer:
Hi Chief, this is B. What is 2+2? Reply in one short line.→ A's Chief drafts4.; on A click Reject.Second test: what is 3+3? One line.→ draft6.; on A click Approve.Third test: what is 4+4? One line.→ draft8.; on A click Always approve.Fourth test: 5+5? One line.andFifth test: 6+6? One line.→10.and12.go out without a card.
Repro
- On A, open A's own Chief chat and leave it open.
- On B, send the first line of the common setup to A's Chief. Time how long until it shows on A, without touching A.
- Look at A's sidebar (Chief row, Social region) while the line arrives and after.
- Send the next lines from B and watch A again.
- Read-only API on both homes:
flybot/social/overview,flybot/social/friends,flybot/social/remote-bots(POST /api/botwith{"endpoint": …}).
Actual
- First line: did not appear on A for about 25 s; it showed only after reloading A's tab. Lines 2–5 appeared live.
- Where it lands: in A's own Chief chat, under A's own earlier messages (Chief's intro), as a grey bubble with a small
SelfB1238label and a generic grey person icon. Screenshot06-A-second-card-before-approve.png: A's Chief chat, intro bubble, thenSelfB1238lines mixed with Chief's replies. There is no header, chip or divider that says "this is SelfB1238 talking to your Chief through Bot Social" beyond the tiny name label. - No unread/badge: the Chief row on A never showed an unread count or badge for B's lines; only the preview text changed. (Not separately tested with A sitting in another chat; the row looked the same throughout.)
- Friendship invisible: the sidebar Social region is empty on both A and B; there is no list of friends anywhere. The only trace on A is People with access
SelfB1238 (@selfb1238.home)under Chief → Sharing (shot10-A-sharing-no-autosend-control.png). B sees A's Chief in the main list (that part matches the design). - API:
social/overviewon A and on B →{"home":"@selfa1238.home"|"@selfb1238.home","friends":[],"incoming":[],"outgoing":[]}.social/friendson B → A's Chief (@chief.selfa1238.home, grantgrt_01M597ETM5PK3PNKGZ09R7PC96); on A →[].
Why (code read on a7f51e8; hunches)
friendsOverview(plugins/social/src/social.jsL1649–1657) callslist_friendswithhomeArgs()only, i.e. the home identity. Per-Bot invites hang the relationship on member identities (@chief.selfa1238.home↔@chief.selfb1238.home);setAutoAccept(~L2155–2160) already says so and asks every identity. Sooverviewmisses every per-Bot friendship, and itsincoming/outgoingwould miss per-Bot requests too (the Add friend panel reads them,plugins/social/client.jsL1440/L1512).- Unread: friend lines are posted into the Bot's own session (social.md invariant 8, A friend Bot's reply to a typed DM is held on its owner and no approval card ever shows (overlay hook crash, no in-chat card for the replying Bot) #254/Friend DM: a shared Bot's reply to the grantee is silently denied (grantee's Bot not shared back), never held or delivered #272), which is the user's own chat, so the normal "new message from my Bot" logic does not treat them as unread.
- First-line delay: inbox poll is
inboxPollMs15 s (social.md L149); the extra wait plus needing a reload suggests the open client does not pick up the first inbound turn on that session. Not verified.
Expected (simplicity, usability)
- A friend's line arrives live (within one poll, no reload) and the receiving Bot's sidebar row gets an unread badge until the chat is seen.
- In the chat, a friend's line is clearly from that person (their name per Friend's Bot rows: two name formats ('Helper · SelfB0023's Bot' vs 'SelfA0023's Chief'), two-line wrap, no preview, inset highlight, faint marker, same avatar as own Chief #384 style, a person avatar, and on first contact a quiet line like
SelfB1238 is talking to Chief through Bot Social). social/overviewlists active per-Bot friendships (and per-Bot pending requests) on both homes, consistent withsocial/friendsand People with access.- Design question for the maintainer (do not guess): should a grantee's conversation stay mixed into the Bot's own chat, or get its own thread under that Bot (
Chief · SelfB1238)? And should a friend with no Bots shared to me appear once in the list as the person (suggested in Accepting an invite briefly publishes the joiner's (unshared) Bot on the inviter's home: dead 'no longer shared with you' chat opens on load; friend invisible in Social #303)? If the answer is "no", the empty Social region is fine and only the badge/live delivery parts apply.
Suggested scope / files
plugins/social/src/social.jsfriendsOverview(ask the home and every member identity, dedupe byrelationship_id, likesetAutoAccept).- Unread/badge for inbound friend turns: core sidebar unread (
core/src/client/sidebar.js,core/src/client/sources.js) and the inbound posting path (pollOnceinplugins/social/src/social.js,core/src/host/remote-chat.js). - Live first delivery: the inbound delivery → client feed path (
core/src/host/flybot-feed.js). - Tests: overview with a per-Bot relationship returns the friend; inbound friend line marks the row unread.
Acceptance criteria
- First friend line shows on A within one poll without reload.
- A's Chief row shows an unread badge for a friend's line while A is elsewhere; it clears once seen.
-
social/overviewon A and B lists the A↔B per-Bot friendship. - Maintainer decision recorded on thread vs mixed chat; implemented accordingly.
Related: #275 (NEW divider on this same line), #272, #254, #303 (closed), #261, #349.
Metadata
Metadata
Assignees
Labels
area:socialFriends, invites, grants, Bot SocialFriends, invites, grants, Bot Socialarea:uiWeb/desktop UI and copyWeb/desktop UI and copybugSomething isn't workingSomething isn't workingself-testFiled by the product self-test routine (issues only)Filed by the product self-test routine (issues only)
Activity
Birfy commentedon Oct 19, 2026
Owner-delegated decision (2026-10-19) on the design question: keep the current design. A grantee's lines stay in the Bot's own chat (social.md invariant 8, #254/#272), no separate thread per person, and a friend with no Bots shared to me does not get a row in the list (one list, no separate Friends section). Changing either would be a product decision for the owner, not part of this issue.
Triage on main
a7f51e8: with that, spec clear; ready to develop: live first delivery without reload, an unread badge on the receiving Bot's row until seen (shares the 'seen' logic with #275),social/overviewlists per-Bot friendships and per-Bot pending requests, and a quiet first-contact lineSelfB1238 is talking to Chief through Bot Social.Birfy commentedon Oct 19, 2026
Claimed by the maintenance routine (2026-10-19 16:54 Asia/Shanghai): working on branch
Birfy:fix/420-friend-line-unread.Birfy commentedon Oct 19, 2026
Development (2026-10-19 17:08 Asia/Shanghai), PR #432. Minor details I decided while building it:
friendLineAt) compared with the last stamp this browser showed, not by the browser clock. The Main Bot tile now shows the same blue dot (before, a tile showed no unread mark at all).<person> is talking to <Bot> through Bot Socialfor a typed line,<Bot (owner)> is talking to …for a Bot's line. "First" means once per sender handle per Bot. On upgrade, a friend who wrote before this change gets the line once on their next message.botId,botName). Pending per-Bot requests are included. No new UI section (one list, per the owner decision).Mark a Bot unread for a friend's line, say who is talking on first co…
Deny a send to a friend removed since the roster was cached (ThinkFlo…