Skip to content

✨ feat: create new topic every 4 hours#13570

Merged
rdmclin2 merged 3 commits intocanaryfrom
feat/new-bot-topic-create
Apr 4, 2026
Merged

✨ feat: create new topic every 4 hours#13570
rdmclin2 merged 3 commits intocanaryfrom
feat/new-bot-topic-create

Conversation

@rdmclin2
Copy link
Copy Markdown
Collaborator

@rdmclin2 rdmclin2 commented Apr 4, 2026

💻 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 Apr 4, 2026

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

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

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 - This PR adds scheduled topic creation in the bot/AgentBridge service. Please take a look.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 26.08696% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.57%. Comparing base (e364b9a) to head (4d6d9c7).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13570      +/-   ##
==========================================
- Coverage   66.58%   66.57%   -0.01%     
==========================================
  Files        1999     1999              
  Lines      165905   165928      +23     
  Branches    16083    19942    +3859     
==========================================
+ Hits       110470   110474       +4     
- Misses      55311    55330      +19     
  Partials      124      124              
Flag Coverage Δ
app 58.43% <26.08%> (-0.01%) ⬇️
database 92.57% <ø> (ø)
packages/agent-runtime 88.98% <ø> (ø)
packages/context-engine 85.39% <ø> (ø)
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.66% <ø> (ø)
packages/prompts 65.80% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.02% <ø> (ø)
packages/web-crawler 88.82% <ø> (ø)

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

Components Coverage Δ
Store 67.10% <ø> (ø)
Services 51.53% <ø> (ø)
Server 65.96% <26.08%> (-0.03%) ⬇️
Libs 51.03% <ø> (ø)
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.

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: cd959a089a

ℹ️ 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 +359 to +360
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 Check active-thread lock before resetting stale topic state

This stale-topic branch executes before the activeThreads short-circuit, so a second message arriving while another execution is still running can clear topicId and then immediately no-op in handleMention (because the thread is active). In that case the message is dropped but state stays cleared, and the next user message starts a fresh topic even if the in-flight execution just updated the existing topic. Please short-circuit on active threads before mutating thread state in the stale-topic path.

Useful? React with 👍 / 👎.

Comment on lines +349 to +350
const topicModel = new TopicModel(this.db, this.userId);
const existingTopic = await topicModel.findById(topicId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle topic lookup failures in subscribed-message flow

The new stale-topic lookup runs outside the existing try/catch, so transient DB errors from findById now reject handleSubscribedMessage before the user-facing error path runs. That means subscribed messages can fail silently (no Agent Execution Failed post) and bubble an exception to the router callback. Wrap this lookup in the guarded section (or add a local catch) to preserve previous failure handling behavior.

Useful? React with 👍 / 👎.

@rdmclin2 rdmclin2 merged commit 3cb7206 into canary Apr 4, 2026
33 of 34 checks passed
@rdmclin2 rdmclin2 deleted the feat/new-bot-topic-create branch April 4, 2026 15:40
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