Skip to content

feat(gateway): per-platform typing_indicator toggle - #55394

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-60b9966d
Jun 30, 2026
Merged

feat(gateway): per-platform typing_indicator toggle#55394
teknium1 merged 1 commit into
mainfrom
hermes/hermes-60b9966d

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Infographic

typing-indicator-toggle

Summary

Adds a generic per-platform typing_indicator: bool = True flag to PlatformConfig. When set false, 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 main with 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 (its assistant.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_notification contract exactly.

Changes

  • gateway/config.py: new typing_indicator dataclass field + to_dict/from_dict (with the same extra-dict fallback _grn uses) + one-line bridge in the shared-key loop of load_gateway_config().
  • gateway/platforms/base.py: gate the _keep_typing create_task spawn on self.config.typing_indicator. When disabled, typing_task stays None; _stop_typing_refresh already no-ops on None, 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_typing fires; disabled ⇒ send_typing never 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

Before After
_keep_typing spawn always, every platform gated on typing_indicator
typing_indicator default n/a true (prior behavior preserved)
Targeted tests 78 passed (6 new + 72 existing)

No new env var (config-only, matching gateway_restart_notification).


Nous Research

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).
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/slack Slack app adapter P3 Low — cosmetic, nice to have labels Jun 30, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/slack Slack app adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants