fix(feishu): call dispatcher.markComplete() to stop typing keepalive loop#27640
fix(feishu): call dispatcher.markComplete() to stop typing keepalive loop#27640kevinWangSheng wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR bundles three separate, unrelated bug fixes into a single PR, which violates the repository guideline to "group related changes; avoid bundling unrelated refactors" (CLAUDE.md line 111):
PR Description Accuracy: The PR title and description only mention the Feishu fix (closes #27598), but don't mention the other two fixes (closes #27509 and #27404). Code Quality: All three fixes are technically correct:
Recommendation: Consider splitting this into three separate PRs for cleaner git history, easier review, and simpler rollback if needed. Confidence Score: 3/5
Last reviewed commit: 80d4829 |
80d4829 to
6396faa
Compare
…loop The Feishu bot dispatches replies via dispatchReplyFromConfig() but never calls dispatcher.markComplete() afterward. Without it, the dispatcher's pending counter stays at 1 (initial reservation), so its onIdle callback never fires and the channel-level typing keepalive loop runs indefinitely, leaving ghost emoji reactions on messages. Move markComplete() and markDispatchIdle() into a finally block so they are called on both success and error paths. Closes openclaw#27598
6396faa to
2499dd4
Compare
|
Superseded by main commit 37a138c. Closed as part of a single integrated typing-leak fix set that:
Tracking issues resolved by the integrated landing:
Thank you for the work here; logic intent carried forward into the final merged implementation. |
Summary
dispatcher.markComplete()call afterdispatchReplyFromConfig()completes, and moved bothmarkComplete()andmarkDispatchIdle()into afinallyblock for proper cleanup on both success and error paths.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Typing indicator emoji reactions are now properly removed after the bot replies in Feishu channels.
Security Impact (required)
Repro + Verification
Environment
Steps
typingMode: "message"Expected
Typing indicator removed after reply is sent.
Actual
Before fix: Typing emoji reaction remained permanently. After fix: properly cleaned up.
Evidence
dispatchReplyFromConfig()→dispatcher.markComplete()→ dispatcheronIdlefires →typingCallbacks.onIdle()→fireStop()→ keepalive loop stops andremoveTypingIndicator()calledwithReplyDispatcherwrapper that callsmarkComplete()automaticallyHuman Verification (required)
finallyblock; TypingController's 10-second grace timer provides additional safety netCompatibility / Migration
Failure Recovery (if this breaks)
typingMode: "never"in Feishu config to disable typing indicatorRisks and Mitigations
markComplete()called before all replies are fully deliveredmarkComplete()only clears the initial reservation; in-flight deliveries still decrementpendingindependently.onIdleonly fires when ALL deliveries complete ANDmarkCompletehas been called.🤖 Generated with Claude Code