Repository navigation
Show a friend's first line and its approval card live: read friends' inboxes fast while a window is on screen - #505
Merged
Conversation
… screen (ThinkFlowLab#497) A friend's first line, its held reply's approval card, the Inbox count and the unread badge reached an open window only on the social plugin's next idle inbox poll (up to 15 s, plus the model's reply time), which read as 'needs a reload'. The client now says when it is on screen (state watching), the host exposes flybot.watched(), and social reads the inbox every facePollMs (4 s) while a window watches. Regression tests for the live first line + approval.
4 tasks
Collaborator
Author
|
Self-review: PASS
|
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…ThinkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Keep ThinkFlowLab#499 composer-label / data-placeholder docs with ThinkFlowLab#481 phone hold-card targets. Regenerated client bundle patch after merge.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…inkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Keep ThinkFlowLab#495 reply_only People-with-access docs from main with ThinkFlowLab#496 already-have copy and Remove confirm.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…owLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated client bundle patch after merge; auto-merged social sources keep ThinkFlowLab#498 friend Bot name formatter with ThinkFlowLab#501/ThinkFlowLab#505.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…ThinkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated client bundle patch after merge.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…wLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated ds-bot patches (0005/0008) after merge.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
ThinkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated ds-bot patches after merge.
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
…nkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505) Regenerated ds-bot patches after merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #497
Root cause. Nothing on FlyBot's live path regressed since #432. On a two-home bench at main
a7adfe0(local Bot Social + mock model, browser on A's Chief chat), B's first line, the held reply's Waiting for approval card, the Inbox count and the badge all show without a reload. They just show late: the social plugin reads a Bot's Bot Social inbox only on its idle timer (inboxPollMs, 15 s), and the card also waits for the model's reply. #432 never fixed acceptance item 1; its PR said it found no cause and pointed at the 15 s poll. The self-test logs match: B sent at 12:39:26, A delivered at 12:39:34 (+8.5 s), and the card arrived at 12:39:41 (+15 s). Someone watching for about 8 s sees nothing and then reloads.What changes
index.js): the roster poll sendswatching: !document.hiddenwith eachstatecall.channel.js,hooks.js):statenotes when a window on screen last read the team. A hidden window does not count; an older client that sends nothing does. That isrt.watched()(8 s), offered to plugins asflybot.watched(). Process-local, nothing saved.social.js): while a window watches, a second timer reads the inbox at the live cadence (facePollMs, 4 s). It skips ticks the shared timer already covers (a live face room) and ticks within half a period of the last read. With no window open nothing changes (15 s).Measured on the two-home bench (B sends, until the line is in A's open Chief chat, 5 lines each): main 7.7–12.5 s, this branch 1.3–3.1 s. The card and the Inbox count follow on the same host revision, after the mock model's reply.
Tests
core/test/flybot.test.jsFriend's first line and its approval card don't arrive live on the sharing home; need a reload (regression of #420) #497: a window that keeps polling withsincegets the friend's first line (friendLineAt), then the held reply (pendingCount1,heldRepliespending on the turn it answers), with no reload. Alsoflybot.watched(): hidden does not count, it expires after 8 s, and an older client counts. The second test fails on main.plugins/social/test/social.test.jsFriend's first line and its approval card don't arrive live on the sharing home; need a reload (regression of #420) #497: with no window the live timer reads nothing. With a window, B's first line is delivered on the first 4 s tick. Once the window is gone it stops. Fails on main.Ran:
ARCH_DOCS_BASE=origin/main TZ=UTC npm run verifyat the tip, passes (arch-docs OK; plugin lint OK; core 1079, social 297, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures). Two-home live bench (local Bot Social at 6a97ba0, mock model, headless and headful Chrome) before and after.Not run: prod Bot Social, real model, the Mac instances, the Desktop app, smoke bench.
Risk tier: T2 (estimate; the controller sets the label)