Repository navigation
fix(social): a human's message to a room's friend Bot no longer goes through Chief (#143) - #144
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: 9eed789bdf
ℹ️ 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".
| if (isPaused(error)) throw mapSendError(error) | ||
| lastError = error | ||
| if (!/no_relationship|no active relationship/i.test(String(error?.message ?? error))) throw error | ||
| if (!/no_relationship|no active relationship/i.test(String(error?.message ?? error))) throw userFacingSendError(error) |
There was a problem hiding this comment.
Avoid formatting direct-chat failures twice
When a Friends' Bots send fails with anything other than no_relationship (for example HTTP 403), this now throws a fully formatted instruction, but remote-chat.js's forward() catches it and passes it through notSentLine() again. Because the replacement error no longer carries HTTP 403 or the original code, it falls through to the generic suffix and renders text such as Not sent: this Bot cannot be reached ... try again. Try again, or open the Bot Social console.; preserve a recognizable code/marker or leave the formatting to one layer so the promised short instruction is not duplicated.
Useful? React with 👍 / 👎.
…s grant A Face-to-face (or group) chip that names a friend's Bot already in the room was 1:1-relayed as Chief, so reach() and sendOut() denied it when Chief had no grant. Skip that relay: the human line in the room is the delivery. Chief-originated sends stay grant-gated. Failed 1:1 Friends' Bots sends now say one short English line with a next step. Fixes ThinkFlowLab#143 Co-authored-by: Danyang Chen <birfychen@gmail.com>
9eed789 to
2036b80
Compare
Friends' Bots is no longer a sidebar section, so the sent receipt must not name it. A @ of a friend who is not in the room still 1:1-sends (ThinkFlowLab#80/ThinkFlowLab#81); ThinkFlowLab#144 only skips when they are already a participant. The hold receipt waits for the followup instead of 30 ms, because persist races remote-chat open after publish. Co-authored-by: Danyang Chen <birfychen@gmail.com>
Fixes #143.
The owner's composer chip for a friend's Bot that is already in the Face-to-face room was relayed 1:1 as Chief (
sendUserMentions->bot.send->reach()toRemotedeny ->sendOut()with noactiveMember(Chief)), so Chief's missing grant blocked a human's own message. A human line in a face room already fans out in room scope, so the 1:1 send is now skipped when the mentioned remote is a current room participant. Chief-originated sends to friends' Bots stay grant-gated; #98 fencing and the grant-scopedreach()tests are untouched. The sidebar "Not sent: Bot Social send..." line is now short English with a next step.Verified:
ARCH_DOCS_BASE=upstream/main npm run verifypasses.