fix(feishu): stop typing-indicator log spam and stuck emoji on message-not-found#27525
Closed
byungsker wants to merge 1 commit into
Closed
fix(feishu): stop typing-indicator log spam and stuck emoji on message-not-found#27525byungsker wants to merge 1 commit into
byungsker wants to merge 1 commit into
Conversation
…e-not-found
- Remove internal console.log from addTypingIndicator/removeTypingIndicator;
errors now propagate so callers handle them via the structured onStartError /
onStopError paths instead of raw console output.
- Add isFeishuMessageNotFoundError() helper that detects Feishu error code
231003 ("The message is not found, maybe not exist or deleted").
- In reply-dispatcher, introduce typingDisabled flag: the first time start()
receives a 231003 error the flag is set and all subsequent keepalive ticks
are skipped, eliminating the 3-second log spam seen in openclaw#27418.
- Guard start() so it skips when typingState.reactionId is already set.
Previously the keepalive overwrote typingState with null on every tick
(because addTypingIndicator failed silently), causing removeTypingIndicator
to find no reactionId and leaving the Typing emoji permanently on the
user's message.
Fixes openclaw#27418
Contributor
Greptile SummaryThis PR fixes two related bugs in the Feishu typing indicator implementation that caused log spam and stuck emoji reactions. The changes improve error handling by removing silent
The implementation correctly handles the error propagation flow: Confidence Score: 5/5
Last reviewed commit: a1889d1 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #27418
Two related bugs in the Feishu typing-indicator (reaction emoji):
Log spam –
addTypingIndicatorsilently caught failures and printed aconsole.logon every keepalive tick (every 3 s). When the target message no longer exists (Feishu error code 231003), the error repeated indefinitely.Typing emoji stuck on message – the keepalive called
addTypingIndicatoron every tick. Because the reaction already existed (or the call failed), the SDK returnedreactionId: null. The dispatcher overwrotetypingStatewith{ reactionId: null }, soremoveTypingIndicatorhad nothing to delete, leaving the Typing emoji on the user's message permanently.Root cause
Fix
extensions/feishu/src/typing.tsconsole.log/try-catchfromaddTypingIndicatorandremoveTypingIndicator; errors now propagate so structured error handlers are used.isFeishuMessageNotFoundError()helper that detects Feishu error code 231003.extensions/feishu/src/reply-dispatcher.tstypingDisabledflag: set on the first 231003 error, causing all subsequent keepalive ticks to skip the API call (no more log spam).start()withif (typingState?.reactionId) returnso the keepalive never overwrites a validreactionIdwith null — ensuringremoveTypingIndicatorcan always clean up properly.typingStatebefore awaiting removal to avoid a race where a second stop call finds stale state.Tests
Added
extensions/feishu/src/typing.test.tswith 6 unit tests forisFeishuMessageNotFoundError.