Skip to content

fix: retain Slack native command menus in conversation history - #169236

Merged
obviyus merged 2 commits into
mainfrom
fix/slack-mattermost-command-parity
Oct 11, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/slack-mattermost-command-parity

Conversation

@obviyus

@obviyus obviyus commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Registered-entry-point regressions fail on pinned main 62fbdc1ef84: 4 missing-capture cases and the worker-backed parent-model case fail.
  • Candidate: 58 tests across the Slack slash suites and Block Kit fallback suite pass in isolated Linux/Node 24. Coverage includes inherited model choices, label truncation, omitted buttons, and rejected delivery.
  • Extension test typechecking and focused type-aware lint pass after the review fixes. Mock-export, assertion-safety, and line-count guards passed. The private-QA build and live transport proof were reused; the later worker-read correction was validated with the registered-handler tests and typecheck rather than another build.
  • Real Slack lifecycle proof passes through a Convex-leased driver/SUT pair and isolated Gateway using deterministic mock-openai: stored ingress and threaded Gateway reply, owned edit/reaction/delete operations, and uploaded-file readback. Owned fixtures are cleaned up.
  • Limits: Slack's bot/API driver cannot invoke human slash commands or click native menus. Those paths have registered-handler regression coverage, not live interaction proof. No real-model reasoning or Slack client rendering claim.

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.

@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: slack Channel integration: slack size: S labels Oct 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR records successfully delivered Slack native argument menus through the existing command transcript owner.

Example: A Slack user invokes /usage without an argument.

  • Before: Slack displays the menu, but conversation history omits the command and menu.
  • After: History retains /usage and the delivered menu text, including the tokens option.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is correct on inspection and resolves the prior finding; changed-path evidence remains a mocked-persistence handler harness.
Proof confidence 🦐 gold shrimp (3/6) Under the supplied maintainer-authored classification, ordinary contributor proof is exempt; the body reports registered-handler regressions and explicitly limits live Slack evidence to unrelated lifecycle operations.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A delivered Slack native argument menu disappears from history and later conversation context.
Reason: The focused adapter repair closes a documented gap, and the task identifies this PR as maintainer-authored.

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
Reviewed head: 2e40c5229a5a2a1d27520fc015a61804767c18d3

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The registered-handler tests mock persistence, and the supplied Slack lifecycle smoke does not demonstrate native-menu retention in history or the next provider request.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Native-menu model resolution keeps the original intent (c6770d3: Resolve dynamic command choices against the target session model and inherited overrides.)
  • Slack control fallback text keeps the original intent (fix(slack): preserve authored fallback without duplicate controls #144653: Preserve complete fallback content while keeping select-option enumeration opt-in.)
  • Documented transcript coverage changes intended behavior with a stated reason (62fbdc1: Document Discord native capture while deferring Slack adapters to follow-up work.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 543718e adds extensions/slack/src/blocks-fallback.ts:114 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 543718e0edc5; files: extensions/slack/src/blocks-fallback.ts)

PR surface

Source +41, Tests +76, Docs 0. Total +117 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 107 66 +41
Tests 2 79 3 +76
Docs 3 7 7 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 193 76 +117

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Missing native-menu exchanges affect history and later context on a limited Slack command path.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-11T17:28:33.968Z sha 0b92e2a :: needs changes before merge. :: [P2] Move the extracted menu session reads onto the worker

Reviewed October 11, 2026, 1:42 PM ET / 17:42 UTC (Revision 2).

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@obviyus
obviyus merged commit d234a68 into main Oct 11, 2026
117 of 120 checks passed
@obviyus
obviyus deleted the fix/slack-mattermost-command-parity branch October 11, 2026 17:45
@obviyus

obviyus commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in d234a68. Slack native command menus are now part of the conversation the agent sees.

obviyus added a commit that referenced this pull request Oct 11, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant