Skip to content

fix: add suppressTyping option for system/internal messages (#27395)#27540

Closed
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Sid-Qin:fix/suppress-typing-system-msgs-27395
Closed

fix: add suppressTyping option for system/internal messages (#27395)#27540
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Sid-Qin:fix/suppress-typing-system-msgs-27395

Conversation

@Sid-Qin
Copy link
Contributor

@Sid-Qin Sid-Qin commented Feb 26, 2026

Summary

  • Problem: Cron results, subagent reports, and exec completions trigger typing indicators on Telegram, causing the bot to appear perpetually typing even when no user-facing response will be sent.
  • Why it matters: Users with frequent cron jobs see constant "typing..." throughout the day, creating a noisy UX.
  • What changed: Added a suppressTyping option to GetReplyOptions that forces typing mode to "never". Wired through resolveTypingMode alongside the existing isHeartbeat suppression path.
  • What did NOT change: Default typing behavior for user messages is unchanged. Callers must opt in.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • Integrations
  • UI / DX

Linked Issue/PR

User-visible / Behavior Changes

Callers (channel monitors, cron runners) can pass suppressTyping: true to prevent typing indicators for system messages.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Evidence

  • npx vitest run src/auto-reply/reply/reply-utils.test.ts — 28 tests pass (1 new suppressTyping test)
  • npx tsc --noEmit — clean

Human Verification (required)

  • Verified scenarios: suppressTyping forces "never"; normal messages unaffected
  • What you did not verify: live Telegram bot with cron jobs

Compatibility / Migration

  • Backward compatible? Yes
  • Migration needed? No

Failure Recovery (if this breaks)

  • Revert commit; typing returns to default behavior for all messages

Risks and Mitigations

None — opt-in only

Allow callers to suppress typing indicators for cron results, subagent
reports and exec completions so the bot does not appear perpetually
typing when only internal processing is happening.

Made-with: Cursor
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 26, 2026

Greptile Summary

Adds infrastructure for suppressing typing indicators on system/internal messages by introducing a new suppressTyping option that flows through the reply pipeline.

  • Added suppressTyping?: boolean to GetReplyOptions and TypingModeContext with clear JSDoc documentation
  • Modified resolveTypingMode to treat suppressTyping the same as isHeartbeat, forcing typing mode to "never" when enabled
  • Properly threaded the option from GetReplyOptions through runPreparedReply to resolveTypingMode
  • Added test coverage for the new behavior

The implementation is clean, backward compatible, and follows existing patterns (mirrors the isHeartbeat suppression path). The infrastructure is now in place for callers like cron monitors, subagent reports, and exec completion handlers to opt-in by passing suppressTyping: true.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are minimal, well-tested, and follow existing patterns. The new option is opt-in only, preserving all existing behavior. The implementation correctly mirrors the existing isHeartbeat suppression logic, and test coverage verifies the new behavior works as expected.
  • No files require special attention

Last reviewed commit: f240bbb

@steipete
Copy link
Contributor

Superseded by main commit 37a138c.

Closed as part of a single integrated typing-policy landing. The final merged implementation includes policy-level suppression (typingPolicy + suppressTyping) and applies it where needed for cross-channel/internal-webchat routes, with regression coverage.

Resolved issues in the unified landing:

Thank you; this PR’s suppression-direction informed the final merged shape.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress Telegram typing indicator for system/internal messages

2 participants