Skip to content

feat(face-rooms): explicit mention list: typed lines carry target handles, receiver resolves by handle first (#293) - #294

Merged
Birfy merged 1 commit into
mainfrom
feat/face-mentions-field
Oct 18, 2026
Merged

Birfy merged 1 commit into
mainfrom
feat/face-mentions-field

Conversation

@Birfy

@Birfy Birfy commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #293. Follow-up to #287/#288 (the sender-side explicit mention list left "not done"). Companion: Birfy/bot-social#9/#10 (merged, 1870786; not deployed).

What

  • Sender: the owner's typed face-room line carries the server handle of every Bot its @ names (faceMentions().handles, read against the room; core onFaceLine(fn) now passes { mentions }). The social plugin sends it as mentions next to typed_by_owner, only when GET /v1/platform features lists mentions (same shared probe as typed_by_owner). Never on the legacy envelope, Bot lines or an older server.
  • Receiver: mentions is read only from a line the server attests typed_by_owner (cleanMentions, <= 8 handles). postHuman resolves the handles against the room's participants first (mentionedByHandle): only my own Bots in the list answer. A list naming nobody the room knows, or no list (older server/client), falls back to the existing label/name reading (Face-to-face: Bots should answer a plain line without @; cross-home @ labels do not resolve #287).
  • The composer's @ picker only inserts the label text (the DSH shell's trigger menu returns {text}), so the handles are derived from the picked labels at send time instead of being tracked in the composer.
  • Old servers/clients keep working unchanged. No instance upgrades.

Tests

core: face-mentions (handles, resolver), flybot (onFaceLine mentions, postHuman by handle vs text); social: send gated by feature/typed/Bot lines/legacy, receive honoured only on attested lines, fallback, malformed list. TZ=UTC npm run verify passes.

…dles, receiver resolves by handle first (#293)

Closes #293. Sender sends Bot Social 'mentions' (feature-gated, typed lines only); receiver honours it only on typed_by_owner lines and falls back to label/name reading. Needs Birfy/bot-social#10 (merged 1870786).
@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-18T07:28:47.885457Z 9eabd55 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.

@Birfy
Birfy added this pull request to the merge queue Oct 18, 2026

@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: 9eabd55035

ℹ️ 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".


// The sender's explicit mention list as the server delivers it (Bot Social `mentions`, #293): at most 8
// handles, each normalised to lowercase "@handle"; anything malformed is dropped, never trusted.
const MENTION_HANDLE = /^@?[a-z0-9._-]{2,40}$/i

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 Accept the full supported handle length

When a Bot and its home use long but supported names, their combined Bot Social handle can exceed 40 characters: slug() and homeHandleOf() each preserve up to 32 characters, while existing handle normalization permits up to 120. This regex therefore silently drops such handles on both send and receive, causing the explicit list to be omitted and the receiver to fall back to ambiguous label parsing instead of routing to the selected Bot.

Useful? React with 👍 / 👎.

Merged via the queue into main with commit 850164d Oct 18, 2026
8 checks passed
@Birfy
Birfy deleted the feat/face-mentions-field branch October 18, 2026 07:29
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.

Face rooms: sender-side explicit mention list (handles) on typed lines, receiver resolves by handle first (follow-up to #287)

1 participant