Skip to content

🗃️ feat(topic): add status and completed_at columns#13974

Closed
arvinxx wants to merge 2 commits into
mainfrom
release/db-migration-topic-status
Closed

🗃️ feat(topic): add status and completed_at columns#13974
arvinxx wants to merge 2 commits into
mainfrom
release/db-migration-topic-status

Conversation

@arvinxx

@arvinxx arvinxx commented Apr 19, 2026

Copy link
Copy Markdown
Member

This release includes a database schema migration for Topic lifecycle status. We are adding 2 new columns and 2 new indexes on the topics table so topic completion state can be tracked and queried per user.

Migration overview

Previously, topics had no explicit completion state — callers had to infer status from other signals, which blocked features like completed-topic views and per-user completion timelines. This migration introduces the missing lifecycle fields so topic status and completion time are first-class, queryable data.

In practical terms, this unblocks upcoming topic-status UI and gives operators a cleaner signal for lifecycle reporting.

Added columns on topics:

  • statustext enum (active / completed / archived), nullable, no default
  • completed_attimestamp with time zone, nullable

Added indexes:

  • topics_status_idx on (status)
  • topics_user_id_completed_at_idx on (user_id, completed_at)

Notes for self-hosted users

  • Migration runs automatically during app startup.
  • No manual SQL action is required in standard deployments.
  • No backfill — status is nullable, so existing rows remain NULL until written.
  • As with any schema release, we still recommend database backup and rollout during a low-traffic window.

The migration owner: @arvinxx — responsible for this database schema change, reach out for any migration-related issues.

Adds nullable `status` enum (active/completed/archived) and `completed_at` timestamp columns to topics, plus supporting indexes on status and (user_id, completed_at).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Building Building Apr 19, 2026 2:01pm
lobehub (staging) Ready Ready Preview, Comment Apr 19, 2026 2:01pm

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Apr 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.78%. Comparing base (94b6827) to head (ba9a981).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #13974       +/-   ##
===========================================
+ Coverage   66.78%   83.78%   +16.99%     
===========================================
  Files        2044      539     -1505     
  Lines      174052    36730   -137322     
  Branches    17146     6073    -11073     
===========================================
- Hits       116249    30774    -85475     
+ Misses      57679     5832    -51847     
  Partials      124      124               
Flag Coverage Δ
app ?
database ?
packages/agent-runtime 79.72% <ø> (ø)
packages/context-engine 83.22% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.86% <ø> (ø)
packages/model-runtime 84.20% <ø> (ø)
packages/prompts 69.24% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.34% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

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

Components Coverage Δ
Store ∅ <ø> (∅)
Services ∅ <ø> (∅)
Server ∅ <ø> (∅)
Libs ∅ <ø> (∅)
Utils 93.47% <ø> (+2.35%) ⬆️
🚀 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.

@arvinxx arvinxx changed the title 🗃️ feat(topic): add status and completed_at columns 🗃️ feat(topic): add status and completed_at columns Apr 19, 2026
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🐳 Database Docker Build Completed!

Version: pr-release-db-migration-topic-status-f88444a
Build Time: 2026-04-19T13:59:22.556Z
🔗 View all tags on Docker Hub: https://hub.docker.com/r/lobehub/lobehub/tags

Pull Image

Download the Docker image to your local machine:

docker pull lobehub/lobehub:pr-release-db-migration-topic-status-f88444a

Important

This build is for testing and validation purposes.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Desktop App Build Completed!

Version: 0.0.0-nightly.pr13974.8770
Build Time: 2026-04-19T14:31:47.657Z

📦 Release Download · 📥 Actions Artifacts

Build Artifacts

Platform File Size
macOS (Apple Silicon) LobeHub-Nightly-0.0.0-nightly.pr13974.8770-arm64-mac.zip 141.98 MB
macOS (Apple Silicon) LobeHub-Nightly-0.0.0-nightly.pr13974.8770-arm64.dmg 136.33 MB
macOS (Intel) LobeHub-Nightly-0.0.0-nightly.pr13974.8770-mac.zip 150.25 MB
macOS (Intel) LobeHub-Nightly-0.0.0-nightly.pr13974.8770-x64.dmg 143.10 MB
Windows LobeHub-Nightly-0.0.0-nightly.pr13974.8770-setup.exe 128.34 MB
Linux LobeHub-Nightly-0.0.0-nightly.pr13974.8770.AppImage 158.70 MB

Warning

Note: This is a temporary build for testing purposes only.

@arvinxx

arvinxx commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

Superseded by #13994 which bundles topic status + tasks automation_mode migrations together.

@arvinxx arvinxx closed this Apr 20, 2026
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.

1 participant