Skip to content

Mark replies that left through per-pair Auto-send as Auto-sent (part of #417) - #437

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/417-auto-sent-marker
Oct 19, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/417-auto-sent-marker

Conversation

@Birfy

@Birfy Birfy commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Part of #417 (owner decision 2026-10-19 17:21: show an Auto-sent marker on messages a Bot sent through per-pair Auto-send from #433).

Risk tier: T3 (touches plugins/social/src/social.js and the host hook seam core/src/host/hooks.js).

What it looks like

A Bot reply that left without a card because Auto-send is on for that pair now shows a plain (normal, non-dashed) bubble with a quiet meta line under it:

Auto-sent to SelfB1238 (zh: 已自动发给 SelfB1238)

Same place and style as #430's Sent to … / Not sent lines, no buttons. The wait badge and sidebar preview treat it as sent.

How

  • social.js: when the hold is skipped only because approvalFor(from, home) === 'auto', the middleware returns { action: 'allow', autoSent: true, recipient }.
  • hooks.js: an allow with autoSent on an auto-reply that carries meta.replyIn is recorded by turn in state.flybot.autoSent (id, by, botId, sessionId, turn, to, recipientName, at; last 200; no message text). rt.heldRepliesOf lists these as status: 'auto', so Held reply to a friend: held in place, decision on the bubble, Sent / Not sent after (#418) #430's channel view (heldReplies) carries them unchanged. pendingCount only counts pending.
  • Client: held-reply.js draws the Auto-sent to {to} note; text.js unsentReplyTurns treats auto as sent; i18n string added.
  • flybot.d.ts, docs (social, core-host, plugin-runtime, core-client), changelog fragment.

Only per pair, only replies on a tagged turn; a plain request or a home without Auto-send is not marked. autoSent confers nothing, it is display only.

Overlap

Does not touch channel.js / authz.js / models.js (#434) or index.js / model-menu.js / sidebar.js (#435). Shared files with them are only generated ones (core/client.js, patches) plus docs/i18n in different sections.

Tests

  • core/test/held-reply.test.js: auto state renders data-state="auto", Auto-sent to SelfB1238, no buttons; unsentReplyTurns ignores it.
  • plugins/social/test/social.test.js: with Auto-send on for a↔@bob.home, a reply is allowed and listed as auto with recipient Bob, pendingCount 0; bot b still holds; a plain request is not marked.

ARCH_DOCS_BASE=upstream/main TZ=UTC npm run verify ✅, node scripts/lint-plugins.mjs social ✅, patches check ✅, check-pack ✅, tsc strict types ✅, changelog check ✅.

Birfy added 2 commits October 19, 2026 17:38
… turn (part of ThinkFlowLab#417)

The social middleware's allow says autoSent (with the recipient) when Auto-send for that
pair skips its hold; the host keeps that mark by the turn the reply answers
(state.flybot.autoSent, last 200, no text) and lists it in heldReplies as status auto.
The chat draws a plain bubble with a quiet Auto-sent to <person> where ThinkFlowLab#418 shows Sent.
@Birfy Birfy added enhancement New feature or request agent-pr Pull request opened by an agent area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy labels Oct 19, 2026
@Birfy Birfy self-assigned this Oct 19, 2026
@Birfy

Birfy commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review (Birfy)

Tip SHA: e0962ab
Ran: ARCH_DOCS_BASE=upstream/main TZ=UTC npm run verify (all suites pass, arch-docs OK); node scripts/lint-plugins.mjs social; node scripts/ds-bot-patches.mjs check; node .github/scripts/check-pack.mjs; tsc --noEmit --strict types/*.d.ts; changelog.mjs check; CI all green on this tip.
Not run: manual browser check of the chat bubble; Codex review (not used).

Reviewed the diff:

Verdict: PASS

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 19, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 19, 2026
Merged via the queue into ThinkFlowLab:main with commit 245be0b Oct 19, 2026
8 checks passed
@Birfy
Birfy deleted the fix/417-auto-sent-marker branch October 19, 2026 09:49
@Birfy Birfy removed awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip agent-pr Pull request opened by an agent labels Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant