Repository navigation
feat(social): show "Name is thinking…" for friends' Bots in DMs and face rooms - #301
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76b5021912
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| entry.timer = undefined | ||
| if (sending.get(entry.turnId) === entry) sending.delete(entry.turnId) | ||
| // `idle` only follows a `thinking` that went out. | ||
| if (say && !entry.closed && entry.beats > 0) { entry.closed = true; void beat(entry, 'idle') } |
There was a problem hiding this comment.
Serialize idle after outstanding thinking updates
When a turn ends while the initial or heartbeat set_presence(...thinking) request is still in flight, stop() launches the idle request concurrently. If the server processes the faster idle first and the earlier thinking request completes afterward, the peer is left showing a stale thinking indicator until its TTL expires even though the turn ended. Queue the updates per entry, or wait for outstanding thinking writes before sending the final idle state.
Useful? React with 👍 / 👎.
|
Maintainer review (2026-10-18 maintenance): Design OK — ephemeral presence only (handle/name/state), opt-out via |
76b5021 to
afee9ab
Compare
Fixes #297
A friend's Bot (in a direct chat) and Bots of other homes (in a face-to-face room) now show a quiet Name is thinking… line above the composer while they work, the way the user's own Bots show their activity.
How. Bot Social gets one ephemeral
presencesignal (Birfy/bot-social#12, listed aspresenceinGET /v1/platform): handle, display name and state only, TTL 20 s, never stored, only between Bots that may already talk, only visible to the other side. This plugin:src/presence.js) for turns that answer a friend or run in an open face room, with a 10 s heartbeat andidleatturn.end;social/typinghost endpoint) only while a social chat or room is on screen;bt-shimmerdock line (flybot.session.docksocial-thinking, order 60), ending when that Bot's message arrives or the entry expires.No core change, so no
core/client.jsor ds-bot patch regeneration. Optionpresence: falseturns it off. Against a Bot Social withoutpresencenothing is sent, polled or shown.Needs the Bot Social build from Birfy/bot-social#12 deployed; until then this is silent.
Ran:
ARCH_DOCS_BASE=upstream/main TZ=UTC npm run verifyon Node 24 (exit 0). New tests:plugins/social/test/presence.test.js(12) and three#297tests insocial.test.js(client line/names/registration,social/typingwith and without the feature). Not run: a live two-home session against a Bot Social with presence (the backend is not deployed).