fix(discord): stop typing indicator before response delivery - #38566
Closed
njiangk wants to merge 1 commit into
Closed
fix(discord): stop typing indicator before response delivery#38566njiangk wants to merge 1 commit into
njiangk wants to merge 1 commit into
Conversation
The persistent typing loop can keep the typing indicator active past the moment the bot's reply is sent, causing a ~10s 'typing...' bubble that visually overlaps the response text on Discord. Move the typing stop from the generic cleanup path (which fires after response delivery) to just before the response is sent, ensuring the indicator is dismissed before the reply arrives.
19 tasks
Collaborator
|
Thanks for this. The post-delivery typing-stop fix has landed on |
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.
Summary
Stop the persistent typing indicator before delivering the bot's reply, so the ~10s Discord typing bubble doesn't visually overlap the response text.
Root Cause
The existing
stop_typingcall lives in thefinallyblock of the message-processing pipeline — it fires after the response is already sent over the wire. On Discord this means the "typing..." indicator persists for several seconds into the reply, obscuring the text.Fix
Add an inner helper
_stop_typing_nowthat is called just before the response dispatch path, beforeif not response:is evaluated. The cleanup-pathstop_typingin thefinallyblock is kept as a safety net for error/cancellation paths.Test Plan