feat: per-room modes and 🔖 reaction capture for the archivist#41
Merged
Conversation
A room can be set to react-only with `!config process react`: the bot then ignores plain messages and acts only when a family member reacts 🔖 / 📌 to a message to save it. `!config process auto` restores the default (process everything as it arrives). 🔖 / 📌 on any message bookmarks it: the same capture the bot makes automatically, but on demand. A small emoji→handler registry on the archivist makes adding bindings (🗑 redact, 👎 reclassify) a one-line change; the dispatcher and reaction plumbing live in MicroBot. Room mode is stored in the bot's room account data, not a room state event: writing room state needs moderator power level, which an invited bot doesn't have, so a state-event write is silently rejected. Account data is the bot's own, survives restarts, and is read fresh. The `!config` command reports honestly when a write fails instead of acking.
A bare `!config` now shows the room's current settings and the values each option accepts, with the active value marked. Both the status view and the set acknowledgement are generated from a small config-options registry, so the help text can never drift from what the command actually accepts. Adding an option is one registry entry.
When a capture or filing finishes, the bot adds ✅ (filed) or ❌ (failed) to the source message alongside the 👀. Since the detailed reply now lives in a thread, this gives an at-a-glance outcome in the main timeline without opening the thread.
Executable contract for `!config process auto|react`, the bare `!config` status view, 🔖 bookmark capture, the react-mode gate, and the 👀 → ✅/❌ outcome glyph. Marked `unverified` + `xfail(strict=False)`: the behavior was verified by hand against a running instance, but this test has not yet been run green through the stacktests rig (server test.local). It neither blocks the suite nor is trusted until reconciled. Run it at the end of the iteration and fix the test or the implementation before tagging the next beta.
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.
Set how the archivist treats a room with
!config process react|auto:react = act only on a 🔖 reaction, auto = file everything.
!configshows the current settings. 🔖 / 📌 bookmarks any message, and processed
messages get ✅ / ❌ next to the 👀 for an at-a-glance result.
Room mode is stored in the bot's room account data, so it needs no
room-admin power and survives restarts.