Skip to content

Friend's first line and its approval card don't arrive live on the sharing home; need a reload (regression of #420) #497

Closed

Description

@Birfy

Summary

On the home whose Bot a friend is talking to (A), a friend's first line still does not arrive live. B sent hi from B to A's Chief, and for 8 s or more nothing changed on A: no row update, no line in the chat, no approval card. Only after a page reload did A show the Inbox badge 1, the line, the drafted reply and the Waiting for approval card. #420 fixed exactly this ("First friend line shows on A within one poll without reload", closed 2026-10-19 by #432), so this is a regression of #420.

Environment

  • FlyBot main a7adfe0882d3e37c81616871e24b442bd4a5047f, 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 SelfA1233, @selfa1233.home, one Bot: Chief = @chief.selfa1233.home) and B :3091 (owner SelfB1233, @selfb1233.home, one Bot: Chief = @chief.selfb1233.home). Bot Social prod https://47-80-69-220.sslip.io. Both Chiefs on ark/deepseek-v4-flash.
  • Product self-test 2026-10-20, focus C (Invites and grants), browser run 12:37–12:42 Asia/Shanghai, API checks about 12:45 Asia/Shanghai. Screenshots stayed on the test machine; what they show is written out below.

Reproduction

  1. Setup: A shared Chief with B (A: + New… > Add friend > Copy invite link for Chief; B: Add friend, paste, Accept invite). Auto-send is off (the default).
  2. Open A in one tab on A's Chief chat (or anywhere in A), and B in another tab.
  3. On B, open Chief SelfA1233 and send hi from B (about 12:39 Asia/Shanghai).
  4. Watch A without reloading for 8 s or more. Nothing changes: A's Chief row has no preview update and no unread mark, the Inbox count does not change, and the open chat shows no new line.
  5. Reload A. Now the Inbox badge shows 1. A's Chief chat shows SelfB1233 is talking to Chief through Bot Social, then SelfB1233 via Chief: hi from B, then the drafted reply Hey B! 👋 Good to hear from you. What's up?, then the card Waiting for approval / Chief → Chief (SelfB1233) with Auto-send from now on, Approve and Reject.

Screenshot (A after reload): The sidebar shows Inbox with a blue 1, A's Chief row selected (preview Hey! I'm your Main Bot —…), and Chief SelfB1233 / Friend's Bot below it. The chat shows A's own onboarding message from Chief, then the grey line SelfB1233 is talking to Chief through Bot Social, B's line, the draft reply and the approval card. Before the reload none of this was visible.

Actual vs expected

Note: friend's lines inside A's own Chief chat (not asked to change)

B's conversation is mixed into A's own chat with Chief, right after A's onboarding. The self-test flagged this as confusing again. It matches the owner-delegated decision recorded on #420 (2026-10-19): a grantee's lines stay in the Bot's own chat, with no per-person thread (social.md invariant 8, #254/#272). Leave it as is unless the owner reopens that decision.

Suggested scope

  • Find what changed since Mark a Bot unread for a friend's line, say who is talking on first contact, and list per-Bot friendships #432 on the inbound path: pollOnce in plugins/social/src/social.js (event cursor and seen, see the cursors entry in flybot-social-settings.json) → core/src/host/remote-chat.js → core/src/host/flybot-feed.js → client feed. Hunch: the inbound line and the approval are written to the host state, but no feed or revision event is pushed to an open client, so only a full reload (state) shows them.
  • Add or restore a test that an inbound friend line, and the held reply's approval, cause a client feed event without a fresh state call.

Acceptance criteria

Related: #420 (regressed), #432, #275, #261.

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 20, 2026
  2. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Triage (2026-10-20 12:57 Asia/Shanghai, Birfy maintenance): confirmed regression of #420 (fixed by #432). Scope as written: find what broke live delivery of an inbound friend line and its held-reply approval card on the sharing home, restore the live feed event (no reload), the Inbox count and the unread badge, and add a regression test that a first inbound line and its approval reach an open client without a fresh state call. The note about the friend's lines staying in A's own Chief chat stays as decided on #420.

    Waiting for the owner's confirmation before agent-ready (needs-human).

  3. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 20, 2026
  4. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Owner decision (2026-10-20): option (a) — restore live push for friend first message, approval cards, inbox count and unread badges; add regression tests.

  5. 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)
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 20, 2026
  6. self-assigned this
    on Oct 20, 2026
  7. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Claimed by maintenance run (2026-10-20 13:54 Asia/Shanghai). Working on branch fix/497-live-friend-line (fork Birfy/FlyBot), developed in parallel with #495-#499; scope per the Owner decision only.

  8. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Development (2026-10-20 14:24 Asia/Shanghai), PR #505. Root cause and the minor details I decided:

    • Root cause. Nothing on the live path regressed. On a two-home bench at main a7adfe0 (local Bot Social, mock model, browser on A's Chief chat), the first line, the Waiting for approval card, the Inbox count and the badge all appear without a reload, just late. The social plugin reads Bot Social only on its 15 s idle inbox poll, and the card then waits for the model. The self-test's own logs show it: B sent at 12:39:26, A got the line at 12:39:34 and the card at 12:39:41. Mark a Bot unread for a friend's line, say who is talking on first contact, and list per-Bot friendships #432 never fixed this criterion (its PR said so).
    • Fix. While a FlyBot window is on screen, the inbox is read at the live cadence (facePollMs, 4 s, the same cadence face rooms already use). "On screen" means a visible window polled the team in the last 8 s. A hidden tab does not count. With no window open, polling stays at 15 s, so Bot Social sees the faster reads only while someone watches.
    • Measured. Line visible in A's open chat: main 7.7–12.5 s, branch 1.3–3.1 s (5 lines each).
    • No Bot Social change. Push (a webhook or a long poll) would need one, and a home on a laptop cannot take webhooks anyway.
    • The card still waits for the Bot's reply (model time). That part is not polling.
  9. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 20, 2026
  10. removed their assignment
    on Oct 20, 2026
  11. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Cleanup 2026-10-20 14:54 Asia/Shanghai: PR merged; removed agent-working / assignee.

  12. added a commit that references this issue on Oct 20, 2026
    303c0d6
  13. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 21, 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

    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