Repository navigation
Face rooms: held Bot replies live on their card; rejected ones read Not sent; one answer per line - #461
Merged
Conversation
…ot sent; one answer per line A Bot line Bot Social holds for the owner's approval is tracked on the room (heldLines) and drawn only on its approval card until Approve; Reject turns it into one grey "<Bot> · Not sent" line that survives a reload and Past rooms. Decided cards leave no stub, the face card names the Bot with its person, no "Rejected." note is posted into a face room, and each Bot answers a person's plain line at most once (a second delivery or a late second answer is dropped). Fixes ThinkFlowLab#456
Collaborator
Author
|
Self-review: PASS
Owner decision: a held reply is drawn only on its card until Approve; Reject gives a grey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #456
Summary
Face-to-face rooms, following the owner's decision on #456:
room.heldLines, saved instate.json). Before, it guessed by matching text againstpendingApprovals.fanoutRoomLinerecords a local Bot's line assendingbefore the send. The social transport answers{ held: true, approvalId }when Bot Social holds it, and the record becomespending.social/decide-approvalthen callsflybot.rooms.settleHeld(id, decision).<Bot> · Not sentline (option a). It stays that way after a reload and in Past rooms because therejectedrecord is saved with the room. NoRejected.note is posted into the face room.faceLine(seq,answered,askedexchange ids) for the latest person line, covering both the owner's own line and a friend's attested plain line. A Bot that already answered is passed with no model call, a second answer in the same round is dropped, andlateRoomReplydrops a late answer to the same line. A newer person line resets it. Separately,applyFaceSnapshotposts a face event for a round only when the core room logged it just now (applyFaceLinerefuses an event id it already has), so one event read twice can't start a second round.fromis the room's own Friend's Bot rows: two name formats ('Helper · SelfB0023's Bot' vs 'SelfA0023's Chief'), two-line wrap, no preview, inset highlight, faint marker, same avatar as own Chief #384 label for that local Bot, e.g.Researcher (Alice) → the room.Minor details decided (owner said to decide these)
Researcher · Not sent(zh{name} · 未发出). It does not show the rejected words.sendingrecord older than 60 s (a restart mid-send) falls back to a normal bubble, so a line is never hidden forever.X → Yformat of other cards and uses the room'sBot (Person)label. It falls back to the Bot name when no label is known.Approval rules checked
social/decide-approval. Nothing in this PR approves a Bot line. The newheldanswer only hides the line, and a Bot line is never treated as the owner's.Tests
core/test/held-line.test.js: sending/pending → no bubble and no stub; approved → bubble; rejected →Chief · Not sentwith no words; closed room → Not sent (Past rooms); late post matched by Bot+text; stale send → bubble; zh string and CSS.core/test/rounds.test.js:sending→pendingwith the reply'sseq. It is in the roster view (nofaceLinethere),rejectedsurvivesstate.json, approve removes it, and a line that went out leaves no record.plugins/social/test/social.test.js:{held, approvalId}without approving anything.settleHeld, and noRejected.note goes to the face room.null.Researcher (Alice) → the roomand ignores a friend's Bot with the same name.ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: core 1016 pass, social 276, tree 73, timeline 80, all with 0 skipped.node scripts/lint-plugins.mjs <p>plusDSH_HARNESS=… npm testfor tree/social/timeline).check-pack.mjsandtsc --strict types/*.d.ts.Docs:
docs/subsystems/core-host.md,core-client.md,plugin-runtime.md,social.md. Changelog:changelog.d/456-face-held-replies.fixed.md.Risk tier: T2/T3 (expected; touches the approval flow — how held Bot lines show and the decide-approval path. Best estimate T3).