Repository navigation
fix: retain Slack native command menus in conversation history - #169236
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR records successfully delivered Slack native argument menus through the existing command transcript owner. Example: A Slack user invokes /usage without an argument.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: current main still omits Slack native argument menus from conversation history, the prior worker-read finding is fixed, and no new actionable defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Slack command adapter authorizes and routes native commands, delivers Block Kit menus, and passes their visible text to the shared recorder for redaction and persistence. flowchart LR
A[Slack native command] --> B[Authorization and routing]
B --> C[Argument menu builder]
C --> D[Slack delivery]
D --> E[Shared command recorder]
E --> F[Session transcript]
F --> G[History and later model turns]
Technical reviewBest possible solution: Retain the focused post-delivery capture through the shared recorder and worker-owned model-context reads. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the direct-send branch that omits capture; the body reports failing baseline controls, but no target code was run during this read-only review. Is this the best way to solve the issue? The patch fixes the adapter boundary using existing recording and fallback owners, preserves model inheritance, and resolves the prior database-thread violation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against af288ea70b81. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +41, Tests +76, Docs 0. Total +117 across 9 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 1:42 PM ET / 17:42 UTC (Revision 2). |
|
Landed in d234a68. Slack native command menus are now part of the conversation the agent sees. |
Mattermost native /model and /models replies and model-picker refreshes were visible to the user but never recorded, so the agent could not see them on later turns. This routes them through the shared command-exchange capture owner from #169026 after confirmed delivery, using worker-owned async session reads (including the derived-parent model). The selection confirmation and the picker refresh now share one command identity, so a selection is recorded once. The command identity helper moved into the command-transcript owner, so core and plugins use the same scoping. Proof is test-only, since there is no Mattermost live harness: 16 registered-handler cases fail on main and pass here, plus a persistence test with one user command and two assistant replies. This completes the slash-command parity work after #169026 (core and Telegram), #169200 (Discord) and #169236 (Slack). Co-authored-by: Ayaan Zaidi <[email protected]>
…law#169236) Slack native slash-command argument menus were visible to the user but never recorded, so the agent could not see them on later turns. This routes Slack's native menu sends through the shared command-exchange capture owner from openclaw#169026 after confirmed delivery. The captured text is the labels the user saw, excluding filtered controls. The selected-session and parent-session reads now use worker-owned async reads. Slack bot automation cannot run human slash commands or click native menus, so the changed paths are covered by registered-handler regressions, which fail on main and pass here. A real Slack lifecycle run confirmed ingress, threaded replies and cleanup. Mattermost follows in a separate PR. Co-authored-by: Ayaan Zaidi <[email protected]>
…w#169255) Mattermost native /model and /models replies and model-picker refreshes were visible to the user but never recorded, so the agent could not see them on later turns. This routes them through the shared command-exchange capture owner from openclaw#169026 after confirmed delivery, using worker-owned async session reads (including the derived-parent model). The selection confirmation and the picker refresh now share one command identity, so a selection is recorded once. The command identity helper moved into the command-transcript owner, so core and plugins use the same scoping. Proof is test-only, since there is no Mattermost live harness: 16 registered-handler cases fail on main and pass here, plus a persistence test with one user command and two assistant replies. This completes the slash-command parity work after openclaw#169026 (core and Telegram), openclaw#169200 (Discord) and openclaw#169236 (Slack). Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #169026, #169200
What Problem This Solves
Fixes missing conversation history when Slack sends a native command argument menu directly.
User Impact
Later turns and chat history can see the command and the delivered menu instead of losing the exchange. Command execution, authorization, routing, and the replies users see are unchanged.
Why This Change Was Made
Native argument menus bypass the shared reply dispatcher. They now record successful delivery through the existing command-exchange owner, which already owns redaction, session fencing, and idempotency.
Capture uses the delivered Block Kit representation, including truncated labels and only buttons that survived filtering and block limits. The menu model-context reader lives in a sibling module and uses worker-owned reads for the selected session and inherited parent, preserving the existing model-inheritance rules. The test fixture replaces only the recorder while preserving other exports, avoiding incidental runtime configuration initialization.
Checked #122346, #121373, #121014, and #104736: workspace-qualified authorization and routing, configured-command precedence, and response transport are unchanged. Compact progress and final-answer delivery are untouched.
Evidence
62fbdc1ef84: 4 missing-capture cases and the worker-backed parent-model case fail.mock-openai: stored ingress and threaded Gateway reply, owned edit/reaction/delete operations, and uploaded-file readback. Owned fixtures are cleaned up.Separate follow-up: Mattermost native slash/model-picker capture is not included in this PR.
Reverting the code stops future capture but does not remove already-recorded history. No schema or configuration migration. Blast radius: Slack native argument-menu capture; shared dispatch and other channels are unchanged.