feat(gateway): per-platform typing_indicator toggle - #55394
Merged
Conversation
Add a generic per-platform PlatformConfig.typing_indicator flag (default True) that gates the _keep_typing refresh loop in _process_message_background. When false, the loop is never spawned, so no typing/"is thinking…" status is shown on that platform — message delivery is otherwise unchanged. Mirrors the gateway_restart_notification contract exactly: dataclass field + to_dict/from_dict (with extra-fallback resolution) + shared-key bridge in load_gateway_config, so 'slack: typing_indicator: false' under platforms works without a separate block. Generic by design — the same key works for every platform (Slack 'is thinking…', Telegram/Discord/Signal typing). Motivated by users who find Slack's assistant 'is thinking…' status noisy (it also briefly disables the compose box, via the Assistant API).
tonydwb
reviewed
Jun 30, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Clean 6-file feature adding per-platform typing_indicator toggle. Well-motivated by Slack's assistant.threads.setStatus disabling the compose box.
✅ Looks Good
- Clean config addition with proper default (True)
- Gated at the right level (refresh loop never spawned when False)
- Good handling of both top-level and extra bridging paths
Reviewed by Hermes Agent
This was referenced Jun 30, 2026
1 task
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.
Infographic
Summary
Adds a generic per-platform
typing_indicator: bool = Trueflag toPlatformConfig. When setfalse, the gateway never shows the "typing…" / "is thinking…" status while the agent processes a message on that platform. Message delivery is unchanged.Salvage of #55282 by @benbarclay, cherry-picked onto current
mainwith authorship preserved.Why
The typing bubble is not a Slack feature —
BasePlatformAdapter._process_message_background()unconditionally spawns the_keep_typing()refresh loop for every platform. So the correct fix is a generic gate at the shared spawn site, not a Slack-only flag. Slack is just the first consumer (itsassistant.threads.setStatus"is thinking…" also disables the compose box while shown, so suppressing it is a real UX win).This mirrors the existing
gateway_restart_notificationcontract exactly.Changes
gateway/config.py: newtyping_indicatordataclass field +to_dict/from_dict(with the same extra-dict fallback_grnuses) + one-line bridge in the shared-key loop ofload_gateway_config().gateway/platforms/base.py: gate the_keep_typingcreate_taskspawn onself.config.typing_indicator. When disabled,typing_taskstaysNone;_stop_typing_refreshalready no-ops onNone, so teardown is unchanged. Zero overhead when off — the loop never starts.tests/gateway/test_config.py: dataclass default / roundtrip / quoted-"false"coercion / extra-fallback.tests/gateway/test_typing_indicator_toggle.py: behavioral against the real dispatch path — enabled ⇒send_typingfires; disabled ⇒send_typingnever called and delivery still happens.website/docs/user-guide/messaging/index.md(+ zh-Hans i18n): new "Typing indicators" subsection.Supersedes
This generic gate replaces three older per-platform toggle PRs (all credited on close):
Validation
_keep_typingspawntyping_indicatortyping_indicatordefaulttrue(prior behavior preserved)No new env var (config-only, matching
gateway_restart_notification).Nous Research