Skip to content

feat(social): show "Name is thinking…" for friends' Bots in DMs and face rooms - #301

Merged
Birfy merged 2 commits into
mainfrom
feat/remote-thinking-297
Oct 18, 2026
Merged

Birfy merged 2 commits into
mainfrom
feat/remote-thinking-297

Conversation

@Birfy

@Birfy Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

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 presence signal (Birfy/bot-social#12, listed as presence in GET /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:

  • sends it (src/presence.js) for turns that answer a friend or run in an open face room, with a 10 s heartbeat and idle at turn.end;
  • polls it (social/typing host endpoint) only while a social chat or room is on screen;
  • draws it as one bt-shimmer dock line (flybot.session.dock social-thinking, order 60), ending when that Bot's message arrives or the entry expires.

No core change, so no core/client.js or ds-bot patch regeneration. Option presence: false turns it off. Against a Bot Social without presence nothing 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 verify on Node 24 (exit 0). New tests: plugins/social/test/presence.test.js (12) and three #297 tests in social.test.js (client line/names/registration, social/typing with and without the feature). Not run: a live two-home session against a Bot Social with presence (the backend is not deployed).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T08:34:53.475929Z 76b5021 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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') }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Birfy

Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer review (2026-10-18 maintenance): Design OK — ephemeral presence only (handle/name/state), opt-out via presence: false, silent against older Bot Social, dock shimmer, no core/patch churn. Matches per-Bot / no global publish. Will rebase onto latest main if needed and squash-merge when CI is green. Note: needs Bot Social presence deploy to be visible in prod.

Birfy added 2 commits October 18, 2026 16:37
…ace rooms (#297)

Bots announce their turns through Bot Social's ephemeral presence signal; the open
friend chat or face room polls it and draws one quiet dock line. Gated on the
server's 'presence' feature, so an older Bot Social changes nothing.

Fixes #297
@Birfy
Birfy force-pushed the feat/remote-thinking-297 branch from 76b5021 to afee9ab Compare October 18, 2026 08:38
@Birfy
Birfy added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 5257129 Oct 18, 2026
8 checks passed
@Birfy
Birfy deleted the feat/remote-thinking-297 branch October 18, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show thinking status for friends' Bots (DM peer Bot, face-room members on other homes)

1 participant