fix(slack): preserve thread context in auto-replies#251
Merged
Conversation
68b2b3e to
7b274f8
Compare
Contributor
|
Clean change, thank you! Will add regression tests and merge. |
When replying to a message in a Slack thread, the response now stays in the thread instead of going to the channel root. Only threads replies when the incoming message was already in a thread (has thread_ts). Top-level messages get top-level replies. Fixes openclaw#250
7b274f8 to
7034d4f
Compare
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
* feat(agents): add runtime tool-approval orchestrator with approvals.tools config - Add approvals.tools config types + zod schema (enabled, mode, timeoutMs, policy, routing, classifier) - Create tool-approval orchestrator module (decision engine, param redaction, gateway integration) - Integrate orchestrator into before-tool-call wrapper path (runs after plugin hooks, before execution) - Add ToolApprovalBlockedError with stable machine-readable error shape - Add 90 tests covering all mode/decision/risk branches - Backward-compatible: no behavior change when approvals.tools is missing or disabled * feat: upgrade /approve and Discord handler to canonical tool approvals - /approve now queries tool.approvals.get for canonical records and resolves via tool.approval.resolve (with requestHash); falls back to legacy exec.approval.resolve when no canonical record is found - Discord handler listens for tool.approval.requested/resolved events and renders generic tool approval embeds for non-exec tools - resolveApproval prefers tool.approval.resolve when requestHash is cached, keeping legacy exec path for backward compatibility - Updated command description to 'tool approval requests' - Added shouldHandleToolApproval for canonical event filtering - Extended tests with canonical, legacy-fallback, and gateway-error scenarios * refactor: rename .clawdbrain → .openclaw and fix repo/domain references - Settings dir: ~/.clawdbrain → ~/.openclaw - Repo references: openclaw/clawdbrain → dgarson/clawdbrain - Domain: clawdbrain.bot → openclaw.ai - CLI command: clawdbrain login → openclaw login - 48 files changed across src/, docs/, apps/web/, ui/ * cron timeout fixes * feat(agents): wire tool approval context from config into tool creation path - Inject approvals.tools config into wrapToolWithBeforeToolCallHook context - Populate channel field from messageProvider via resolveGatewayMessageChannel - Wire callGatewayTool as the gateway call adapter for approval requests - Approval context is only constructed when approvals.tools exists and is enabled * fix: address review gaps in tool approval handler - Exec dedup: store canonical request for exec tools and defer embed creation by 200ms so the legacy mirror gets first shot; if the mirror never arrives, fall back to a generic tool embed (future-proofs against legacy event removal) - Extract sendToolApprovalEmbed to eliminate code duplication - Add buildApprovalCustomId / parseApprovalData generic aliases (same wire format, clearer naming for non-exec tool code paths) - Add alias identity tests * fix: minor tool approval request fixes * auto-reply/approval integration fix * include exec approval doc * fix: agent-runner-execution integration into auto-reply, executor/kernel fixes * more work on agent runner and memory/heartbeta integration * lots of tests resulting from unification of exec kernel; refactored * Redact arrays in approval helper * lancedb fixes * more fixes/test updates --------- Co-authored-by: Claude <noreply@anthropic.com>
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 22, 2026
…bug Timeline (HIGH) - Scrubable playback timeline with event markers, play/pause/speed controls (1×/2×/5×/10×) - Event list: user, assistant, tool_call, tool_result, context_shift, error, system types - Gap annotations between events (>500ms) - Event inspector: detail / raw JSON / context tabs - Tool I/O panel: input/output diff, duration, success/fail indicator - Context window panel: before/after token counts, compaction savings - Stats strip: live event/tool/error/token counts at scrub position - Filter chips per event type - 3 rich mock debug sessions (luis main, xavier review, piper subagent) - 0 TS errors, strict types, no any, no replaceAll
Fato07
referenced
this pull request
in Fato07/elav
Mar 26, 2026
fix(heartbeat): prevent false process_lost failures on queued and non-child-process runs
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
fix(slack): preserve thread context in auto-replies
|
Grounded verification note (runtime / tests / risk) I verified that Slack thread-context preservation is present in the runtime send path, not only in helper code. What is grounded in runtime now
Runtime artifact evidence
Tests I ran just now
Current risk boundary
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
fix(slack): preserve thread context in auto-replies
matin
added a commit
to matin/openclaw
that referenced
this pull request
Jun 9, 2026
…o-accented (tulgey openclaw#251) (#18) Without speechConfig.languageCode, Gemini TTS infers the spoken language from the text's script: Arabic -> Persian (Farsi correct), but Latin defaults to English, so Latin-script Spanish was read with an English accent. Add an optional, omit-when-absent languageCode to the shared generateContent body and resolve it per turn by precedence: directive/talk override > operator config > Spanish auto-detection > omit. Omit-when-absent preserves Gemini's script-based auto-selection (the Arabic-script -> Persian path Farsi relies on). The auto-detector abstains unless it is confident the text is Spanish (stopword scorer + inverted punctuation; never touches non-Latin scripts and strips the audio-profile wrapper before scoring), so Farsi keeps its Persian voice and English stays English. Default detected locale es-MX; operators can pin a locale via config/`[[tts:language=...]]` or disable detection with detectLanguage:false. Refs tulgey openclaw#247 / ADR 0024. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
When replying to a message in a Slack thread, the response now stays in the thread instead of going to the channel root.
Changes
threadTsparameter todeliverRepliesctxPayload.ReplyToId(which containsthread_ts ?? ts) through to message deliveryconst threadTs = undefinedin favor of using the passed valueTesting
Fixes #250