Skip to content

fix(social): face-room poll empty handle and approval notice delivery (#122 #123) - #128

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/fix-122-123-social-poll-notice-dae8
Oct 16, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/fix-122-123-social-poll-notice-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #122
Fixes #123

#122 Empty or @ handles stay empty (norm, REST get, hide-handle). A stored asBot: "@" is healed, and the poll only sends as when it is a real handle. Rooms discovered through list are seeded from my_bots. A face_room_not_found on a room that is still listed repairs the meta and retries once.

#123 Approval waiting notices no longer call deliver with a home-level handle. They open or resolve a listed friend Bot's 1:1 chat so the line lands in the chat. If there is none, they skip with approval chat note skipped: no 1:1 chat for … instead of throwing.

ARCH_DOCS_BASE=upstream/main npm run verify passes; ds-bot/ untouched, no patch regeneration.

Empty or missing handles no longer persist as "@" on face-room poll,
which was 404-spamming GET ?as=@. A stored bogus "@" is healed, and
list-discovered rooms seed asBot from my_bots.

Held-approval waiting notices open a listed friend Bot 1:1 instead of
delivering to a home-level handle with no session (resume failed for
session "undefined"). If no chat can be opened, the notice is skipped
with a clear log.

Fixes ThinkFlowLab#122
Fixes ThinkFlowLab#123

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T11:10:10.070671Z f910e66 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 16, 2026
Merged via the queue into ThinkFlowLab:main with commit 649bebe Oct 16, 2026
6 checks passed
@Birfy
Birfy deleted the cursor/fix-122-123-social-poll-notice-dae8 branch October 16, 2026 11:03

@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: f910e66672

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

return { ...meta, asBot, asBots }
}
function listedAsBot(snapshot) {
const mine = (snapshot?.myBots ?? []).map(bot => norm(bot.handle)).find(Boolean)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve every local Bot when seeding room metadata

When a room is first discovered (or repaired) with multiple entries in my_bots, this collapses them to one handle, and applyFaceSnapshot consequently persists only that handle in asBots. leaveFaceRoom later builds both the REST bots payload and room-only identity cleanup from asBotsOf(meta), so leaving such a discovered room removes only the first Bot while the other local Bots remain joined and their room-only identities linger. Keep the full set of listed local handles while selecting just one polling identity.

Useful? React with 👍 / 👎.

const deliver = service.remote?.chats?.deliver ?? flybot.remote?.chats?.deliver
if (item?.to && deliver) {
try { await deliver({ handle: item.to, text, name: 'Room' }) } catch (error) { warn('approval chat note failed', error) }
const chats = service.remote?.chats ?? flybot.remote?.chats

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 Use the scoped chat API when opening approval sessions

When the selected friend Bot has no existing 1:1 session, the normal startSocial(ctx.flybot) path chooses the unscoped service.remote.chats API here. Its open records the new remote Bot under plugin shared, while Social registers its outbound handler on the scoped flybot.remote.chats; replying in the newly opened chat therefore reports that its plugin is not running instead of sending through Social. Prefer the scoped chat API for both opening and delivery.

Useful? React with 👍 / 👎.

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.

Approval waiting notice: remote.chats.deliver fails with session "undefined" Face-room poll: empty handle norms to "@", GET as=@ 404 spam in web.log

2 participants