Repository navigation
fix(inbox): let staff take over after complete AI replies - #46
Merged
EndlessCCL merged 1 commit intoOct 26, 2026
Merged
Conversation
Wait for active AI replies to finish before completing manual takeover. Persist pending requests, keep takeover events internal, clear widget waiting state, and restore missing conversation history without replacing image observations. Signed-off-by: EndlessCCL <endlessccl@gmail.com>
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.
What this PR does
Add “Take over and reply” to Inbox. If AI is replying, save the takeover request and wait until its complete answer is saved before enabling staff replies. AI failure or timeout also completes the pending takeover.
Preserve pending requests across refreshes, keep takeover events internal, and clear the widget’s thinking indicator when human handling starts. Reopened conversations restore missing customer and staff messages while preserving existing image observations.
Why
Staff need to intervene without truncating AI replies or losing conversation history.
How to review
Test takeover while AI is idle and replying, refresh during a pending request, and verify failure/timeout behavior.
Validation: 9 focused tests, affected-file ESLint and i18n checks passed. No database migration is required.