Skip to content

Status reactions: fix stall timers and gating#22190

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

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

Conversation

@thewilloftheshadow

@thewilloftheshadow thewilloftheshadow commented Feb 20, 2026

Copy link
Copy Markdown
Member

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
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 <[email protected]>
@Carniatto

Carniatto commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

@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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 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 <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 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 <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 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 <[email protected]>
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