feat(channels): suppress_placeholder toggle for Discord and Slack#987
Open
tarrencev wants to merge 3 commits intonextlevelbuilder:devfrom
Open
feat(channels): suppress_placeholder toggle for Discord and Slack#987tarrencev wants to merge 3 commits intonextlevelbuilder:devfrom
tarrencev wants to merge 3 commits intonextlevelbuilder:devfrom
Conversation
Adds a `suppress_placeholder` config option to Discord and Slack channels that skips sending the "Thinking..." placeholder message and its subsequent edit-with-final-response pattern. Instead, the channel's native in-progress indicator (Discord typing indicator, Slack thinking reaction) is shown for the full duration of the agent turn and the final response is posted as a new message. - Discord: typing indicator TTL is raised to 10 minutes when suppressed so long agent turns do not prematurely lose the indicator. - Slack has no bot-typing API, so suppression forces streaming off and relies on the reaction system when `reaction_level` is enabled. - Also plumbs the field through the DB-instance config struct in each channel's factory so DB-configured channels can use the toggle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lper Post-review follow-ups on the suppress_placeholder toggle: - Discord: raise the suppressed-mode typing TTL from 10 min to 30 min and name both the default and suppressed TTLs as constants. 10 min was too low — long agent runs (multi-step research, tool chains) can exceed it, leaving the user staring at dead typing dots before the final response. 30 min is a pragmatic safety-net ceiling. - Slack: extract a `placeholderSuppressed()` helper used by handleMessage, handleAppMention, StreamEnabled, and New's streaming-conflict warning. Replaces five inline `c.config.SuppressPlaceholder != nil && *c...` checks with a single readable method. - Docs: document the tradeoffs honestly — retry notifications and tool-status updates are delivered via placeholder edit and are silently dropped when suppressed; the typing indicator is the only in-progress signal. Note that Slack's thinking-face reaction requires reaction_level to be set (it's off by default). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (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
suppress_placeholderboolean toDiscordConfigandSlackConfig(also wired through each channel's DB-instance factory).thinking_facereaction (whenreaction_levelisminimal/full) acts as the in-progress indicator.placeholderSuppressed()helper on the Slack channel to replace 5 repeated pointer-deref checks.Why
On channels with a proper presence API, the intermediate "Thinking..." text message + message-edit cycle can feel clunky, especially in shared groups or when users prefer a quieter indicator. WhatsApp and Telegram already skip this pattern; this PR brings the same option to Discord and Slack behind an opt-in flag.
Compatibility
docs/05-channels-messaging.md.Pre-Landing Review
Ran the full review pipeline (4 specialists + red team on a 266-line diff). Findings:
TestStreamEnabledSuppressPlaceholdercovers the main risk vector; adding handler tests requires a session/postMessage spy harness that doesn't yet exist in the repo, which is larger than this PR's scope.PR Quality Score: 8.5/10
Test Plan
go build ./...+go build -tags sqliteonly ./...go vet ./...go test ./internal/channels/... ./internal/config/...— all passTestStreamEnabledSuppressPlaceholdercovers the Slack stream-disable interactionsuppress_placeholder: true— confirm typing runs for full turn, no "Thinking..." message, final response arrives as a new messagesuppress_placeholder: true+reaction_level: minimal— confirm no placeholder, thinking-face reaction fires, final response as a new message🤖 Generated with Claude Code