Skip to content

πŸ› fix: bot callback error#13349

Merged
rdmclin2 merged 6 commits intocanaryfrom
fix/bot-callback-error
Mar 27, 2026
Merged

πŸ› fix: bot callback error#13349
rdmclin2 merged 6 commits intocanaryfrom
fix/bot-callback-error

Conversation

@rdmclin2
Copy link
Copy Markdown
Collaborator

πŸ’» Change Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

πŸ”€ Description of Change

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

πŸ“Έ Screenshots / Videos

Before After
... ...

πŸ“ Additional Information

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 27, 2026 4:19pm

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot
Copy link
Copy Markdown
Member

@ONLY-yours @nekomeowww - This PR fixes a bot callback error, touching agent channel UI and backend bot platform services. Please coordinate on review.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83fc7c7641

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +391 to 393
AgentBridgeService.activeThreads.delete(thread.id);
await thread.setState({ ...threadState, topicId: undefined });
return this.handleMention(thread, message, opts);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Await retry path before clearing thread activity state

In the FK-recovery branch, handleSubscribedMessage deletes the active-thread marker and immediately returns this.handleMention(...) without awaiting it. Because the outer finally still runs right away, it clears activeThreads (and cleanup reactions) while the retried mention is still executing, which can admit a second concurrent message on the same thread during the retry window. This shows up when a stale topicId triggers recovery and another user message arrives before the retried run finishes.

Useful? React with πŸ‘Β / πŸ‘Ž.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 64.28571% with 20 lines in your changes missing coverage. Please review.
βœ… Project coverage is 66.76%. Comparing base (6b4046e) to head (6ee90a1).
⚠️ Report is 3 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #13349     +/-   ##
=========================================
  Coverage   66.75%   66.76%             
=========================================
  Files        1894     1895      +1     
  Lines      152312   152335     +23     
  Branches    17374    15308   -2066     
=========================================
+ Hits       101672   101700     +28     
+ Misses      50520    50515      -5     
  Partials      120      120             
Flag Coverage Ξ”
app 58.14% <64.28%> (+0.01%) ⬆️
database 96.66% <ΓΈ> (ΓΈ)
packages/agent-runtime 89.61% <ΓΈ> (ΓΈ)
packages/context-engine 86.47% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.36% <ΓΈ> (ΓΈ)
packages/file-loaders 87.02% <ΓΈ> (ΓΈ)
packages/memory-user-memory 66.68% <ΓΈ> (ΓΈ)
packages/model-bank 99.85% <ΓΈ> (ΓΈ)
packages/model-runtime 84.44% <ΓΈ> (ΓΈ)
packages/prompts 67.76% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 90.41% <ΓΈ> (ΓΈ)
packages/web-crawler 88.82% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 66.11% <ΓΈ> (ΓΈ)
Services 49.58% <ΓΈ> (ΓΈ)
Server 67.23% <57.44%> (+0.02%) ⬆️
Libs 51.06% <ΓΈ> (ΓΈ)
Utils 91.01% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rdmclin2 rdmclin2 merged commit f4c4ba7 into canary Mar 27, 2026
38 checks passed
@rdmclin2 rdmclin2 deleted the fix/bot-callback-error branch March 27, 2026 16:53
@lobehubbot
Copy link
Copy Markdown
Member

❀️ Great PR @rdmclin2 ❀️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants