Skip to content

Status reactions: fix stall timers and gating#22190

Merged
thewilloftheshadow merged 11 commits intomainfrom
status-reactions-review-fixes
Feb 20, 2026
Merged

Status reactions: fix stall timers and gating#22190
thewilloftheshadow merged 11 commits intomainfrom
status-reactions-review-fixes

Conversation

@thewilloftheshadow
Copy link
Member

@thewilloftheshadow thewilloftheshadow commented Feb 20, 2026

Continued from #20819 as I don't have push permissions on that PR's fork

Greptile Summary

Refactored Discord-specific status reaction logic into a channel-agnostic controller (src/channels/status-reactions.ts) and integrated it into both Discord and Telegram channels. The shared controller provides lifecycle status reactions (queued → thinking → tool → done/error) with debouncing, stall timers, and terminal state protection.

Key improvements:

  • Extracted ~230 LOC of inline Discord logic into reusable createStatusReactionController
  • Fixed stall timer bug where repeated same-phase updates wouldn't reset timers (now properly resets via scheduleEmoji deduplication path)
  • Added Telegram lifecycle reactions support gated by messages.statusReactions.enabled config
  • Comprehensive test coverage (543 lines) including timer behavior, deduplication, terminal states, and error handling
  • Both channels properly respect ackReactionScope when status reactions are enabled

Confidence Score: 5/5

  • Safe to merge - well-tested refactoring with clear separation of concerns
  • Excellent refactoring that extracts duplicated logic, adds comprehensive test coverage, and fixes documented bugs. The shared controller pattern is clean, type-safe, and well-tested with 543 lines of unit tests covering edge cases, timing behavior, and error handling. Configuration schema is properly validated with Zod.
  • No files require special attention

Last reviewed commit: 20f81fd

@openclaw-barnacle openclaw-barnacle bot added channel: discord Channel integration: discord channel: telegram Channel integration: telegram labels Feb 20, 2026
@openclaw-barnacle openclaw-barnacle bot added size: XL maintainer Maintainer-authored PR labels Feb 20, 2026
@thewilloftheshadow thewilloftheshadow merged commit 30a0d3f into main Feb 20, 2026
21 of 24 checks passed
@thewilloftheshadow thewilloftheshadow deleted the status-reactions-review-fixes branch February 20, 2026 21:27
rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
@Carniatto
Copy link
Contributor

Carniatto commented Feb 21, 2026

@thewilloftheshadow thanks for getting this merged. And thanks for the credit

Can you explain the flow ? I could have granted permissions so you did not need to take over my MR. I was really looking forward to be a contributor.

I'm just looking to learn so I can do better next time 🙏

dgarson pushed a commit to dgarson/clawdbot that referenced this pull request Feb 21, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
* feat: add shared status reaction controller

* feat: add statusReactions config schema

* feat: wire status reactions for Discord and Telegram

* fix: restore original 10s/30s stall defaults for Discord compatibility

* Status reactions: fix stall timers and gating

* Format status reaction imports

---------

Co-authored-by: Matt <mateus.carniatto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: telegram Channel integration: telegram maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants