Skip to content

Face-to-face: peer messages take 15-25 s to appear (poll interval 15 s); target ≤10 s #133

Closed

Description

@Birfy

Found in a two-instance UI retest of the social plugin (main e884312; source checked on 649bebe). Follow-up to #124 (closed).

Observed

After the fixes in #124 / #127, a human message from the peer in a face-to-face room still takes about 15-25 s to appear on the other instance.

Expected

Peer messages appear within 10 s (ideally a few seconds while the room is open).

Repro

Two instances in one open face room. Peer sends a message; time until it shows here.

Likely cause (poll interval pinned)

Receiving is pure polling:

  • plugins/social/index.js: inboxPollMs: 15_000 is the default for both timers.
  • plugins/social/src/social.js: pollFaceRooms runs on a setInterval of config.inboxPollMs (15 s). The inbox poll (same 15 s) can also trigger pollFaceRooms() when it sees a face_room.* event, but it runs on its own unsynchronized timer. Worst case is about 15 s + 15 s; typical 15-25 s matches the observation.

Fix idea: poll open face rooms faster (e.g. 3-5 s) while a room is open and the sidebar/chat is visible, keeping 15 s as the idle rate; keep the as handle cache so this doesn't bring back 404 spam (#122). Make the rate configurable via plugin config.

Product note: usability and simplicity are an explicit owner priority for this plugin: few buttons, short copy, short click paths. Please prefer removing or merging UI over adding more.

Activity

  1. Birfy commented on Oct 16, 2026

    @Birfy
    CollaboratorAuthor

    Fixed on main (566f1e6) by #134.

    • While a face-to-face room is live, the plugin polls at facePollMs (default 4000 ms; about 3 s in the open room). It backs off to inboxPollMs (15 s) when idle. armSocialPoll re-arms the timer whenever a room starts or ends. Both are configurable in the plugin config (plugins/social/index.js).
    • The as handle cache is untouched, so the Face-room poll: empty handle norms to "@", GET as=@ 404 spam in web.log #122 404 spam does not return (#122 test still passes).
    • Test: face and inbox polls speed up while a live face room is open in social.test.js.

    Worst case is now about 4 s plus delivery, against the 10 s target. Not changed: the Friends' Bots roster timer stays at 15 s. That is not the message path.

    Closing as completed.

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