Skip to content

Friend's line on the sharing home: lands unmarked in the Bot's own chat with no unread badge, first line needs a reload; social/overview lists no per-Bot friendships #420

Closed

Description

@Birfy

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

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:

  1. Hi Chief, this is B. What is 2+2? Reply in one short line. → A's Chief drafts 4.; on A click Reject.
  2. Second test: what is 3+3? One line. → draft 6.; on A click Approve.
  3. Third test: what is 4+4? One line. → draft 8.; on A click Always approve.
  4. Fourth test: 5+5? One line. and Fifth test: 6+6? One line. → 10. and 12. go out without a card.

Repro

  1. On A, open A's own Chief chat and leave it open.
  2. 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.
  3. Look at A's sidebar (Chief row, Social region) while the line arrives and after.
  4. Send the next lines from B and watch A again.
  5. Read-only API on both homes: flybot/social/overview, flybot/social/friends, flybot/social/remote-bots (POST /api/bot with {"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 SelfB1238 label and a generic grey person icon. Screenshot 06-A-second-card-before-approve.png: A's Chief chat, intro bubble, then SelfB1238 lines 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 (shot 10-A-sharing-no-autosend-control.png). B sees A's Chief in the main list (that part matches the design).
  • API: social/overview on A and on B → {"home":"@selfa1238.home"|"@selfb1238.home","friends":[],"incoming":[],"outgoing":[]}. social/friends on B → A's Chief (@chief.selfa1238.home, grant grt_01M597ETM5PK3PNKGZ09R7PC96); on A → [].

Why (code read on a7f51e8; hunches)

Expected (simplicity, usability)

Suggested scope / files

  • plugins/social/src/social.js friendsOverview (ask the home and every member identity, dedupe by relationship_id, like setAutoAccept).
  • Unread/badge for inbound friend turns: core sidebar unread (core/src/client/sidebar.js, core/src/client/sources.js) and the inbound posting path (pollOnce in plugins/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/overview on 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.

Activity

  1. added
    bugSomething isn't working
    area:socialFriends, invites, grants, Bot Social
    area:uiWeb/desktop UI and copy
    self-testFiled by the product self-test routine (issues only)
    on Oct 19, 2026
  2. Birfy commented on Oct 19, 2026

    @Birfy
    CollaboratorAuthor

    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/overview lists per-Bot friendships and per-Bot pending requests, and a quiet first-contact line SelfB1238 is talking to Chief through Bot Social.

  3. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 19, 2026
  4. self-assigned this
    on Oct 19, 2026
  5. Birfy commented on Oct 19, 2026

    @Birfy
    CollaboratorAuthor

    Claimed by the maintenance routine (2026-10-19 16:54 Asia/Shanghai): working on branch Birfy:fix/420-friend-line-unread.

  6. Birfy commented on Oct 19, 2026

    @Birfy
    CollaboratorAuthor

    Development (2026-10-19 17:08 Asia/Shanghai), PR #432. Minor details I decided while building it:

    • Unread: a friend's line in a Bot's own chat marks that Bot unread the same way Mark as Unread does, when the chat is not open. The dot stays until the chat is opened, and it also appears for lines that came while FlyBot was closed. It is driven by a host stamp (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).
    • First contact: one muted line above a sender's first line in that Bot's chat: <person> is talking to <Bot> through Bot Social for 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.
    • social/overview: it asks the home and every member identity and lists each relationship once. A row found through a member names the local Bot (botId, botName). Pending per-Bot requests are included. No new UI section (one list, per the owner decision).
    • Live first line: I found no FlyBot-side cause in the code, and I could not reproduce it without two live homes. Lines 2 to 5 use the same delivery path and showed live, and the 15 s inbox poll plus the model reply time fits the ~25 s seen. If a self-test still sees "only after reload" on current main, please file it separately with timings.
    • Received friend's typed line: the NEW divider stays after the message was read (header and People with access name fixed in #292) #275 (NEW divider) is not part of this PR. It uses the per-visit clock, which this change does not touch.
  7. added a commit that references this issue on Oct 19, 2026
    1711d59
  8. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:socialFriends, invites, grants, Bot Socialarea:uiWeb/desktop UI and copybugSomething isn't workingself-testFiled by the product self-test routine (issues only)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions